impl

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2025 License: LGPL-2.1, LGPL-2.1-or-later Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRedisStreamClient

func NewRedisStreamClient(redisClient redis.UniversalClient, serviceName string) types.RedisStreamClient

NewRedisStreamClient creates a new RedisStreamClient

This function creates a new RedisStreamClient with the given redis client and stream name Stream is the name of the stream to read from where actual data is transmitted

Types

type RecoverableRedisStreamClient

type RecoverableRedisStreamClient struct {
	// contains filtered or unexported fields
}

RecoverableRedisStreamClient is an implementation of the RedisStreamClient interface

func (*RecoverableRedisStreamClient) Claim

func (r *RecoverableRedisStreamClient) Claim(ctx context.Context, mutexKey string) error

Claim claims pending messages from a stream

func (*RecoverableRedisStreamClient) Done

Done marks the end of processing for a client

func (*RecoverableRedisStreamClient) ID

ID returns the consumer name that uniquely identifies the consumer

func (*RecoverableRedisStreamClient) Init

Init initializes the RedisStreamClient

This function initializes the RedisStreamClient by enabling keyspace notifications for expired events, subscribing to expired events, and starting a blocking read on the LBS stream Returns a channel to read messages from the LBS stream. The client should read from this channel and process the messages. Returns a channel to read keyspace notifications. The client should read from this channel and process the notifications.

Jump to

Keyboard shortcuts

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