Commit graph

4 commits

Author SHA1 Message Date
Evgenii Stratonikov
9ddfcdfbba [#277] go.mod: remove pkg/errors
Use stdlib `errors` instead.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-05-19 11:14:56 +03:00
Leonard Lyubich
30c6ca0714 [#263] Implement client for exchanging raw Protobuf messages
Implement generic `Client` that can communicate with the remote server via
protobuf `Message`'s. The client can uniformly execute any protobuf RPC
on the remote server using any of the supported transport protocols.
Currently only gRPC protocol is supported.

Additionally implement helpful functions to transmit messages by one of the
flow types: unary, client- or server-side stream.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-03-17 14:03:49 +03:00
Leonard Lyubich
c61656a43f [#263] Define generic protobuf message
Define `Message` interface of the generic protobuf message. In the initial
implementation, the message should be convertible to and from related gRPC
message.

Implement encoding functions over the `Message` that can:

 * unmarshal the `Message` via related gRPC message;
 * decode the `Message` from JSON format via related gRPC message;
 * encode the `Message` to JSON.

Implement nested `test` package for testing the implementation.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-03-17 14:03:49 +03:00
Leonard Lyubich
cf765a61a6 [#263] Implement client for exchanging raw messages using gRPC protocol
Implement gRPC client that can uniformly execute any RPC on the remote
server. In the primary implementation, the client is a thin wrapper over
gRPC client connection that is required to create the client. In the future,
it is planned to expand the library with convenient functionality.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-03-17 14:03:49 +03:00