Skip to content

Latest commit

 

History

History
66 lines (44 loc) · 1.46 KB

README.md

File metadata and controls

66 lines (44 loc) · 1.46 KB

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)