0.1.4 • Published 4 years ago

hitchy-plugin-odem-etcd v0.1.4

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

plugin-odem-etcd

connecting Hitchy's ODM with etcd cluster

License

MIT

About

Hitchy is a server-side framework for developing web applications with Node.js. Odem is a plugin for Hitchy implementing an object document management (ODM) using data backends like regular file systems, LevelDBs and temporary in-memory databases.

This plugin is implementing another such data backend enabling data of Hitchy's ODM to be stored in an etcd-based cluster.

Installation

Execute the following command in folder of your Hitchy-based application:

npm i hitchy-plugin-odem-etcd

It is installing this plugin and its dependency hitchy-plugin-odem. So, you may rely only on this plugin instead of listing hitchy-plugin-odem as a dependency yourself, as well.

Usage

Select an instance of this backend as default adapter in your application's configuration by creating a file config/database.js with content similar to this:

const File = require( "fs" );

module.exports = function() {
    return {
        database: {
            default : new this.runtime.services.OdemAdapterEtcd( {
                hosts: [
                    "https://10.0.1.1:2379",
                    "https://10.0.1.2:2379",
                    "https://10.0.1.3:2379",
                ],
                credentials: {
                    rootCertificate: File.readFileSync( "path/to/ca.pem" ),
                    certChain: File.readFileSync( "path/to/cert.pem" ),
                    privateKey: File.readFileSync( "path/to/key.pem" ),
                }
            } ),
        },
    };
};

Provided options are basically forwarded to instance of Etcd3 created internally.

0.1.4-alpha.3

4 years ago

0.1.4

4 years ago

0.1.4-alpha.4

4 years ago

0.1.4-alpha.2

4 years ago

0.1.4-alpha.1

4 years ago

0.1.3

4 years ago

0.1.3-alpha.5

4 years ago

0.1.3-alpha.4

4 years ago

0.1.3-alpha.3

4 years ago

0.1.3-alpha.1

4 years ago

0.1.3-alpha.2

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.1-alpha.1

4 years ago

0.1.0

4 years ago