function

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplyUDFErr

type ApplyUDFErr struct {
	UserUDFErr bool
	Message    string
	InternalErr
}

ApplyUDFErr represents any UDF related error

func (ApplyUDFErr) Error

func (e ApplyUDFErr) Error() string

func (ApplyUDFErr) IsInternalErr

func (e ApplyUDFErr) IsInternalErr() bool

IsInternalErr is true if this is a platform issue. This is a blocking error.

func (ApplyUDFErr) IsUserUDFErr

func (e ApplyUDFErr) IsUserUDFErr() bool

IsUserUDFErr is true if the problem is due to the user code in the UDF.

type InternalErr

type InternalErr struct {
	Flag        bool
	MainCarDown bool
}

InternalErr represents errors internal to the platform

type UDSgRPCBasedUDF added in v0.7.1

type UDSgRPCBasedUDF struct {
	// contains filtered or unexported fields
}

UDSgRPCBasedUDF applies user defined function over gRPC (over Unix Domain Socket) client/server where server is the UDF.

func NewUDSgRPCBasedUDF added in v0.7.1

func NewUDSgRPCBasedUDF(c clientsdk.Client) (*UDSgRPCBasedUDF, error)

NewUDSgRPCBasedUDF returns a new UDSgRPCBasedUDF object.

func NewUDSgRPCBasedUDFWithClient added in v0.7.1

func NewUDSgRPCBasedUDFWithClient(client clientsdk.Client) *UDSgRPCBasedUDF

NewUDSgRPCBasedUDFWithClient need this for testing

func (*UDSgRPCBasedUDF) ApplyMap added in v0.7.1

func (u *UDSgRPCBasedUDF) ApplyMap(ctx context.Context, readMessage *isb.ReadMessage) ([]*isb.WriteMessage, error)

func (*UDSgRPCBasedUDF) ApplyMapStream added in v0.8.1

func (u *UDSgRPCBasedUDF) ApplyMapStream(ctx context.Context, message *isb.ReadMessage, writeMessageCh chan<- isb.WriteMessage) error

func (*UDSgRPCBasedUDF) ApplyReduce added in v0.7.1

func (u *UDSgRPCBasedUDF) ApplyReduce(ctx context.Context, partitionID *partition.ID, messageStream <-chan *isb.ReadMessage) ([]*isb.WriteMessage, error)

ApplyReduce accepts a channel of isbMessages and returns the aggregated result

func (*UDSgRPCBasedUDF) CloseConn added in v0.7.1

func (u *UDSgRPCBasedUDF) CloseConn(ctx context.Context) error

CloseConn closes the gRPC client connection.

func (*UDSgRPCBasedUDF) IsHealthy added in v0.7.1

func (u *UDSgRPCBasedUDF) IsHealthy(ctx context.Context) error

IsHealthy checks if the udf is healthy.

func (*UDSgRPCBasedUDF) WaitUntilReady added in v0.7.1

func (u *UDSgRPCBasedUDF) WaitUntilReady(ctx context.Context) error

WaitUntilReady waits until the udf is connected.

Jump to

Keyboard shortcuts

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