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 run logs, either for a stack or a module.
It's a single use object, which should be thrown away after use.
func NewModuleExplorer ¶ added in v1.25.0
NewModuleExplorer creates a new Explorer for a run belonging to a module. By default the explorer always tails the logs.
func NewStackExplorer ¶ added in v1.25.0
NewStackExplorer creates a new Explorer for a run belonging to a stack. 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