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