0.0.15 • Published 7 years ago

cannasos-rpc v0.0.15

Weekly downloads
6
License
MIT
Repository
github
Last release
7 years ago

CannaSOS RPC

NPM version Dependency Status Dev dependency Status

API reference

Constructor

new Rpc(connectionString, options)

Rpc methods

connect(next)

disconnect(next)

register(serviceName, handler, next)

call(serviceName, method, args, next)

Example

const rpc = new Rpc('amqp://user:password@hostname');
rpc.connect((err) => {
  if (err) { return next(err); }
  rpc.register('testServer', new Server(), (err) => {
    if (err) { return next(err); }
    rpc.call('testServer', 'testSqr', {val: 2}, (err, res) => {
      if (err) { return next(err); }
      console.log(res);
    });
  });
});
0.0.15

7 years ago

0.0.14

7 years ago

0.0.13

7 years ago

0.0.12

7 years ago

0.0.11

8 years ago

0.0.10

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