Commit graph

5 commits

Author SHA1 Message Date
Pavel Karpy
52c1c4c5ab [#290] client: Add WithURIAddress option
Add `WithURIAddress` option to client.
It parses passed address with
`url.ParseRequestURI` function and
use(or not) TLS over grpc connection
based on retrieved scheme('grpc' or
'grpcs').

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-06-02 15:55:20 +03:00
Leonard Lyubich
22ce8e13cc [#196] rpc/client: Implement Client.Conn method
Implement `Client.Conn` which returns the connection of the underlying
transport client. The method is going to be used for forwarding the
connection to superior clients.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-05-31 10:13:00 +03:00
Pavel Karpy
89aede1fb3 [#286] client: Add TLS options
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>
2021-05-24 16:56:59 +03:00
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