subscribe

package
v0.0.0-...-87a4e12 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Options)

func DisableAutoPing

func DisableAutoPing() Option

DisableAutoPing disables automatic pinging of events.

func MaxPendingEvents

func MaxPendingEvents(n uint) Option

MaxPendingEvents is the maximum number of events to keep ready for processing.

If not set this defaults to 50.

func WithAutoPingInterval

func WithAutoPingInterval(interval time.Duration) Option

WithAutoPingInterval sets the interval at which events should be pinged.

func WithDefaultRetryBackoff

func WithDefaultRetryBackoff(decider delays.DelayDecider) Option

WithDefaultRetryBackoff sets the default backoff strategy to use when acking, rejecting or pinging an event fails.

type Options

type Options struct {
	MaxPendingEvents uint

	// CallRetryBackoff is the backoff strategy to use when acking, rejecting
	// or pinging an event fails.
	CallRetryBackoff delays.DelayDecider

	// AutoPingInterval is the interval at which events should be pinged.
	// Defaults to zero which will determine the ping interval based on the
	// timeout of the consumer.
	AutoPingInterval time.Duration
}

func (*Options) Apply

func (o *Options) Apply(opts []Option)

Jump to

Keyboard shortcuts

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