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 ¶
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.
Click to show internal directories.
Click to hide internal directories.