idempotencylog

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package idempotencylog adapts bounded idempotency observations to log/slog. Loggers constructed by github.com/faustbrian/go-log use this standard type.

Index

Constants

This section is empty.

Variables

View Source
var ErrNilLogger = errors.New("idempotencylog: nil logger")

ErrNilLogger reports an unusable logger configuration.

Functions

This section is empty.

Types

type Observer

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

Observer writes bounded semantic transition fields to a slog logger.

func New

func New(logger *slog.Logger) (*Observer, error)

New constructs an observer for a standard slog logger, including loggers returned by github.com/faustbrian/go-log.

func (*Observer) Observe

func (observer *Observer) Observe(ctx context.Context, event idempotency.Observation)

Observe writes one bounded transition record. Correlation is intended only for restricted logs and is never an unhashed logical idempotency key.

Jump to

Keyboard shortcuts

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