kong_api

Simple library to use kong Kong : https://getkong.org


License
GPL-2.0

Documentation

amqp_rpc_binder

Features

amqp_rpc_binder is a package that allow to create simple remote and distributed task through RabbitMQ.

it use the pattern of Working queues and RPC describe here and here

Example

binding and calling can be done really simple :

class Auth {
  @Register()
  bool check(String username, String password) => return true;
}

main() async {
  var client = new Client(settings: new ConnectionSettings(host: '192.168.99.100'));
  var binder = new AMQPBinder(client);

  await binder.init();
  binder.register(new Auth());

  var checkAuth = new AMQPCaller(client, 'rpc.binder.Auth.check');

  bool isAuth = await checkAuth.remoteCall(["admin", "admin"]);
  if (isAuth) {
    print("User is authentificate");
  } else {
    print("Wrong credentials");
  }
  client.close();
}

Authors