MCPcopy Create free account
hub / github.com/docker/compose / Operation

Struct Operation

pkg/compose/plan.go:91–106  ·  view source on GitHub ↗

Operation describes a single atomic action to be performed by the executor.

Source from the content-addressed store, hash-verified

89
90// Operation describes a single atomic action to be performed by the executor.
91type Operation struct {
92 Type OperationType
93 ResourceID string // e.g. "service:web:1", "network:backend", "volume:data"
94 Cause string // why this operation is needed
95
96 // Resource-specific data (only the relevant fields are set per operation type)
97 Service *types.ServiceConfig // for container operations
98 Container *container.Summary // existing container (for stop/remove)
99 Inherited *container.Summary // container to inherit anonymous volumes from (for create-as-replacement)
100 Number int // container replica number (for create)
101 Name string // target container/resource name
102 Network *types.NetworkConfig // for network operations
103 Volume *types.VolumeConfig // for volume operations
104 Timeout *time.Duration // for stop operations
105 CreateNodeID int // for OpRenameContainer: ID of the CreateContainer node whose result to rename
106}
107
108// PlanNode is a single node in the reconciliation DAG. It represents one
109// atomic operation and its dependencies on other nodes.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected