1
1
package events // import "github.com/docker/docker/api/types/events"
2
2
3
+ // Type is used for event-types.
4
+ type Type = string
5
+
6
+ // List of known event types.
3
7
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"
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.
26
19
)
27
20
28
21
// Actor describes something that generates events,
29
22
// 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.
31
24
// The container attributes are its labels, other actors
32
25
// can generate these attributes from other properties.
33
26
type Actor struct {
@@ -39,11 +32,11 @@ type Actor struct {
39
32
type Message struct {
40
33
// Deprecated information from JSONMessage.
41
34
// 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.
45
38
46
- Type string
39
+ Type Type
47
40
Action string
48
41
Actor Actor
49
42
// Engine events are local scope. Cluster events are swarm scope.
0 commit comments