nsolid-graphite
Version:
a daemon that sends N|Solid metrics to graphite
42 lines (26 loc) • 1.01 kB
Markdown
nsolid-apiclient
A very simple client for the REST-like N|Solid Storage API.
```js
var Client = require("nsolid-apiclient")
var client = Client("https://localhost:4000")
var contentStream = client.read('metrics', {start: '-5m', end: '-1m'})
```
API
All `endpoint` parameters should be an https URL to an N|Solid Storage server.
Creating a client
===
var Client = require("nsolid-apiclient")
var client = Client(endpoint)
Create a new client with the specified `endpoint` pre-configured.
Client methods
===
read
var responseStream = client.read(command[, options])
Send the command with optional `options` object. The `options` object will be converted to query parameters. These commands will read cached or stored data in the N|Solid Storage system versus fetching data from the N|Solid processes.
exec
var responseStream = client.exec(command[, options])
Instruct the proxy to execute the command on each N|Solid Agent (with optional filters specified in `options`)