types

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2025 License: LGPL-2.1, LGPL-2.1-or-later Imports: 2 Imported by: 0

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[any], 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 string) 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL