Versions in this module Expand all Collapse all v0 v0.1.0 Aug 28, 2026 Changes in this version + const OutcomeDelivered + const OutcomeDeliveredUnrecorded + const OutcomeFailedPermanent + const OutcomeRetryableFailure + const OutcomeUnknown + var ErrDestinationImplementationMissing = errors.New("dispatcher destination implementation missing") + var ErrInvalidDestinationBinding = errors.New("invalid destination binding") + var ErrInvalidDispatcherConfig = errors.New("invalid dispatcher configuration") + var ErrPermanent = core.ErrPermanent + var ErrQuarantine = core.ErrQuarantine + var ErrRetryable = core.ErrRetryable + var ErrStoreBusy = core.ErrStoreBusy + var ErrStoreInvalidTransition = core.ErrStoreInvalidTransition + var ErrStorePayloadConflict = core.ErrStorePayloadConflict + var ErrStoreStaleLeaseToken = core.ErrStoreStaleLeaseToken + var ErrStoreUnavailable = core.ErrStoreUnavailable + var ErrStoreWorkDoesntExist = core.ErrStoreWorkDoesntExist + type Destination interface + ID func() core.DestinationID + Send func(ctx context.Context, batch []T) error + type Dispatcher struct + func NewDispatcher[T any](store Store[T], config DispatcherConfig, destinations ...Destination[T]) (*Dispatcher[T], error) + func (d *Dispatcher[T]) Enqueue(ctx context.Context, items ...Item[T]) error + func (d *Dispatcher[T]) Run(ctx context.Context) (Report, error) + func (d *Dispatcher[T]) Start(ctx context.Context, interval time.Duration, onCycle func(Report, error)) (wait func(context.Context) error) + type DispatcherConfig struct + AttemptLimit int + AttemptTimeout time.Duration + DisableJitter bool + FirstSuccess bool + InitialBackoff time.Duration + JitterPercent int + MaxItemsPerWork int + PersistFailureDetail bool + ProbeTimeout time.Duration + ProbeWorkers int + ResolveTimeout time.Duration + SkipProbing bool + Workers int + type Item = core.Item[T] + type Outcome = core.Outcome + type Prober = core.Prober + type Report struct + Results []result + type Store = core.Store[T]