client

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheClient

type CacheClient interface {
	// SendMessage send message to a cache server.
	SendMessage(ctx context.Context, address string, req *cache.Request) (*cache.CacheResponse, error)
	// NewRequest creates a new request by cmd method.
	NewRequest(cache.CmdMethod) *cache.Request
	// Release releases the response.
	Release(*cache.CacheResponse)
	// Close closes the cache client.
	Close() error
}

func NewCacheClient

func NewCacheClient(cfg ClientConfig) (CacheClient, error)

type ClientConfig

type ClientConfig struct {
	// RPC rpc config
	RPC morpc.Config
}

ClientConfig a config to init a CNClient

Jump to

Keyboard shortcuts

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