ateomstatstest

package
v0.4.0 Latest Latest
Warning

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

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

Documentation

Overview

Package ateomstatstest records the usage records an ateom writes, for tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Recorder

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

Recorder is a stdout handler that keeps the kind and source of each record.

func NewEmitter

func NewEmitter() (*ateomstats.UsageEmitter, *Recorder)

NewEmitter returns an emitter that writes every record to a new Recorder.

func (*Recorder) Enabled

func (r *Recorder) Enabled(context.Context, slog.Level) bool

func (*Recorder) Handle

func (r *Recorder) Handle(_ context.Context, rec slog.Record) error

func (*Recorder) Kinds

func (r *Recorder) Kinds() []string

Kinds is the ate.stats.kind of each record, in order.

func (*Recorder) Sources

func (r *Recorder) Sources() []string

Sources is the ate.stats.source of each record, in order.

func (*Recorder) WithAttrs

func (r *Recorder) WithAttrs([]slog.Attr) slog.Handler

func (*Recorder) WithGroup

func (r *Recorder) WithGroup(string) slog.Handler

Jump to

Keyboard shortcuts

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