Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionOnRunState ¶
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 ¶
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 WithTargetPhase ¶
WithTargetPhase sets the target phase to filter logs
Click to show internal directories.
Click to hide internal directories.