applier

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Terminal Applier do not make any change to the message
	Terminal = ApplyMapFunc(func(ctx context.Context, msg *isb.ReadMessage) ([]*isb.Message, error) {
		return []*isb.Message{&msg.Message}, nil
	})
)

Functions

This section is empty.

Types

type ApplyMapFunc added in v0.6.3

type ApplyMapFunc func(context.Context, *isb.ReadMessage) ([]*isb.Message, error)

ApplyMapFunc utility function used to create an Applier implementation

func (ApplyMapFunc) ApplyMap added in v0.6.3

func (a ApplyMapFunc) ApplyMap(ctx context.Context, message *isb.ReadMessage) ([]*isb.Message, error)

type ApplyReduceFunc added in v0.6.3

type ApplyReduceFunc func(context.Context, *partition.ID, <-chan *isb.ReadMessage) ([]*isb.Message, error)

ApplyReduceFunc utility function used to create a Reducer implementation

func (ApplyReduceFunc) ApplyReduce added in v0.6.3

func (a ApplyReduceFunc) ApplyReduce(ctx context.Context, partitionID *partition.ID, messageStream <-chan *isb.ReadMessage) ([]*isb.Message, error)

type MapApplier added in v0.6.3

type MapApplier interface {
	ApplyMap(ctx context.Context, message *isb.ReadMessage) ([]*isb.Message, error)
}

MapApplier applies the UDF on the read message and gives back a new message. Any UserError will be retried here, while InternalErr can be returned and could be retried by the callee.

type ReduceApplier added in v0.6.3

type ReduceApplier interface {
	ApplyReduce(ctx context.Context, partitionID *partition.ID, messageStream <-chan *isb.ReadMessage) ([]*isb.Message, error)
}

ReduceApplier applies the HTTPBasedUDF on the read message and gives back a new message. Any UserError will be retried here, while InternalErr can be returned and could be retried by the callee.

Jump to

Keyboard shortcuts

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