Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisStreamClient ¶
type RedisStreamClient interface {
// ID returns consumerID which uniquely identifies the consumer
ID() string
// Init Initialize the client
//
// Returns the load balanced stream (LBS) channel. This channel should be used by consumers
// to find out which new data stream has been added for processing. Equivalent to kafka's topic.
// the key space notifications (ksp) channel. This channel should be used by consumers
// to find out if any of the streams has expired. All notifications will come to kspchan.
// error if there is any in initialization
Init(ctx context.Context) (outputChan <-chan notifs.RecoverableRedisNotification, err error)
// Claim allows for a consumer to claim data stream from another failed consumer
//
// should be called once a consumer receives a message on kspchan
Claim(ctx context.Context, kspNotification notifs.LBSInfo) error
// Done marks the end of processing the stream
//
// should be called when consumer is shutting down and is not expected to be called again.
Done() error
// DoneStream marks end of processing for a particular stream
//
// should be called when consumer is done processing a particular data stream.
DoneStream(ctx context.Context, dataStreamName string) error
}
RedisStreamClient is an interface for a Redis Stream client This is the main interface for the Redis Stream client
Click to show internal directories.
Click to hide internal directories.