2020-06-17 15:02:26 +00:00
|
|
|
// +build !ent
|
|
|
|
|
|
|
|
package deploymentwatcher
|
|
|
|
|
|
|
|
import "github.com/hashicorp/nomad/nomad/structs"
|
|
|
|
|
2020-06-16 23:23:14 +00:00
|
|
|
// DeploymentRPC and JobRPC hold methods for interacting with peer regions
|
|
|
|
// in enterprise edition.
|
|
|
|
type DeploymentRPC interface{}
|
|
|
|
type JobRPC interface{}
|
2020-06-16 12:10:41 +00:00
|
|
|
|
|
|
|
func (w *deploymentWatcher) nextRegion(status string) error {
|
|
|
|
return nil
|
|
|
|
}
|
2020-06-17 15:02:26 +00:00
|
|
|
|
2020-06-17 14:25:37 +00:00
|
|
|
// RunDeployment is used to run a pending multiregion deployment. In
|
|
|
|
// single-region deployments, the pending state is unused.
|
|
|
|
func (w *deploymentWatcher) RunDeployment(req *structs.DeploymentRunRequest, resp *structs.DeploymentUpdateResponse) error {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-06-17 15:02:26 +00:00
|
|
|
// UnblockDeployment is used to unblock a multiregion deployment. In
|
|
|
|
// single-region deployments, the blocked state is unused.
|
|
|
|
func (w *deploymentWatcher) UnblockDeployment(req *structs.DeploymentUnblockRequest, resp *structs.DeploymentUpdateResponse) error {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// CancelDeployment is used to cancel a multiregion deployment. In
|
|
|
|
// single-region deployments, the deploymentwatcher has sole responsibility to
|
|
|
|
// cancel deployments so this RPC is never used.
|
|
|
|
func (w *deploymentWatcher) CancelDeployment(req *structs.DeploymentCancelRequest, resp *structs.DeploymentUpdateResponse) error {
|
|
|
|
return nil
|
|
|
|
}
|