weblog

package
v0.1.32 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: MIT Imports: 9 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 weblog records bounded, allow-listed Web authentication and server startup evidence in the master directory.

Index

Constants

View Source
const (
	FileName        = "web-events.jsonl"
	RotatedFileName = "web-events.jsonl.1"
)

Variables

This section is empty.

Functions

func Path

func Path(masterDir string) string

Path returns the current event log path under masterDir.

Types

type Recorder

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

Recorder queues records so filesystem latency and errors never change a Web response. Close flushes records already accepted into the queue.

func New

func New(masterDir, command string, warning io.Writer) *Recorder

New starts a recorder for command under masterDir.

func (*Recorder) Close

func (recorder *Recorder) Close()

Close flushes queued records and stops the writer.

func (*Recorder) RecordAuthEvent

func (recorder *Recorder) RecordAuthEvent(event webui.AuthEvent)

RecordAuthEvent implements webui.AuthRecorder.

func (*Recorder) RecordServerStart

func (recorder *Recorder) RecordServerStart(start Start)

RecordServerStart records a listener that is ready to serve.

type Start

type Start struct {
	Version                string
	ExecutableSHA256       string
	ExecutableModified     time.Time
	Host                   string
	Port                   int
	Auth                   string
	AllowExec              bool
	AllowTerminal          bool
	AllowControl           bool
	Notifications          bool
	ArtifactRootCount      int
	RegisteredBaseDirCount int
}

Start describes the allow-listed facts recorded once a listener is up.

Jump to

Keyboard shortcuts

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