Documentation
¶
Index ¶
Constants ¶
const DefaultBufferSize = 4 * 1024 * 1024 // 4MB
DefaultBufferSize describes default max GRPC message size. Unfortunately GRPC lib contains this const in private.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientCache ¶
type ClientCache struct {
// contains filtered or unexported fields
}
ClientCache is a structure around neofs-sdk-go/client to reuse already created clients.
func NewSDKClientCache ¶
func NewSDKClientCache(opts ClientCacheOpts) *ClientCache
NewSDKClientCache creates instance of client cache. `opts` are used for new client creation.
func (*ClientCache) CloseAll ¶ added in v0.21.0
func (c *ClientCache) CloseAll()
CloseAll closes underlying connections of all cached clients.
Ignores closing errors.
func (*ClientCache) Get ¶
func (c *ClientCache) Get(info clientcore.NodeInfo) (clientcore.Client, error)
Get function returns existing client or creates a new one.
type ClientCacheOpts ¶ added in v0.28.0
type Clients ¶ added in v0.45.2
type Clients struct {
// contains filtered or unexported fields
}
Clients manages connections to remote SNs.
func NewClients ¶ added in v0.45.2
func NewClients(l *zap.Logger, signBufPool *sync.Pool, streamTimeout, minConnTimeout, pingInterval, pingTimeout time.Duration) *Clients
NewClients constructs Clients initializing connection to any endpoint with given parameters.
func (*Clients) CloseAll ¶ added in v0.45.2
func (x *Clients) CloseAll()
CloseAll closes all opened connections.
func (*Clients) Get ¶ added in v0.45.2
func (x *Clients) Get(info clientcore.NodeInfo) (clientcore.MultiAddressClient, error)
Get initializes connections to network addresses of described SN and returns interface to access them. All opened connections are cached and kept alive until Clients.CloseAll.