imicros-flow-context
v0.0.5
Published
Moleculer persistent context store
Downloads
1
Readme
imicros-flow-context
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 }