Socket
Socket
Sign inDemoInstall

ceph-dual

Package Overview
Dependencies
14
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ceph-dual

Parallelly write to two or more CEPH storages.


Version published
Weekly downloads
1
decreased by-83.33%
Maintainers
1
Created
Weekly downloads
 

Changelog

Source

[0.1.1] - 2021-04-14

  • Fix bug where leading data blocks may be missed when creating object from stream.
    修正错误:当从流中读取数据并写入多个存储时,可能存在部分数据块丢失的情况。

Readme

Source

ceph-dual

Parallelly write to two or more CEPH storages.

If links in this document not avaiable, please access README on GitHub directly.

Description

Use ceph-dual to parallelly operate two or more CEPH storages with ease.

ToC

Get Started

const cephDual = require('ceph-dual');

const connConfig_master =  {
    endPoint   : 'http://storage1.example.com/',
    subuser    : 'userName:subUserName',
    key        : '380289ba59473a368c593c1f1de6efb0380289ba5',
};

const connConfig_slave = {
    endPoint   : 'http://storage2.example.com/',
    subuser    : 'userName:subUserName',
    key        : '380289ba59473a368c593c1f1de6efb0380289ba5',
};

const conn = new cephDual.Connection([ connConfig_master, connConfig_slave ]);

conn.createContainer('demoBucket', (err) => {
    // ...
});

API

This package is nearly isomorphic with package ceph. Each time a member method of a ceph-dual.Connection instance invoked, same invokations will be applied to the ceph/*.Connection instances which are owned by it. The methods will be resolved or callback WITHOUT exception only if all the sub invokations succeeds. If any of the sub invokations fails, the methods will be rejected or callback WITH an exception.

To keep compatible, the input and output of a method are smiliar with those of the homonymous method in ceph/*.Connection. E.g.

conn.createObject({ container: 'demoBucket', name: 'hello.txt' }, 'Hello Ching!', (err, data) => {
    // Here `data` is an Object instead of an Array.
});

Keywords

FAQs

Last updated on 14 Apr 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc