imicros-flow-context

0.0.5 • Public • Published

imicros-flow-context

Coverage Status

Moleculer service for process instances context store

All values are encrypted before stored in cassandra database.

Installation

$ npm install imicros-flow-context --save

Dependencies / Requirements

Requires broker middleware AclMiddleware or similar (usage of AclMixin):

Reuires a running key server for retrieving the owner encryption keys:

Requires a running cassandra node/cluster.

Usage

const { ServiceBroker } = require("moleculer");
const { Context } = require("imicros-flow-context");

broker = new ServiceBroker({
    logger: console
});
broker.createService(Streams, Object.assign({ 
    settings: { 
        cassandra: {
            contactPoints: process.env.CASSANDRA_CONTACTPOINTS || "127.0.0.1", 
            keyspace: process.env.CASSANDRA_KEYSPACE || "imicros"
        }
    }
}));
broker.start();

Actions

  • add { instance, key, value } => { true|false }
  • get { instance, key } => { value }
  • remove { instance, key } => { true|false }

/imicros-flow-context/

    Package Sidebar

    Install

    npm i imicros-flow-context

    Weekly Downloads

    0

    Version

    0.0.5

    License

    MIT

    Unpacked Size

    54.5 kB

    Total Files

    12

    Last publish

    Collaborators

    • al66