Versions in this module Expand all Collapse all v0 v0.2.1 Jul 24, 2026 Changes in this version + func RunDeliveries(ctx context.Context, opts RunOptions) error + func SeededRng(seed uint32) core.Rng + type MemoryScheduler struct + func NewMemoryScheduler(transport *MemoryTransport, clock *TestClock) *MemoryScheduler + func (s *MemoryScheduler) Advance(ctx context.Context) (int, error) + func (s *MemoryScheduler) NextDueAt() (int64, bool) + func (s *MemoryScheduler) ScheduleRetry(_ context.Context, m core.Message, at int64) error + func (s *MemoryScheduler) Size() int + type MemoryStateStore struct + func NewMemoryStateStore(clock core.Clock) *MemoryStateStore + func (s *MemoryStateStore) AddToDlq(_ context.Context, m core.Message, reason core.DlqReason) error + func (s *MemoryStateStore) AppendAttempt(_ context.Context, a core.Attempt) error + func (s *MemoryStateStore) CreateEndpoint(_ context.Context, in core.CreateEndpointInput) (core.CreateEndpointResult, error) + func (s *MemoryStateStore) DeleteEndpoint(_ context.Context, tenant, endpointID string) error + func (s *MemoryStateStore) FinalizeEvent(_ context.Context, tenant, idemKey, eventID string, messageCount int) error + func (s *MemoryStateStore) GetCircuit(_ context.Context, tenant, endpointID string) (core.CircuitRecord, error) + func (s *MemoryStateStore) GetEndpoint(_ context.Context, tenant, endpointID string) (*core.Endpoint, error) + func (s *MemoryStateStore) GetMessage(_ context.Context, tenant, messageID string) (*core.Message, error) + func (s *MemoryStateStore) GetRateBucket(_ context.Context, tenant, endpointID string) (*core.RateBucket, error) + func (s *MemoryStateStore) ListDeliveries(_ context.Context, q core.DeliveryQuery) ([]core.DeliveryRow, error) + func (s *MemoryStateStore) ListDlq(_ context.Context, tenant, endpointID string) ([]core.DlqEntry, error) + func (s *MemoryStateStore) ListEndpoints(_ context.Context, tenant string) ([]core.Endpoint, error) + func (s *MemoryStateStore) MatchEndpoints(_ context.Context, tenant, eventType string) ([]core.Endpoint, error) + func (s *MemoryStateStore) PutCircuit(_ context.Context, tenant, endpointID string, rec core.CircuitRecord) error + func (s *MemoryStateStore) PutMessage(_ context.Context, m core.Message) error + func (s *MemoryStateStore) PutRateBucket(_ context.Context, tenant, endpointID string, bucket core.RateBucket) error + func (s *MemoryStateStore) RecordEvent(_ context.Context, tenant, eventID, idemKey string) (core.EventRecordResult, error) + func (s *MemoryStateStore) RotateSecret(_ context.Context, tenant, endpointID string) (string, error) + func (s *MemoryStateStore) UpdateEndpoint(_ context.Context, tenant, endpointID string, patch core.UpdateEndpointPatch) (core.Endpoint, error) + type MemoryTransport struct + func NewMemoryTransport() *MemoryTransport + func (t *MemoryTransport) Drain(ctx context.Context) (int, error) + func (t *MemoryTransport) Send(_ context.Context, m core.Message) error + func (t *MemoryTransport) Size() int + func (t *MemoryTransport) Subscribe(_ context.Context, handler func(ctx context.Context, m core.Message) error) error + type MockReceiver struct + Calls []RecordedCall + Default Script + func NewMockReceiver(clock core.Clock) *MockReceiver + func (r *MockReceiver) CallCount(url string) int + func (r *MockReceiver) On(url string, script Script) *MockReceiver + func (r *MockReceiver) Post(_ context.Context, url string, body string, headers map[string]string, ...) core.HTTPResult + type RecordedCall struct + Body string + Headers map[string]string + Ts int64 + URL string + type RunOptions struct + Clock *TestClock + MaxRounds int + Scheduler *MemoryScheduler + Transport *MemoryTransport + type Script struct + Kind ScriptKind + Ms int64 + N int + Status int + func ReceiverFailThenOK(n int) Script + func ReceiverNetwork() Script + func ReceiverOK() Script + func ReceiverPermanent(status int) Script + func ReceiverSlow(ms int64) Script + func ReceiverTimeout() Script + type ScriptKind int + const ScriptFailThenOK + const ScriptNetwork + const ScriptOK + const ScriptPermanent + const ScriptSlow + const ScriptTimeout + type TestClock struct + func NewTestClock(start int64) *TestClock + func (c *TestClock) Now() int64 + func (c *TestClock) Set(ms int64) int64 + func (c *TestClock) Tick(ms int64) int64