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