Help us shape the future of Go! Take the 2026 Go Developer Survey

authlog

package
v3.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package authlog provides the legacy bounded authorization slog adapter.

Deprecated: use github.com/faustbrian/go-authorization/v3/adapters/slog. This package remains supported for the longer of 180 days after successor public availability and two subsequently published stable root-module minor releases.

Index

Constants

This section is empty.

Variables

View Source
var ErrNilLogger = adapter.ErrNilLogger

ErrNilLogger preserves the direct adapter error identity for errors.Is.

Functions

This section is empty.

Types

type Instrumenter

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

Instrumenter retains the released logger/level layout and borrows sink lifecycle.

func New

func New(logger *slog.Logger, level slog.Level) (*Instrumenter, error)

New borrows a non-nil logger/handler and constructs no worker or shutdown.

func (*Instrumenter) Begin

func (instrumenter *Instrumenter) Begin(
	ctx context.Context,
) (context.Context, func(authorization.Event))

Begin starts one bounded authorization audit observation.

func (*Instrumenter) Start

func (instrumenter *Instrumenter) Start(
	ctx context.Context,
) (context.Context, func(authorization.Event))

Start delegates to the repeatable Begin log callback.

Jump to

Keyboard shortcuts

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