explain

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2016 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Overview

Package explain contains explainers that are used for processing an incoming stream, and explaining the events that are found in it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnsibleEventExplainer

type AnsibleEventExplainer interface {
	ExplainEvent(e ansible.Event, verbose bool) string
}

AnsibleEventExplainer explains a single event

type AnsibleEventStreamExplainer

type AnsibleEventStreamExplainer struct {
	// Out is the destination where the explanations are written
	Out io.Writer
	// Verbose is used to control the output level
	Verbose bool
	// EventExplainer for processing ansible events
	EventExplainer AnsibleEventExplainer
}

AnsibleEventStreamExplainer explains the incoming ansible event stream

func (*AnsibleEventStreamExplainer) Explain

func (e *AnsibleEventStreamExplainer) Explain(events <-chan ansible.Event) error

Explain the incoming ansible event stream

type DefaultEventExplainer

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

DefaultEventExplainer returns the default string explanation of a given event

func (*DefaultEventExplainer) ExplainEvent

func (explainer *DefaultEventExplainer) ExplainEvent(e ansible.Event, verbose bool) string

ExplainEvent returns an explanation for the given event

type PreflightEventExplainer

type PreflightEventExplainer struct {
	DefaultExplainer *DefaultEventExplainer
}

PreflightEventExplainer explains the Ansible events that run when doing the preflight checks

func (*PreflightEventExplainer) ExplainEvent

func (explainer *PreflightEventExplainer) ExplainEvent(e ansible.Event, verbose bool) string

ExplainEvent explains the pre-flight check error events, while delegating other event types to the regular, text-based, event explainer

type StreamExplainer

type StreamExplainer interface {
	// Explain the incoming stream
	Explain(events <-chan ansible.Event) error
}

StreamExplainer wraps the Explain method, which reads the incoming stream, and explains to the user what is happening

Jump to

Keyboard shortcuts

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