reducer

package
v1.1.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	CloseConn(ctx context.Context) error
	IsReady(ctx context.Context, in *emptypb.Empty) (bool, error)
	ReduceFn(ctx context.Context, datumStreamCh <-chan *reducepb.ReduceRequest) (*reducepb.ReduceResponse, error)
}

Client contains methods to call a gRPC client.

func New

func New(inputOptions ...Option) (Client, error)

New creates a new client object.

func NewFromClient

func NewFromClient(c reducepb.ReduceClient) (Client, error)

type Option

type Option func(*options)

Option is the interface to apply options.

func WithMaxMessageSize

func WithMaxMessageSize(size int) Option

WithMaxMessageSize sets the server max receive message size and the server max send message size to the given size.

func WithServerInfoFilePath

func WithServerInfoFilePath(f string) Option

WithServerInfoFilePath sets the server info file path to the given path.

func WithServerInfoReadinessTimeout

func WithServerInfoReadinessTimeout(t time.Duration) Option

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

func WithTcpSockAddr

func WithTcpSockAddr(addr string) Option

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

func WithUdsSockAddr

func WithUdsSockAddr(addr string) Option

WithUdsSockAddr start the client with the given UDS 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