giri-system-control v2.2.2
giri-system-control
This is a seneca plugin, that contains the system level microservices of the giri system.
Prerequisites
None.
Installation
Run the install command:
npm installRun tests:
npm testTo see the coverage, run:
npm run coverageUsage
To load the plugin:
seneca.use('giri-system-control')Options
There are no options for this plugin.
Actions
All actions provide results via the standard callback format: function(error,data){ ... }.
role: giri-system-control, cmd: createSystem
Create a new system, with a generated unique id.
If name is not defined, then it will give the id as the name too.
Parameters:
payload: The system object, to create:name: the system object may have anameproperty.
Response:
- The system object, incl. the
idand thenameproperties.
role: giri-system-control, cmd: updateSystem
Updates the properties of a system, selected by its id.
If there is no system found with the given id, then it creates a new system with this id,
and sets its actual properties according to the input parameters.
Parameters:
payload: The system object to be updated (or created):id: the unique id of the system,name: the system object may have anameproperty.
Response:
- The updated system object.
role: giri-system-control, cmd: getSystems
Get a list on all of the systems available.
Parameters:
- None
Response:
- The array of available system objects.
role: giri-system-control, cmd: getSystem
Get a system selected by its id.
Parameters:
payload: An object, which holds theidof the system to find.id. Theidof the system to find.
Response:
- The system found, or
nullif the system is not found.
role: giri-system-control, cmd: resetSystem
Reset the whole system selected by its id.
Clusters and sectors belong to the system will be reset.
Parameters:
payload: An object, which holds theidof the system to reset.id. Theidof the system to reset.
Response:
- An empty
{}object.
role: giri-system-control, cmd: getTime
Get the actual time used by the systems.
Parameters:
- None
Response:
- An object, with
timeproperty, which contains the actual time in UTC.
role: giri-system-control, cmd: setTime
Set the actual time to use by the systems.
Parameters:
- An object, with
timeproperty, which contains the actual time to set in UTC.
Response:
- An object, with
timeproperty, which contains the actual time in UTC.