Skip to content

SlimIO/Gate

Repository files navigation

Gate

SlimIO Gate built-in addon. This addon is an abstraction of core (as Addon).

Note: it use global.slimio_core (registered as global by the core) to work.

Features

  • Expose core data to callback(s).
  • Expose available addons.

Getting Started

This package is available in the SlimIO Package Registry and can be easily installed with SlimIO CLI.

$ slimio --add gate
# or
$ slimio --add https://github.com/SlimIO/Gate

Note: this addon is automatically installed with the slimio -i command.

Callbacks

global_info

Retrieve informations about the Agent itself. Like some of the constructor parameters or versions of used libs in Node.js (like V8 Engine version etc).

{
    root: string;
    silent: boolean;
    coreVersion: string;
    versions: string;
}
list_addons

Return an Array of string that contains addons name (in lowercase).

get_routing_table

Return the complete core routing table. A route is the composition of the addon name and a callback name (what we often call a target).

For example gate.status is a target (that how the core deal with the incomming requests).

get_config(path?: string)

Get a given key path from the Agent configuration file. Return any payload requested. If no path is given, the complete configuration is returned.

set_config(path: string, value: string)

Set a new configuration in the Agent configuration. path and value must be valid JS strings.

dump_list

Return the complete list of dump names (Array of string). These can be used to retrieve each dump with the gate.get_dump callback.

get_dump(name: string)

Return a given dump.

start_addon(addonName: string)

Start a given addon (currently in use for Prism addon).

get_lock_state

Return the complete list of linked addons states for the Addon who request the callback.

Dependencies

Name Refactoring Security Risk Usage
@slimio/addon Minor Low Addon Container

Licence

MIT

About

Built-in Addon Gate

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •