github.com/demonoid81/moby@v0.0.0-20200517203328-62dd8e17c460/api/types/events/events.go (about) 1 package events // import "github.com/demonoid81/moby/api/types/events" 2 3 const ( 4 // ContainerEventType is the event type that containers generate 5 ContainerEventType = "container" 6 // DaemonEventType is the event type that daemon generate 7 DaemonEventType = "daemon" 8 // ImageEventType is the event type that images generate 9 ImageEventType = "image" 10 // NetworkEventType is the event type that networks generate 11 NetworkEventType = "network" 12 // PluginEventType is the event type that plugins generate 13 PluginEventType = "plugin" 14 // VolumeEventType is the event type that volumes generate 15 VolumeEventType = "volume" 16 // ServiceEventType is the event type that services generate 17 ServiceEventType = "service" 18 // NodeEventType is the event type that nodes generate 19 NodeEventType = "node" 20 // SecretEventType is the event type that secrets generate 21 SecretEventType = "secret" 22 // ConfigEventType is the event type that configs generate 23 ConfigEventType = "config" 24 ) 25 26 // Actor describes something that generates events, 27 // like a container, or a network, or a volume. 28 // It has a defined name and a set or attributes. 29 // The container attributes are its labels, other actors 30 // can generate these attributes from other properties. 31 type Actor struct { 32 ID string 33 Attributes map[string]string 34 } 35 36 // Message represents the information an event contains 37 type Message struct { 38 // Deprecated information from JSONMessage. 39 // With data only in container events. 40 Status string `json:"status,omitempty"` 41 ID string `json:"id,omitempty"` 42 From string `json:"from,omitempty"` 43 44 Type string 45 Action string 46 Actor Actor 47 // Engine events are local scope. Cluster events are swarm scope. 48 Scope string `json:"scope,omitempty"` 49 50 Time int64 `json:"time,omitempty"` 51 TimeNano int64 `json:"timeNano,omitempty"` 52 }