2.0.0 • Published 7 years ago

nanoservice v2.0.0

Weekly downloads
5
License
ISC
Repository
github
Last release
7 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

7 years ago

1.1.0

7 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago