Documentation
¶
Overview ¶
Package redis provides a Redis implementation of the bus.
Index ¶
- type Bus
- func (b *Bus[T]) Close() error
- func (b *Bus[T]) Publish(ctx context.Context, topic string, msg T) error
- func (b *Bus[T]) Subscribe(ctx context.Context, topic string, handler func(T)) (unsubscribe func())
- func (b *Bus[T]) SubscribeOnce(ctx context.Context, topic string, handler func(T)) (unsubscribe func())
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bus ¶
type Bus[T any] struct { // contains filtered or unexported fields }
Bus is a Redis-backed implementation of the Bus interface.
func NewWithClient ¶
NewWithClient creates a new RedisBus with an existing Redis client.
Click to show internal directories.
Click to hide internal directories.