Help us shape the future of Go! Take the 2026 Go Developer Survey

notify

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Overview

SPDX-License-Identifier: Apache-2.0 Copyright 2026 The Karakoram Authors

SPDX-License-Identifier: Apache-2.0 Copyright 2026 The Karakoram Authors

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Classify

func Classify(event domain.Event, operation *domain.Operation) domain.NotificationCategory

Classify uses durable reasons and operation targets, never message parsing.

func Matches

func Matches(channel domain.NotificationChannel, event domain.Event, category domain.NotificationCategory) bool

func Prepare

Prepare validates configuration and retains omitted secrets only for unchanged destinations. previous, when supplied, must include explicitly loaded plaintext secrets.

func ValidateDestination

func ValidateDestination(channel domain.NotificationChannel) error

Types

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

func New

func New(options Options) *Engine

func (*Engine) DeliverDue

func (e *Engine) DeliverDue(ctx context.Context, name string) error

DeliverDue processes a bounded batch sequentially for one channel. Run ensures only one worker owns each channel, while independent destinations run in parallel.

func (*Engine) Drain

func (e *Engine) Drain(ctx context.Context) error

Drain fills the outbox before advancing the durable cursor, page by page.

func (*Engine) Run

func (e *Engine) Run(ctx context.Context) error

type Options

type Options struct {
	Store  *store.Store
	Hub    *events.Hub
	Sender DeliverySender
	Now    func() time.Time
	// Ticks allows deterministic periodic-drain tests. Nil uses a 15 second ticker.
	Ticks <-chan time.Time
}

type Sender

type Sender struct {
	// contains filtered or unexported fields
}

Sender delivers notifications using the operator's outbound policy. Test-only trust roots and clocks remain private; production always uses system roots.

func NewSender

func NewSender() *Sender

func (*Sender) Send

Jump to

Keyboard shortcuts

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