2.0.0 • Published 9 years ago

nanoservice v2.0.0

Weekly downloads
5
License
ISC
Repository
github
Last release
9 years ago

#NanoService

npm version Build Status Coverage Status

Module for agile interservice-communication with support different transports (like as socket). Every service can has many in and out links. Every link can has many connections by different transport (example, socket-client or socket-server), create another services and environment.

#Example import nanoservice from("nanoservice"); //Add transport with any name const transportIPCServer = require("nanoservice-transport-ipc-server"); class Service1 extends EventEmitter { constructor(args){ super(); this.on("in1", (data)=>{ setTimeout(()=>{ this.emit("test1"); }, 100); }); } } // Create transport const transport = transportIPCServer({ address: "sock" }); // Define links // All calls to out1 will be transported to ipc-server with address "sock" on emit-name "event1" const links = { transport: transport, type: "out", name: "out1", to: "event1" } ; const config = { links }; nanoservice(service, config)

#Transports

Internal transport: https://github.com/arvitaly/nanoservice-transport-internal

IPC transports: https://github.com/arvitaly/nanoservice-transport-ipc-client, https://github.com/arvitaly/nanoservice-transport-ipc-server

2.0.0

9 years ago

1.1.0

9 years ago

1.0.6

9 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago