auditlogs

package
v1.28.2 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: Apache-2.0 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SplitPayloadRecords

func SplitPayloadRecords(payload []byte) [][]byte

SplitPayloadRecords splits a payload into newline-delimited records. Empty or whitespace-only lines are discarded.

func WriteState

func WriteState(path string, value any) error

WriteState writes listener metadata atomically.

Types

type Paths

type Paths struct {
	BaseDir              string `json:"base_dir"`
	EventsFile           string `json:"events_file"`
	ListenerStateFile    string `json:"listener_state_file"`
	DestinationStateFile string `json:"destination_state_file"`
}

Paths contains filesystem locations used by audit-log commands.

func ResolvePaths

func ResolvePaths(profile string) (Paths, error)

ResolvePaths returns profile-scoped storage locations for audit logs.

type Store

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

Store appends audit-log events to a JSONL file.

func NewStore

func NewStore(path string) *Store

NewStore creates a JSONL event store at the provided path.

func (*Store) Append

func (s *Store) Append(payload []byte) (int, error)

Append writes one or more payload records as JSONL lines. The payload is split into newline-delimited records, blank lines are ignored.

func (*Store) AppendRecords

func (s *Store) AppendRecords(records [][]byte) (int, error)

AppendRecords writes pre-split payload records as JSONL lines.

func (*Store) Path

func (s *Store) Path() string

Path returns the configured output path.

Jump to

Keyboard shortcuts

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