cnclient

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AcquireMessage

func AcquireMessage() *pipeline.Message

func CloseCNClient

func CloseCNClient() error

func GetRPCClient added in v0.8.0

func GetRPCClient() morpc.RPCClient

func GetStreamSender

func GetStreamSender(backend string) (morpc.Stream, error)

func IsCNClientReady

func IsCNClientReady() bool

func NewCNClient

func NewCNClient(
	localServiceAddress string,
	cfg *ClientConfig) error

TODO: Here it needs to be refactored together with Runtime

Types

type CNClient

type CNClient struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*CNClient) Close

func (c *CNClient) Close() error

func (*CNClient) NewStream

func (c *CNClient) NewStream(backend string) (morpc.Stream, error)

type ClientConfig

type ClientConfig struct {
	// MaxSenderNumber is the max number of backends per host for compute node service.
	MaxSenderNumber int
	// TimeOutForEachConnect is the out time for each tcp connect.
	TimeOutForEachConnect time.Duration
	// related buffer size.
	ReadBufferSize  int
	WriteBufferSize int
	// RPC rpc config
	RPC rpc.Config
}

ClientConfig a config to init a CNClient

func (*ClientConfig) Fill

func (cfg *ClientConfig) Fill()

Fill set some default value for client config.

Jump to

Keyboard shortcuts

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