String returns the human-readable name of an OperationType.
()
| 57 | |
| 58 | // String returns the human-readable name of an OperationType. |
| 59 | func (o OperationType) String() string { |
| 60 | switch o { |
| 61 | case OpCreateNetwork: |
| 62 | return "CreateNetwork" |
| 63 | case OpRemoveNetwork: |
| 64 | return "RemoveNetwork" |
| 65 | case OpDisconnectNetwork: |
| 66 | return "DisconnectNetwork" |
| 67 | case OpConnectNetwork: |
| 68 | return "ConnectNetwork" |
| 69 | case OpCreateVolume: |
| 70 | return "CreateVolume" |
| 71 | case OpRemoveVolume: |
| 72 | return "RemoveVolume" |
| 73 | case OpCreateContainer: |
| 74 | return "CreateContainer" |
| 75 | case OpStartContainer: |
| 76 | return "StartContainer" |
| 77 | case OpStopContainer: |
| 78 | return "StopContainer" |
| 79 | case OpRemoveContainer: |
| 80 | return "RemoveContainer" |
| 81 | case OpRenameContainer: |
| 82 | return "RenameContainer" |
| 83 | case OpRunProvider: |
| 84 | return "RunProvider" |
| 85 | default: |
| 86 | return fmt.Sprintf("Unknown(%d)", int(o)) |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | // Operation describes a single atomic action to be performed by the executor. |
| 91 | type Operation struct { |
nothing calls this directly
no outgoing calls
no test coverage detected