giri-cluster-control v2.3.2
giri-cluster-control
This is a seneca plugin, that contains the sector 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-cluster-control')Options
There are no options for this plugin.
Actions
All actions provide results via the standard callback format: function(error, data){ ... }.
role: giri-cluster-control, cmd: createCluster
Create a new cluster, with a generated unique id.
If name is not defined, then it will give the id as the name too.
Parameters:
payload: The cluster object, to create.name: the cluster object may have anameproperty,systemId: the cluster object may have asystemIdproperty.
Response:
- The cluster object:
id: the unique id of the created cluster,name: the cluster object may have anameproperty,systemId: the cluster object may have asystemIdproperty.
role: giri-cluster-control, cmd: updateCluster
Updates the properties of a cluster, selected by its id.
If there is no cluster found with the given id, then it creates a new cluster with this id,
and sets its actual properties according to the input parameters.
Parameters:
payload: The cluster object to be updated (or created):id: the unique id of the created cluster,name: the cluster object may have anameproperty,systemId: the cluster object may have asystemIdproperty.
Response:
- The updated cluster object:
id: the unique id of the created cluster,name: the cluster object may have anameproperty,systemId: the cluster object may have asystemIdproperty.
role: giri-cluster-control, cmd: getClusters
Get a list on all of the clusters available.
Parameters:
- None
Response:
- The array of available cluster objects.
role: giri-cluster-control, cmd: getCluster
Get a cluster selected by its id.
Parameters:
payload: object to select the.id: Theidof the cluster to find.
Response:
- The cluster object found, or
nullif it is not found.
role: giri-cluster-control, cmd: getSystemClusters
Get a list of clusters, that belong to the same system, that is identified by the id.
Parameters:
payload: object to select the.systemId: Theidof the system which the cluster to find belongs to.
Response:
- The list of cluster object found, or an empty array if no one is found.
role: giri-cluster-control, cmd: resetCluster
Reset the whole cluster selected by its id.
Sectors belong to the cluster will be reset.
Parameters:
payload: An object, which holds theidof the cluster to reset.id. Theidof the cluster to reset.
Response:
- An empty
{}object.
References
- giri home page
- Seneca.js
- How to Write a Seneca Plugin
- Seneca plugins
- Chai Assertion Library / BDD API Reference
This project was generated from the seneca-plugin-archetype by the kickoff utility.