Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNonListValue = errors.New("cannot map data that isn't an Slice")
ErrNonListValue is returned when a value that is not a list flows through the pipe at Reduce step.
Functions ¶
This section is empty.
Types ¶
type Batcher ¶ added in v1.2.0
type Batcher struct { BatchSize int Timeout time.Duration ItemType reflect.Type // contains filtered or unexported fields }
Batcher is a Pubsub's subscriber pipeline step that accumulates messages in batches. It is useful in situations where there is a bunch of unitary messages that should be grouped to reduce systems internal I/Os, improving its performance and scale capabilities.
type Mapper ¶
type Mapper struct {
MapFn MapFn
}
Mapper is a pipeline step that modifies each record that passes through the pipeline.
type Receiver ¶
type Receiver interface { // Receive calls f with the outstanding messages from the subscription. // It blocks until ctx is done, or the service returns a non-retryable error. Receive(ctx context.Context, f func(context.Context, *pubsub.Message)) error }
Receiver defines something that knows how to receive Pubsub messages just like a Pubsub Subscription would.
type ReduceFn ¶ added in v1.2.0
ReduceFn is the function that aggregates the data that passes through the pipeline into one final state.
type Reducer ¶ added in v1.2.0
type Reducer struct { ReduceFn ReduceFn InitialState func() interface{} // contains filtered or unexported fields }
Reducer is a Pubsub's subscriber pipeline step that aggregates a list of incoming pipe records into one.
type SubscriberReceiver ¶
type SubscriberReceiver struct {
Subscription Receiver
}
SubscriberReceiver is the first step of the pipeline which is responsible for reading the message from pubsub subscription.