cnclient

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: Apache-2.0 Imports: 7 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 GetStreamSender

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

func IsCNClientReady

func IsCNClientReady() bool

func NewCNClient

func NewCNClient(cfg *ClientConfig) error

TODO: Here it needs to be refactored together with Runtime

Types

type CNClient

type CNClient struct {
	// 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)

func (*CNClient) Send

func (c *CNClient) Send(ctx context.Context, backend string, request morpc.Message) (*morpc.Future, 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
}

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