auditlogs

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

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