0.8.0 • Published 2 years ago

@iztiar/iztiar-pidusage v0.8.0

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
2 years ago

Iztiar

iztiar-pidusage

Adds a pidUsage object to the status of (forked) services.

This is a very small plugin whose main goal is to demonstrate the implementation and configuration of an addon feature.

Targeted plugins

As this plugin provides an addon feature, it obviously targets some particular other plugins, and in our case the features which run in their own processes, the only which are concerned by a PID usage, and also the only which should provide a runtime status.

To be a valid candidate to this extension, the targeted module MUST have two keys in its package.json file:

- "type": "service"
- "class": "a_class_name"

Configuration

A candidate plugin may take advantage of this extension by a simple configuration in iztiar.json application configuration.

Simply add a new key in the addons object of the feature, with the module name of this plugin, and the targeted class name in the targets array, so something like that:

    "addons": {
        "pidUsage": {
            "module": "@iztiar/iztiar-pidusage",
            "targets": [
                "coreController"
            ]
        }
    }

Installation

The whole configuration process may (should ?) be automatized as soon as the storage directory is known at installation time...