client

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(inputOptions ...Option) (*client, error)

New creates a new client object.

Types

type Client

type Client interface {
	CloseConn(ctx context.Context) error
	IsReady(ctx context.Context, in *emptypb.Empty) (bool, error)
	SinkFn(ctx context.Context, datumList []*sinkpb.DatumRequest) ([]*sinkpb.Response, error)
}

Client contains methods to call a gRPC client.

type Option

type Option func(*options)

Option is the interface to apply options.

func WithMaxMessageSize

func WithMaxMessageSize(size int) Option

WithMaxMessageSize sets the max message size to the given size.

func WithServerInfoFilePath

func WithServerInfoFilePath(f string) Option

WithServerInfoFilePath start the client with the given server info file path. This is mainly used for testing purpose.

func WithServerInfoReadinessTimeout

func WithServerInfoReadinessTimeout(t time.Duration) Option

WithServerInfoReadinessTimeout sets the server info readiness timeout to the given timeout.

func WithSockAddr

func WithSockAddr(addr string) Option

WithSockAddr start the client with the given sock addr. This is mainly used for testing purpose.

Jump to

Keyboard shortcuts

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