In previous implementation `Client` didn't block until the connection is
up on dial stage. This caused the dial timeout to have no effect.
Provide `WithBlock` dial option to `DialContext` call in `openGRPCConn`
method. From now `Client` blocks for configured timeout until the
connection is up.
Signed-off-by: Leonard Lyubich <ctulhurider@gmail.com>
`grpc.WithInsecure` has been marked as deprecated in earlier releases of
`google.golang.org/grpc`.
Use `google.golang.org/grpc/credentials/insecure` package instead as
recommended.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Add `WithTLSConfig` option to client.
If it is not nil then client will
try to open secured connection.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
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>