Operation describes a single atomic action to be performed by the executor.
| 89 | |
| 90 | // Operation describes a single atomic action to be performed by the executor. |
| 91 | type 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. |
nothing calls this directly
no outgoing calls
no test coverage detected