Documentation ¶
Index ¶
- func NewMergeStep(manager conversation.Manager, prepend bool) steps.Step[string, conversation.Conversation]
- type BackgroundLambdaStep
- func (r *BackgroundLambdaStep[Input, Output]) AddPublishedTopic(publisher message.Publisher, topic string) error
- func (l *BackgroundLambdaStep[Input, Output]) Close(ctx context.Context) error
- func (l *BackgroundLambdaStep[Input, Output]) Start(ctx context.Context, input Input) (steps.StepResult[Output], error)
- type BackgroundMapLambdaStep
- type ChainStep
- type LambdaStep
- type LoggerStep
- type MapLambdaStep
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMergeStep ¶ added in v0.2.24
func NewMergeStep(manager conversation.Manager, prepend bool) steps.Step[string, conversation.Conversation]
Types ¶
type BackgroundLambdaStep ¶
type BackgroundLambdaStep[Input any, Output any] struct { Function func(context.Context, Input) helpers.Result[Output] // contains filtered or unexported fields }
BackgroundLambdaStep is a struct that wraps a function to be used as a step in a pipeline. The function takes a context and an input, and returns a Result. The function is executed in a separate goroutine.
func (*BackgroundLambdaStep[Input, Output]) AddPublishedTopic ¶ added in v0.4.1
func (r *BackgroundLambdaStep[Input, Output]) AddPublishedTopic(publisher message.Publisher, topic string) error
func (*BackgroundLambdaStep[Input, Output]) Close ¶
func (l *BackgroundLambdaStep[Input, Output]) Close(ctx context.Context) error
func (*BackgroundLambdaStep[Input, Output]) Start ¶
func (l *BackgroundLambdaStep[Input, Output]) Start(ctx context.Context, input Input) (steps.StepResult[Output], error)
type BackgroundMapLambdaStep ¶
type BackgroundMapLambdaStep[Input any, Output any] struct { Function func(context.Context, Input) helpers.Result[Output] // contains filtered or unexported fields }
BackgroundMapLambdaStep is a struct that wraps a function to be used as a step in a pipeline. The function takes a context and an input, and returns a Result. The function is applied to each element of an input slice in a separate goroutine.
func (*BackgroundMapLambdaStep[Input, Output]) AddPublishedTopic ¶ added in v0.4.1
func (r *BackgroundMapLambdaStep[Input, Output]) AddPublishedTopic(publisher message.Publisher, topic string) error
func (*BackgroundMapLambdaStep[Input, Output]) Start ¶
func (l *BackgroundMapLambdaStep[Input, Output]) Start(ctx context.Context, input []Input) (steps.StepResult[Output], error)
type ChainStep ¶ added in v0.4.1
type ChainStep[T any, U any, V any] struct { StepFactoryA steps.StepFactory[T, U] StepFactoryB steps.StepFactory[U, V] }
func (*ChainStep[T, U, V]) AddPublishedTopic ¶ added in v0.4.1
type LambdaStep ¶
LambdaStep is a struct that wraps a function to be used as a step in a pipeline. The function takes an input and returns a Result.
func (*LambdaStep[Input, Output]) AddPublishedTopic ¶ added in v0.4.1
func (r *LambdaStep[Input, Output]) AddPublishedTopic(publisher message.Publisher, topic string) error
func (*LambdaStep[Input, Output]) Start ¶
func (l *LambdaStep[Input, Output]) Start(ctx context.Context, input Input) (steps.StepResult[Output], error)
type LoggerStep ¶ added in v0.2.24
type LoggerStep[T any] struct{}
LoggerStep is a step that logs its input to stdout.
func (*LoggerStep[T]) AddPublishedTopic ¶ added in v0.4.1
func (r *LoggerStep[T]) AddPublishedTopic(publisher message.Publisher, topic string) error
func (*LoggerStep[T]) Start ¶ added in v0.2.24
func (ls *LoggerStep[T]) Start(ctx context.Context, input T) (steps.StepResult[T], error)
Start implements the Step interface for LoggerStep. It prints the input to stdout and returns a StepResult with the same value.
type MapLambdaStep ¶
MapLambdaStep is a struct that wraps a function to be used as a step in a pipeline. The function takes an input and returns a Result. The function is applied to each element of an input slice.
func (*MapLambdaStep[Input, Output]) AddPublishedTopic ¶ added in v0.4.1
func (r *MapLambdaStep[Input, Output]) AddPublishedTopic(publisher message.Publisher, topic string) error
func (*MapLambdaStep[Input, Output]) Start ¶
func (l *MapLambdaStep[Input, Output]) Start(ctx context.Context, input []Input) (steps.StepResult[Output], error)