|
| 1 | +// |
| 2 | +// DISCLAIMER |
| 3 | +// |
| 4 | +// Copyright 2018 ArangoDB GmbH, Cologne, Germany |
| 5 | +// |
| 6 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | +// you may not use this file except in compliance with the License. |
| 8 | +// You may obtain a copy of the License at |
| 9 | +// |
| 10 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | +// |
| 12 | +// Unless required by applicable law or agreed to in writing, software |
| 13 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | +// See the License for the specific language governing permissions and |
| 16 | +// limitations under the License. |
| 17 | +// |
| 18 | +// Copyright holder is ArangoDB GmbH, Cologne, Germany |
| 19 | +// |
| 20 | +// Author Ewout Prangsma |
| 21 | +// |
| 22 | + |
| 23 | +package v1alpha |
| 24 | + |
| 25 | +// DeploymentPhase is a strongly typed lifetime phase of a deployment |
| 26 | +type DeploymentPhase string |
| 27 | + |
| 28 | +const ( |
| 29 | + // DeploymentPhaseNone indicates that the phase is not set yet |
| 30 | + DeploymentPhaseNone DeploymentPhase = "" |
| 31 | + // DeploymentPhaseRunning indicates that the deployment is under control of the |
| 32 | + // ArangoDeployment operator. |
| 33 | + DeploymentPhaseRunning DeploymentPhase = "Running" |
| 34 | + // DeploymentPhaseFailed indicates that a deployment is in a failed state |
| 35 | + // from which automatic recovery is impossible. Inspect `Reason` for more info. |
| 36 | + DeploymentPhaseFailed DeploymentPhase = "Failed" |
| 37 | +) |
| 38 | + |
| 39 | +// IsFailed returns true if given state is DeploymentStateFailed |
| 40 | +func (cs DeploymentPhase) IsFailed() bool { |
| 41 | + return cs == DeploymentPhaseFailed |
| 42 | +} |
0 commit comments