Documentation
¶
Index ¶
Constants ¶
View Source
const ( // EventPlaybookOnTaskStart - playbook is starting to run a task. EventPlaybookOnTaskStart = "playbook_on_task_start" // EventRunnerOnOk - task finished with ok status. EventRunnerOnOk = "runner_on_ok" // EventRunnerOnFailed - task finished with failed status. EventRunnerOnFailed = "runner_on_failed" // EventPlaybookOnStats - playbook has finished running. EventPlaybookOnStats = "playbook_on_stats" // TaskActionSetFact - task action of setting a fact. TaskActionSetFact = "set_fact" // TaskActionDebug - task action of printing a debug message. TaskActionDebug = "debug" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventReceiver ¶
type EventReceiver struct {
// Events is the channel used by the event API handler to send JobEvents
// back to the runner, or whatever code is using this receiver.
Events chan JobEvent
// SocketPath is the path on the filesystem to a unix streaming socket
SocketPath string
// URLPath is the path portion of the url at which events should be
// received. For example, "/events/"
URLPath string
// contains filtered or unexported fields
}
EventReceiver serves the event API
func (*EventReceiver) Close ¶
func (e *EventReceiver) Close()
Close ensures that appropriate resources are cleaned up, such as any unix streaming socket that may be in use. Close must be called.
type EventTime ¶
EventTime - time to unmarshal nano time.
func (EventTime) MarshalJSON ¶
MarshalJSON - override the marshal json.
func (*EventTime) UnmarshalJSON ¶
UnmarshalJSON - override unmarshal json.
type FailureMessages ¶ added in v0.2.0
type FailureMessages []string
FailureMessages - failure messages from the event api
type JobEvent ¶
type JobEvent struct {
UUID string `json:"uuid"`
Counter int `json:"counter"`
StdOut string `json:"stdout"`
StartLine int `json:"start_line"`
EndLine int `json:"EndLine"`
Event string `json:"event"`
EventData map[string]interface{} `json:"event_data"`
PID int `json:"pid"`
Created EventTime `json:"created"`
}
JobEvent - event of an ansible run.
func (JobEvent) GetFailedPlaybookMessage ¶ added in v0.2.0
GetFailedPlaybookMessage - get the failure message from res.msg
type StatsEventData ¶
type StatsEventData struct {
Playbook string `json:"playbook"`
PlaybookUUID string `json:"playbook_uuid"`
Changed map[string]int `json:"changed"`
Ok map[string]int `json:"ok"`
Failures map[string]int `json:"failures"`
Skipped map[string]int `json:"skipped"`
}
StatsEventData - data for a the status event.
type StatusJobEvent ¶
type StatusJobEvent struct {
UUID string `json:"uuid"`
Counter int `json:"counter"`
StdOut string `json:"stdout"`
StartLine int `json:"start_line"`
EndLine int `json:"EndLine"`
Event string `json:"event"`
EventData StatsEventData `json:"event_data"`
PID int `json:"pid"`
Created EventTime `json:"created"`
}
StatusJobEvent - event of an ansible run.
Click to show internal directories.
Click to hide internal directories.