Novel Planetary Movement

    @coboxcoop/replicator

    1.0.6-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 extends Replicator {
      constructor (storage, address, identity, opts) {
        super(storage, address, identity, opts)
    
        // initFeeds must be called to initialize multifeed and storage correctly
        this._initFeeds({})
      }
    
      ready () {
        this.open(() => {
          // make your replicator ready, call any prep async functions
        })
      }
    }

    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

    Homepage

    cobox.cloud

    DownloadsWeekly Downloads

    0

    Version

    1.0.6-alpha.1

    License

    AGPL-3.0-or-later

    Unpacked Size

    55.3 kB

    Total Files

    8

    Last publish

    Collaborators

    • kyphae
    • ameba23