stateless

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2023 License: GPL-3.0 Imports: 11 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 message.Message[message.Bytes, message.Bytes]) (string, error)

func WithBatchIterateProducerPrometheus added in v0.1.0

func WithBatchIterateProducerPrometheus() runtime.Configuration[*ProducerBatchIterateFunction]

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 message.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 WithTopicSwitchStatelessSingleFunction added in v0.1.1

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

configuration

Types

type BatchFunction

func NewBatchRetry

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

constructor

func NewProducerBatchFunction

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

constructor

func NewProducerBatchIterateFunction

func NewProducerBatchIterateFunction(configurations ...runtime.Configuration[*ProducerBatchIterateFunction]) BatchFunction

constructor

func NewTopicSwitch added in v0.1.1

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

constructor

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, message.Message[IK, IV]) ([]message.Message[OK, OV], error)

type OneToOneFunction

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

type OneToTwoFunction

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

type ProducerBatchIterateFunction

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

implementation

func (*ProducerBatchIterateFunction) Apply

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 topic.Topic[IK, IV],
	outputTopic topic.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 topic.Topic[IK, IV],
	outputTopic topic.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 topic.Topic[IK, IV],
	outputTopic1 topic.Topic[OK1, OV1],
	outputTopic2 topic.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