From the docs of `time.After`:
```
The underlying Timer is not recovered by the garbage collector until the timer fires.
```
We have 1 minute default timeout, which is pretty long given that most
of the time we exchange small messages.
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
Remote gRPC server may not return or accept data for a while. gRPC
solves this issue with timeout in context. However, the context is
used for entire gRPC method invocation. Unfortunately the duration
of requests with streams can't be estimated easily.
To solve this issue we can specify timeouts for every message read
and write. Single message has size limit so timeout can be related
to that.
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
Implement `Client.Conn` method which returns underlying connection as
`io.Closer`. Method is going to be used for forwarding the connection to
superior clients.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
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>