forked from TrueCloudLab/frostfs-api-go
[#196] pkg/client: Extend Client interface with Conn method
Add `Conn` method to `Client` interface which must return the underlying connection. Implement new method on the core structure. `Conn` can be used to control the connection (e.g. for closing). Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
22ce8e13cc
commit
89be8d3f5a
2 changed files with 14 additions and 0 deletions
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue