Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Helper ¶
type Helper[T any] struct { // contains filtered or unexported fields }
Helper assists in creating event handlers for Pub/Sub with multiple topics.
type Options ¶
type Options struct { Subscriptions []string Concurrency int64 // Max concurrent workers Backoff bool // Enable backoff BackoffBase time.Duration // Base backoff duration MaxBackoff time.Duration // Max backoff duration RetryLimit int // Limit retries, -1 for infinite retries }
Options can be used to create customized handler.
func DefaultOptions ¶
DefaultOptions returns options based in config.
type Subscriber ¶
type Subscriber[T any] struct { // contains filtered or unexported fields }
Subscriber contains the Pub/Sub client, handler function, and options
func NewSubscriber ¶
func NewSubscriber[T any](client *pubsub.Client, handler function.Handler[T], subscription string, options *Options) *Subscriber[T]
NewSubscriber returns a subscriber listener.
Click to show internal directories.
Click to hide internal directories.