cache

package
v0.43.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2024 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
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

Get function returns existing client or creates a new one.

type ClientCacheOpts added in v0.28.0

type ClientCacheOpts struct {
	DialTimeout      time.Duration
	StreamTimeout    time.Duration
	ReconnectTimeout time.Duration
	ResponseCallback func(client.ResponseMetaInfo) error
	AllowExternal    bool
	Buffers          *sync.Pool
	Logger           *zap.Logger
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL