Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Container - event is related to containers Container Type = "container" // Image - event is related to images Image Type = "image" // Pod - event is related to pods Pod Type = "pod" // Volume - event is related to volumes Volume Type = "volume" // Attach ... Attach Status = "attach" // Checkpoint ... Checkpoint Status = "checkpoint" // Cleanup ... Cleanup Status = "cleanup" // Commit ... Commit Status = "commit" // Create ... Create Status = "create" // Exec ... Exec Status = "exec" // Exited indicates that a container's process died Exited Status = "died" // Export ... Export Status = "export" // History ... History Status = "history" // Import ... Import Status = "import" // Init ... Init Status = "init" // Kill ... Kill Status = "kill" // LoadFromArchive ... LoadFromArchive Status = "status" // Mount ... Mount Status = "mount" // Pause ... Pause Status = "pause" // Prune ... Prune Status = "prune" // Pull ... Pull Status = "pull" // Push ... Push Status = "push" // Remove ... Remove Status = "remove" // Restore ... Restore Status = "restore" // Save ... Save Status = "save" // Start ... Start Status = "start" // Stop ... Stop Status = "stop" // Sync ... Sync Status = "sync" // Tag ... Tag Status = "tag" // Unmount ... Unmount Status = "unmount" // Unpause ... Unpause Status = "unpause" // Untag ... Untag Status = "untag" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { // ContainerExitCode is for storing the exit code of a container which can // be used for "internal" event notification ContainerExitCode int // ID can be for the container, image, volume, etc ID string // Image used where applicable Image string // Name where applicable Name string // Status describes the event that occurred Status Status // Time the event occurred Time time.Time // Type of event that occurred Type Type }
Event describes the attributes of a libpod event
func NewEventFromString ¶
NewEventFromString takes stringified json and converts it to an event
func (*Event) Recycle ¶
Recycle checks if the event log has reach a limit and if so renames the current log and starts a new one. The remove bool indicates the old log file should be deleted.
func (*Event) ToHumanReadable ¶
ToHumanReadable returns human readable event as a formatted string
func (*Event) ToJSONString ¶
ToJSONString returns the event as a json'ified string
type Status ¶
type Status string
Status describes the actual event action (stop, start, create, kill)
func StringToStatus ¶
StringToStatus converts a string to an Event Status TODO if we add more events, we might consider a go-generator to create the switch statement
Click to show internal directories.
Click to hide internal directories.