logs

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2026 License: LGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const HistoryLines = 200

HistoryLines is the default history replay count on initial connect (capped server-side at 10000 by cardinal-operator).

Variables

This section is empty.

Functions

func TailLogsUntilEnterOrReload

func TailLogsUntilEnterOrReload(
	ctx context.Context,
	openStream StreamFn,
	onReload func(ctx context.Context, purge bool) error,
	extras []logtail.ExtraAction,
) error

TailLogsUntilEnterOrReload runs the interactive tail view against any streamer (operator-mediated shard logs, direct-k8s platform logs, …). Returns when the user presses ENTER or ctx is canceled. On 'r' (reload) or ctrl+r (purge & reload), invokes onReload then re-opens the stream; reload errors are printed, not returned — a failed reload shouldn't end the tail session. onReload nil → reload hotkeys hidden + disabled. extras are the view's in-place actions, offered behind its legend toggle.

Types

type StreamFn

type StreamFn func(ctx context.Context, out chan<- cluster.LogLine) error

StreamFn opens one log stream into out; out is closed by the streamer when the stream ends. Returns when the stream terminates or ctx is canceled.

Jump to

Keyboard shortcuts

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