Documentation
¶
Index ¶
- func RunConsumer[T any](ctx context.Context, subscriber Subscriber[T], consumer Consumer[T], ...) error
- type Consumer
- type PubSub
- func (p *PubSub[T]) Channel() string
- func (p *PubSub[T]) Collect(ch chan<- prometheus.Metric)
- func (p *PubSub[T]) Describe(ch chan<- *prometheus.Desc)
- func (p *PubSub[T]) Ping(ctx context.Context) error
- func (p *PubSub[T]) Publish(ctx context.Context, message T) error
- func (p *PubSub[T]) Subscribe(ctx context.Context) Subscription[T]
- func (p *PubSub[T]) SubscribeWithCallback(ctx context.Context, f func(context.Context, T))
- type Subscriber
- type Subscription
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunConsumer ¶
Types ¶
type PubSub ¶
type PubSub[T any] struct { // contains filtered or unexported fields }
func (*PubSub[T]) Collect ¶
func (p *PubSub[T]) Collect(ch chan<- prometheus.Metric)
func (*PubSub[T]) Describe ¶
func (p *PubSub[T]) Describe(ch chan<- *prometheus.Desc)
type Subscriber ¶
type Subscription ¶
Click to show internal directories.
Click to hide internal directories.