Documentation
¶
Index ¶
- func NewQueueLimit(ctx context.Context, rdb *redis.Client, queueName string, limit int64, ...) func(in any) bool
- func NewRedis(ctx context.Context, cfg *model.Config) *redis.Client
- func NewRedisConsumerGroupSource[T any](ctx context.Context, rdb *redis.Client, streamName string, groupName string, ...) streams.Source
- func NewRedisStreamSink[T any](ctx context.Context, rdb *redis.Client, streamName string) streams.Sink
- func SetupTestRedis(t *testing.T) (*miniredis.Miniredis, *redis.Client, *model.Config)
- type RedisGtrsClient
- func (rx *RedisGtrsClient[T, R]) Close()
- func (rx *RedisGtrsClient[T, R]) Connect(ctx context.Context) error
- func (c *RedisGtrsClient[T, R]) ReceiveResponse(ctx context.Context, corrID string, timeout time.Duration) (R, error)
- func (rx *RedisGtrsClient[T, R]) ReceiveStefan(ctx context.Context, groupName, consumerName, mode string, ...) error
- func (c *RedisGtrsClient[T, R]) RequestReply(ctx context.Context, payload T) (R, error)
- func (c *RedisGtrsClient[T, R]) SendRequest(ctx context.Context, payload T) (error, string)
- type RedisGtrsServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewQueueLimit ¶
func NewRedisStreamSink ¶
Types ¶
type RedisGtrsClient ¶
func NewRedisGtrsClient ¶
func NewRedisGtrsClientStefan ¶
func NewRedisGtrsClientStefan[T any, R any](ctx context.Context, redisEndpoint, streamName string) (*RedisGtrsClient[T, R], error)
NEW: Stefan
func (*RedisGtrsClient[T, R]) Connect ¶
func (rx *RedisGtrsClient[T, R]) Connect(ctx context.Context) error
NEW: Stefan
func (*RedisGtrsClient[T, R]) ReceiveResponse ¶
func (*RedisGtrsClient[T, R]) ReceiveStefan ¶
func (rx *RedisGtrsClient[T, R]) ReceiveStefan(ctx context.Context, groupName, consumerName, mode string, handlerFunc func(gtrs.Message[T]) error) error
NEW: Stefan
func (*RedisGtrsClient[T, R]) RequestReply ¶
func (c *RedisGtrsClient[T, R]) RequestReply(ctx context.Context, payload T) (R, error)
TODO: As simple consumer doesn't do ACK reply queue might fillup and cause long read on client side. It should start waiting for response and read only new messages
func (*RedisGtrsClient[T, R]) SendRequest ¶
func (c *RedisGtrsClient[T, R]) SendRequest(ctx context.Context, payload T) (error, string)
type RedisGtrsServer ¶
func NewRedisGtrsServer ¶
func (*RedisGtrsServer[T, R]) ProcessRequest ¶
func (c *RedisGtrsServer[T, R]) ProcessRequest(ctx context.Context, handler func(T) R)
Click to show internal directories.
Click to hide internal directories.