+union
| 89 | |
| 90 | // +union |
| 91 | type CommandUnion struct { |
| 92 | // Type of devworkspace command |
| 93 | // +unionDiscriminator |
| 94 | // +optional |
| 95 | CommandType CommandType `json:"commandType,omitempty"` |
| 96 | |
| 97 | // CLI Command executed in an existing component container |
| 98 | // +optional |
| 99 | Exec *ExecCommand `json:"exec,omitempty"` |
| 100 | |
| 101 | // Command that consists in applying a given component definition, |
| 102 | // typically bound to a devworkspace event. |
| 103 | // |
| 104 | // For example, when an `apply` command is bound to a `preStart` event, |
| 105 | // and references a `container` component, it will start the container as a |
| 106 | // K8S initContainer in the devworkspace POD, unless the component has its |
| 107 | // `dedicatedPod` field set to `true`. |
| 108 | // |
| 109 | // When no `apply` command exist for a given component, |
| 110 | // it is assumed the component will be applied at devworkspace start |
| 111 | // by default, unless `deployByDefault` for that component is set to false. |
| 112 | // +optional |
| 113 | Apply *ApplyCommand `json:"apply,omitempty"` |
| 114 | |
| 115 | // Composite command that allows executing several sub-commands |
| 116 | // either sequentially or concurrently |
| 117 | // +optional |
| 118 | Composite *CompositeCommand `json:"composite,omitempty"` |
| 119 | |
| 120 | // Custom command whose logic is implementation-dependant |
| 121 | // and should be provided by the user |
| 122 | // possibly through some dedicated plugin |
| 123 | // +optional |
| 124 | // +devfile:overrides:include:omit=true |
| 125 | Custom *CustomCommand `json:"custom,omitempty"` |
| 126 | } |
| 127 | |
| 128 | // +devfile:getter:generate |
| 129 | type ExecCommand struct { |
nothing calls this directly
no outgoing calls
no test coverage detected