logs

package
v1.18.2 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionOnRunState

type ActionOnRunState func(state structs.RunState, stackID, runID string) error

type Explorer

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

Explorer allows you to explore stack run logs.

It's a single use object, which should be thrown away after use.

func NewExplorer

func NewExplorer(stack, run string, opts ...Option) *Explorer

NewExplorer creates a new Explorer with the given options. By default the explorer always tails the logs.

func (*Explorer) RunFilteredLogs

func (e *Explorer) RunFilteredLogs(ctx context.Context) (terminal *structs.RunStateTransition, err error)

RunFilteredLogs runs the explorer, printing filtered logs to stdout.

func (*Explorer) RunFilteredStates

func (e *Explorer) RunFilteredStates(ctx context.Context, sink chan<- string) (*structs.RunStateTransition, error)

RunFilteredStates runs the explorer, sending filtered logs to the given sink channel.

Usually you want to use RunFilteredLogs instead.

type Option

type Option func(*Explorer)

Option is a functional option for configuring an Explorer

func WithActionOnRunState

func WithActionOnRunState(acFn ActionOnRunState) Option

WithActionOnRunState sets an action to be executed on each run state

func WithTail

func WithTail(tail bool) Option

WithTail sets whether to tail the logs

func WithTargetPhase

func WithTargetPhase(phase *structs.RunState) Option

WithTargetPhase sets the target phase to filter logs

Jump to

Keyboard shortcuts

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