applier

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: Apache-2.0 Imports: 2 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{
		// contains filtered or unexported fields
	}
)

Functions

This section is empty.

Types

type ApplyMapFunc

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

ApplyMapFunc utility function used to create an Applier implementation

func (ApplyMapFunc) ApplyMap

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

func (ApplyMapFunc) ApplyMapStream added in v0.8.1

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

type MapApplier

type MapApplier interface {
	ApplyMap(ctx context.Context, message *isb.ReadMessage) ([]*isb.WriteMessage, error)
	ApplyMapStream(ctx context.Context, message *isb.ReadMessage, writeMessageCh chan<- isb.WriteMessage) 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.

Jump to

Keyboard shortcuts

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