diff --git a/pkg/client/client.go b/pkg/client/client.go index 8fe4d1e0..4ffbd30f 100644 --- a/pkg/client/client.go +++ b/pkg/client/client.go @@ -1,6 +1,7 @@ package client import ( + "io" "sync" "github.com/nspcc-dev/neofs-api-go/rpc/client" @@ -17,6 +18,12 @@ type Client interface { // Raw must return underlying raw protobuf client. Raw() *client.Client + + // Conn must return underlying connection. + // + // Must return a non-nil result after the first RPC call + // completed without a connection error. + Conn() io.Closer } type clientImpl struct { diff --git a/pkg/client/raw.go b/pkg/client/raw.go index a8fce335..aebe1433 100644 --- a/pkg/client/raw.go +++ b/pkg/client/raw.go @@ -1,6 +1,8 @@ package client import ( + "io" + "github.com/nspcc-dev/neofs-api-go/rpc/client" ) @@ -12,3 +14,8 @@ func (c *clientImpl) Raw() *client.Client { return c.raw } + +// implements Client.Conn method. +func (c *clientImpl) Conn() io.Closer { + return c.raw.Conn() +}