* reduce allocations in tunnel code
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* another allocation fix
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* allocate maps with len if it known
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* allocate key for send once
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* fixes for safe convertation
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* fix client publish panic
If broker connect returns error we dont check it status and use
it later to publish message, mostly this is unexpected because
broker connection failed and we cant use it.
Also proposed solution have benefit - we flag connection status
only when we have succeseful broker connection
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* api/handler/broker: fix possible broker publish panic
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* provide broker disconnect messages in server
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* broker/eats: another fix
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* pass micro errors from grpc server to grpc client
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* wrap micro errors.Error to grpc status
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
Implement the Auth interface, with JWT and service implementations.
* Update Auth Interface
* Define Auth Service Implementation
* Support Service Auth
* Add Auth Service Proto
* Remove erronious files
* Implement Auth Service Package
* Update Auth Interface
* Update Auth Interface. Add Validate, remove Add/Remove roles
* Make Revoke interface more explicit
* Refactor serializing and deserializing service accounts
* Fix srv name & update interface to be more explicit
* Require jwt public key for auth
* Rename Variables (Resource.ID => Resource.Name & ServiceAccount => Account)
* Implement JWT Auth Package
* Remove parent, add ID
* Update auth imports to v2. Add String() to auth interface
* Unlock RPC client while actually receiving a message
As receiving a message might block for a long time, unblocking the client allows to let it send messages in the meanwhile without using 'tricks'
* Unlock RPC server while actually receiving a message
As receiving a message might block for a long time, unblocking the client allows to let it send messages in the meanwhile without using 'tricks'
* Protect Close() against race conditions
* Concurrency and Sequence tests