dispatch

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package dispatch turns matched destinations into queued deliveries. It is shared by the ingest path and by replay.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Enqueue

func Enqueue(ctx context.Context, store Enqueuer, event core.Event, isReplay bool, now time.Time) (int, error)

Enqueue resolves the event to its source's destinations and queues an immediately-due delivery for each. It returns the number of deliveries queued.

func EnqueueOne

func EnqueueOne(ctx context.Context, store Enqueuer, event core.Event, dest core.Destination, isReplay bool, now time.Time) (int, error)

EnqueueOne queues a delivery for a single destination, applying its filter. It is used by replay targeting a specific destination.

Types

type Enqueuer

type Enqueuer interface {
	ListDestinations(ctx context.Context, source string) ([]core.Destination, error)
	Enqueue(ctx context.Context, p core.PendingDelivery) error
}

Enqueuer is the slice of storage needed to queue deliveries.

Jump to

Keyboard shortcuts

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