giri-system-control

2.2.2 • Public • Published

giri-system-control

npm version Build Status Coveralls

This is a seneca plugin, that contains the system level microservices of the giri system.

Prerequisites

None.

Installation

Run the install command:

npm install

Run tests:

npm test

To see the coverage, run:

npm run coverage

Usage

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 a name property.

Response:

  • The system object, incl. the id and the name properties.

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 a name property.

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 the id of the system to find.
    • id. The id of the system to find.

Response:

  • The system found, or null if 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 the id of the system to reset.
    • id. The id of 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 time property, 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 time property, which contains the actual time to set in UTC.

Response:

  • An object, with time property, which contains the actual time in UTC.

References

Readme

Keywords

none

Package Sidebar

Install

npm i giri-system-control

Weekly Downloads

1

Version

2.2.2

License

MIT

Last publish

Collaborators

  • tombenke