Skip to content

Node.js client library for the Proprietary Scality sproxyd software

License

Notifications You must be signed in to change notification settings

scality/sproxydclient

Repository files navigation

nodeJS sproxyd client API

CircleCI Scality CI

Contributing

In order to contribute, please follow the Contributing Guidelines.

Usage

Installation

npm install --save scality/sproxydclient

API

The client API consists of a class handling basic operations on its side, using a callback to return whatever value is needed.

Initialisation

opts is an optional parameter, that will evolve to an array of connectors.

var SproxydClient = require('sproxydclient');

var opts = {
    hostname: 'example.com',
    port: '81',
    path: '/proxy/arc/',
};

var client = new SproxydClient(opts);

PUT

assert(stream instanceof stream.Readable);
Client.put(stream: stream.Readable, size: number, (err: Error, key: string) => {});

GET

Client.get(key: string, (err: Error, stream: http.IncomingMessage) => {});

DELETE

Client.delete(key: string, (err: Error) => {});

TODO

The API is still in its infancy stages. We need to:

  • Detect said failures before sending our requests (Phi accrual detector)