scality / sproxydclient

Node.js client library for the Proprietary Scality sproxyd software

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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)

About

Node.js client library for the Proprietary Scality sproxyd software

License:Apache License 2.0


Languages

Language:JavaScript 100.0%