flows

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package flows is smtp's Temporal side: the Report workflow an administrator may schedule (the service's only Temporal-needing part; without Temporal it is declared and never runs) and its activity.

Index

Constants

View Source
const Summary = "Summary"

Summary is the registered activity of Report.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flows

type Flows struct {
	deps.Component
	// contains filtered or unexported fields
}

Flows is the component.

func New

func New(parent deps.Scope, st deps.Dependency[*store.Store]) *Flows

New declares Report under parent.

func (*Flows) Report

func (f *Flows) Report(ctx workflow.Context, _ ReportIn) (ReportOut, error)

Report counts the queue and the suppressions and leaves the result as an audit record (event.name smtp.report), so a scheduled run is a periodic line in the installation's history.

type ReportIn

type ReportIn struct{}

ReportIn asks for nothing: the report is of the moment.

type ReportOut

type ReportOut struct {
	Pending      int64 `json:"pending"      schemapb:"description=Deliveries waiting or retrying"`
	Processing   int64 `json:"processing"   schemapb:"description=Deliveries claimed by a relay"`
	Published    int64 `json:"published"    schemapb:"description=Deliveries sent, within retention"`
	Dead         int64 `json:"dead"         schemapb:"description=Deliveries that exhausted their attempts"`
	Discarded    int64 `json:"discarded"    schemapb:"description=Deliveries the relay refused for good"`
	Suppressions int64 `json:"suppressions" schemapb:"description=Active suppressions"`
}

ReportOut is the queue and the suppressions as the report found them.

Jump to

Keyboard shortcuts

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