forked from TrueCloudLab/frostfs-sdk-go
24 lines
461 B
Go
24 lines
461 B
Go
package client
|
|
|
|
import (
|
|
"io"
|
|
|
|
"google.golang.org/grpc"
|
|
)
|
|
|
|
// Conn is an interface for grpc client connection.
|
|
type Conn interface {
|
|
grpc.ClientConnInterface
|
|
io.Closer
|
|
}
|
|
|
|
// Conn returns underlying connection.
|
|
//
|
|
// Returns non-nil result after the first Init() call
|
|
// completed without a connection error.
|
|
//
|
|
// Client should not be used after Close() call
|
|
// on the connection: behavior is undefined.
|
|
func (c *Client) Conn() io.Closer {
|
|
return c.conn
|
|
}
|