Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitializeSSHClientStore ¶
InitializeSSHClientStore initialies the global SSH connection store and sets the time-to-live for unused connections.
Types ¶
type Config ¶
type Config struct { Name string `json:"name,omitempty"` Schedule string `json:"schedule,omitempty"` Timeout string `json:"timeout,omitempty"` Output *output `json:"output,omitempty"` Host *host `json:"host,omitempty"` HostsFile *hostsFile `json:"hosts,omitempty"` Pre *command `json:"pre,omitempty"` Command *command `json:"command,omitempty"` Post *command `json:"post,omitempty"` Forwarding *forwarding `json:"forwarding,omitempty"` Tunnel *forwarding `json:"tunnel,omitempty"` SCP *scpData `json:"scp,omitempty"` }
Config is the in-memory representation of a job configuration.
func ReadConfig ¶
ReadConfig parses the file into a Config.
func (*Config) ExecutionTree ¶
ExecutionTree creates the execution tree necessary to executeCommand the configured steps.
type EventFilter ¶ added in v0.9.0
A EventFilter returns wether the e matches the filter.
type LogMessage ¶ added in v0.9.0
A LogMessage .
type Logger ¶ added in v0.9.0
type Logger interface { SetOutput(w io.Writer) Flags() int SetFlags(flag int) Prefix() string SetPrefix(prefix string) Print(v ...interface{}) Printf(format string, v ...interface{}) Println(v ...interface{}) Fatal(v ...interface{}) Fatalf(format string, v ...interface{}) Fatalln(v ...interface{}) Panic(v ...interface{}) Panicf(format string, v ...interface{}) Panicln(v ...interface{}) Output(calldepth int, s string) error }
Logger is an interface for loggers. It is satisfied by log.Logger.
type NodeEvent ¶ added in v0.9.0
type NodeEvent struct { Timestamp time.Time Status NodeStatus Typ, Text string }
NodeEvent describes a event during execution
type NodeEvents ¶ added in v0.9.0
type NodeEvents []NodeEvent
NodeEvents is a list of events
func (*NodeEvents) Filter ¶ added in v0.9.0
func (e *NodeEvents) Filter(f EventFilter) NodeEvents
Filter returns all NodeEvents matching f.
func (*NodeEvents) FilterStatus ¶ added in v0.9.0
func (e *NodeEvents) FilterStatus(status NodeStatus) NodeEvents
FilterStatus returns all NodeEvents with status status.
func (*NodeEvents) FilterType ¶ added in v0.9.0
func (e *NodeEvents) FilterType(typ string) NodeEvents
FilterType returns all NodeEvents with type typ.
type NodeStatus ¶ added in v0.9.0
type NodeStatus int
NodeStatus describes the status of a node.
const ( // Execution didn't start yet. NotStartedNode NodeStatus = iota // Node is currently executed. RunningNode // Execution completed. CompletedNode // Execution failed. FailedNode )
type TelemetryInfo ¶ added in v0.9.0
type TelemetryInfo struct {
// contains filtered or unexported fields
}
TelemetryInfo holds informations about an instrumented job
func Instrument ¶ added in v0.9.0
func Instrument(c *Config) (*TelemetryInfo, error)
Instrument the given job.
func (*TelemetryInfo) Events ¶ added in v0.9.0
func (t *TelemetryInfo) Events() NodeEvents
Events returns a list of event that occured during execution