dispatch

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fanout

type Fanout struct {
	Notifiers []delivery.Notifier

	InitialBackoff time.Duration
	MaxBackoff     time.Duration
	// contains filtered or unexported fields
}

Fanout sends each notification event to every configured notifier.

func New

func New(notifiers []delivery.Notifier) *Fanout

New creates a stateful fan-out notifier.

func (*Fanout) NotificationStatus

func (f *Fanout) NotificationStatus() delivery.Status

NotificationStatus returns aggregate and per-target delivery state.

func (*Fanout) Notify

func (f *Fanout) Notify(ctx context.Context, event monitor.Event) error

Notify sends the event to every not-yet-delivered notifier and joins any errors.

type None

type None struct{}

None is a notifier that intentionally sends nothing.

func (None) NotificationStatus

func (None) NotificationStatus() delivery.Status

NotificationStatus reports an idle notification state.

func (None) Notify

Notify implements delivery.Notifier without sending a delivery.

type RetryError

type RetryError struct {
	Err       error
	RetryWait time.Duration
	Delivered int
	Failed    int
	Pending   int
}

RetryError wraps notification failures and tells the scheduler when to retry.

func (*RetryError) Error

func (e *RetryError) Error() string

Error returns the wrapped error string.

func (*RetryError) NotificationStats

func (e *RetryError) NotificationStats() (delivered, failed, pending int)

NotificationStats returns retry batch stats.

func (*RetryError) RetryAfter

func (e *RetryError) RetryAfter() time.Duration

RetryAfter returns the delay before the next retry attempt.

func (*RetryError) Unwrap

func (e *RetryError) Unwrap() error

Unwrap returns the wrapped error.

Jump to

Keyboard shortcuts

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