audit

package
v0.6.123 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package audit reacts to the service's own Greeted event: a reactor is a durable consumer, so it sees every greeting of every instance, once each (it is idempotent under redelivery).

Index

Constants

View Source
const Consumer = "hello-greeted-audit"

Consumer is the reactor's pinned consumer name: moving or renaming the component keeps the consumer and its position on the stream.

Variables

View Source
var ErrNoName = errors.New("audit: greeted without a name")

ErrNoName: a Greeted without a name; no retry fixes it.

Functions

This section is empty.

Types

type Audit

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

Audit counts greetings per name as they come off the stream.

func New

func New(parent deps.Scope, greeted event.Ref[greeter.Greeted]) *Audit

New creates the audit under parent and subscribes it to greeted.

func (*Audit) Count

func (a *Audit) Count(name string) uint64

Count is how many greetings of name were audited.

func (*Audit) Total

func (a *Audit) Total() uint64

Total is how many greetings were audited.

Jump to

Keyboard shortcuts

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