Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewV2BatchedToV1Processor ¶
NewV2BatchedToV1Processor wraps a processor.V2Batched with a struct that implements types.Processor.
Types ¶
type V2 ¶
type V2 interface {
// Process a message into one or more resulting messages, or return an error
// if the message could not be processed. If zero messages are returned and
// the error is nil then the message is filtered.
Process(ctx context.Context, p types.Part) ([]types.Part, error)
// Close the component, blocks until either the underlying resources are
// cleaned up or the context is cancelled. Returns an error if the context
// is cancelled.
Close(ctx context.Context) error
}
V2 is a simpler interface to implement than types.Processor.
type V2Batched ¶
type V2Batched interface {
// Process a batch of messages into one or more resulting batches, or return
// an error if the entire batch could not be processed. If zero messages are
// returned and the error is nil then all messages are filtered.
ProcessBatch(ctx context.Context, p []types.Part) ([][]types.Part, error)
// Close the component, blocks until either the underlying resources are
// cleaned up or the context is cancelled. Returns an error if the context
// is cancelled.
Close(ctx context.Context) error
}
V2Batched is a simpler interface to implement than types.Processor and allows batch-wide processing.
Click to show internal directories.
Click to hide internal directories.