runnerlog

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2026 License: MIT Imports: 13 Imported by: ? 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 runnerlog collects, redacts, archives, and expires runner logs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Archive

func Archive(logRoot string, run Run, secret *logreduct.Redactor) error

Archive durably publishes allowed logs, or verifies an already published archive on retry without reopening its previously synced log files.

Types

type Expiration

type Expiration struct {
	Path   string
	Action string
	Error  string
}

Expiration reports an expired archive or a retained invalid archive.

func Expire

func Expire(ctx context.Context, logRoot string, retention time.Duration, dryRun bool) ([]Expiration, error)

Expire removes only completed archives older than retention. Results collected before cancellation or an error are returned to the caller.

type Metadata

type Metadata struct {
	RunID      string    `json:"runId"`
	TargetID   string    `json:"targetId"`
	Scope      string    `json:"scope"`
	ArchivedAt time.Time `json:"archivedAt"`
}

Metadata identifies a published archive and its retention age.

type Output

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

Output collects complete lines before masking secrets and detecting readiness. Close flushes a final partial line, syncs the file, and closes it.

func NewOutput

func NewOutput(file *os.File, secrets *logreduct.Redactor, ready func()) *Output

NewOutput takes ownership of file. It calls ready, if non-nil, at most once when a complete, non-omitted line contains the runner readiness message.

func (*Output) Close

func (w *Output) Close() error

func (*Output) Write

func (w *Output) Write(data []byte) (int, error)

type Run

type Run struct {
	RunID     string
	TargetID  string
	Scope     string
	RunnerDir string
}

Run identifies the execution whose allowed logs will be archived.

Jump to

Keyboard shortcuts

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