11package events // import "github.com/docker/docker/api/types/events"
22
3+ // Type is used for event-types.
4+ type Type = string
5+
6+ // List of known event types.
37const (
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"
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.
2619)
2720
2821// Actor describes something that generates events,
2922// like a container, or a network, or a volume.
30- // It has a defined name and a set or attributes.
23+ // It has a defined name and a set of attributes.
3124// The container attributes are its labels, other actors
3225// can generate these attributes from other properties.
3326type Actor struct {
@@ -39,11 +32,11 @@ type Actor struct {
3932type Message struct {
4033 // Deprecated information from JSONMessage.
4134 // With data only in container events.
42- Status string `json:"status,omitempty"`
43- ID string `json:"id,omitempty"`
44- From string `json:"from,omitempty"`
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.
4538
46- Type string
39+ Type Type
4740 Action string
4841 Actor Actor
4942 // Engine events are local scope. Cluster events are swarm scope.
0 commit comments