knet-client

KNet client to talk with KNet

KNet Client

A client library to talk with KNet.

var KNetClient = require('knet-client');
 
var options = {
  "host": "knet.local"
, "username": "********"
, "password": "********"
};
 
knet = new KNetClient(options);
knet.listRoles(callback);
knet.listStrategies(callback);
knet.listSquadrons(callback);
knet.listDrones(callback);
knet.listMachines(callback);
 
knet.getRole(roleId, callback);
knet.getStrategy(strategyId, callback);
knet.getSquadron(strategyId, callback);
knet.getDrone(droneId, callback);
knet.getDroneStderrs(droneId, callback);
knet.getDroneStdouts(droneId, callback);
 
knet.upsertRole(roleId, data, callback);
knet.upsertStrategy(strategyId, data, callback);
 
knet.deleteRole(roleId, callback);
knet.deleteStrategy(strategyId, callback);
 
knet.decommissionDrone(droneId, callback);
knet.stopDrone(droneId, callback);
knet.listRoles(function(errresroles) {
  // roles is an array of objects 
});