stateless

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: GPL-3.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSwitchMissingTopic = errors.New("stateless switch missing topic")
)
View Source
var ErrorRetryAttempt = errors.New("retry all attempts failed")

Functions

func Base64PersistenceId added in v0.1.1

func Base64PersistenceId(ctx context.Context, m flow.Message[structure.Bytes, structure.Bytes]) (string, error)

func WithBatchIterateFunctionNextFunction

func WithBatchIterateFunctionNextFunction(next SingleFunction) runtime.Configuration[*BatchIterateFunction]

configuration

func WithBatchProducerNextFunction

func WithBatchProducerNextFunction(next BatchFunction) runtime.Configuration[*BatchProducer]

func WithBatchProducerPrometheus added in v0.1.0

func WithBatchProducerPrometheus() runtime.Configuration[*BatchProducer]

func WithBatchProducerRuntime

func WithBatchProducerRuntime(producer flow.Producer) runtime.Configuration[*BatchProducer]

configuration

func WithBatchRetryNextFunction

func WithBatchRetryNextFunction(next BatchFunction) runtime.Configuration[*BatchRetry]

func WithBatchRetryPrometheus

func WithBatchRetryPrometheus() runtime.Configuration[*BatchRetry]

func WithBatchRetryRuntime

func WithBatchRetryRuntime(retry *runtime_retry.Retry) runtime.Configuration[*BatchRetry]

configurations

func WithSingleRetryNextFunction

func WithSingleRetryNextFunction(next SingleFunction) runtime.Configuration[*SingleRetry]

func WithSingleRetryPrometheus

func WithSingleRetryPrometheus() runtime.Configuration[*SingleRetry]

func WithSingleRetryRuntime

func WithSingleRetryRuntime(retry *runtime_retry.Retry) runtime.Configuration[*SingleRetry]

configurations

func WithTopicSwitchFunction added in v0.2.4

func WithTopicSwitchFunction(topic string, f BatchFunction) runtime.Configuration[*TopicSwitch]

configuration

Types

type BatchFunction

func NewBatchIterateFunction added in v0.2.4

func NewBatchIterateFunction(configurations ...runtime.Configuration[*BatchIterateFunction]) BatchFunction

constructor

func NewBatchRetry

func NewBatchRetry(configurations ...runtime.Configuration[*BatchRetry]) BatchFunction

constructor

func NewProducerBatchFunction

func NewProducerBatchFunction(configurations ...runtime.Configuration[*BatchProducer]) BatchFunction

constructor

func NewTopicSwitch added in v0.1.1

func NewTopicSwitch(configurations ...runtime.Configuration[*TopicSwitch]) BatchFunction

constructor

type BatchIterateFunction added in v0.2.4

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

implementation

func (*BatchIterateFunction) Apply added in v0.2.4

type BatchProducer

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

implementation

type BatchRetry

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

implementation

type OneToOneExplodeFunction added in v0.0.5

type OneToOneExplodeFunction[IK any, IV any, OK any, OV any] func(context.Context, flow.Message[IK, IV]) ([]flow.Message[OK, OV], error)

type OneToOneFunction

type OneToOneFunction[IK any, IV any, OK any, OV any] func(context.Context, flow.Message[IK, IV]) (*flow.Message[OK, OV], error)

type OneToTwoFunction

type OneToTwoFunction[IK any, IV any, OK1 any, OV1 any, OK2 any, OV2 any] func(context.Context, flow.Message[IK, IV]) (*flow.Message[OK1, OV1], *flow.Message[OK2, OV2], error)

type SingleFunction

func ConvertOneToOne

func ConvertOneToOne[IK any, IV any, OK any, OV any](
	source OneToOneFunction[IK, IV, OK, OV],
	ik format.Format[IK],
	iv format.Format[IV],
	ok format.Format[OK],
	ov format.Format[OV],
) SingleFunction

func ConvertOneToOneExplode added in v0.0.5

func ConvertOneToOneExplode[IK any, IV any, OK any, OV any](
	source OneToOneExplodeFunction[IK, IV, OK, OV],
	ik format.Format[IK],
	iv format.Format[IV],
	ok format.Format[OK],
	ov format.Format[OV],
) SingleFunction

func ConvertOneToTwo

func ConvertOneToTwo[IK any, IV any, OK1 any, OV1 any, OK2 any, OV2 any](
	source OneToTwoFunction[IK, IV, OK1, OV1, OK2, OV2],
	ik format.Format[IK],
	iv format.Format[IV],
	ok1 format.Format[OK1],
	ov1 format.Format[OV1],
	ok2 format.Format[OK2],
	ov2 format.Format[OV2],
) SingleFunction

func ConvertTopicOneToOne added in v0.0.15

func ConvertTopicOneToOne[IK any, IV any, OK any, OV any](
	source OneToOneFunction[IK, IV, OK, OV],
	inputTopic flow.Topic[IK, IV],
	outputTopic flow.Topic[OK, OV],
) SingleFunction

func ConvertTopicOneToOneExplode added in v0.0.15

func ConvertTopicOneToOneExplode[IK any, IV any, OK any, OV any](
	source OneToOneExplodeFunction[IK, IV, OK, OV],
	inputTopic flow.Topic[IK, IV],
	outputTopic flow.Topic[OK, OV],
) SingleFunction

func ConvertTopicOneToTwo added in v0.0.15

func ConvertTopicOneToTwo[IK any, IV any, OK1 any, OV1 any, OK2 any, OV2 any](
	source OneToTwoFunction[IK, IV, OK1, OV1, OK2, OV2],
	inputTopic flow.Topic[IK, IV],
	outputTopic1 flow.Topic[OK1, OV1],
	outputTopic2 flow.Topic[OK2, OV2],
) SingleFunction

func NewSingleRetry

func NewSingleRetry(configurations ...runtime.Configuration[*SingleRetry]) SingleFunction

constructor

type SingleRetry

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

implementation

type TopicSwitch added in v0.1.1

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

implementation

func (*TopicSwitch) Apply added in v0.1.1

Jump to

Keyboard shortcuts

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