Have ideas to improve npm?Join in the discussion! »

@coboxcoop/replicator

1.0.4-alpha.1 • Public • Published

replicator

standard-readme compliant

Table of Contents

About

CoBox is an encrypted p2p file system and distributed back-up tool. README provides a map of the project.

replicator provides a base class for replication. Initialises keys with validations, sets up storage paths, initialises feeds and enables replication.

These are all common functions for any space class, so we can inherit from the replicator class to extend functionality, such as for space, or admin space, which initialize additional but different logs.

Install

npm i -g @coboxcoop/replicator

Usage

const Replicator = require('@coboxcoop/replicator')
 
// you can either create a replicator instance (see tests), or inherit to add further functionality, e.g.
 
class MyReplicatorClass {
  constructor (storage, address, identity, opts) {
    super(storage, address, identity, opts)
 
    // initFeeds must be called to initialize multifeed and storage correctly
    this._initFeeds({})
  }
}

API

See swagger documentation... (we won't have this for a while).

Contributing

PRs accepted.

Small note: If editing the README, please conform to the standard-readme specification.

License

AGPL-3.0-or-later

Install

npm i @coboxcoop/replicator

DownloadsWeekly Downloads

0

Version

1.0.4-alpha.1

License

AGPL-3.0-or-later

Unpacked Size

59 kB

Total Files

9

Homepage

cobox.cloud

Last publish

Collaborators

  • avatar
  • avatar