Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deployment ¶
type Deployment struct {
// contains filtered or unexported fields
}
Deployment is a wrapper around service metadata for marking jobs as either performing a deployment or done deploying
func NewDeployment ¶
func NewDeployment(service string) (*Deployment, error)
func (*Deployment) Close ¶
func (d *Deployment) Close() error
func (*Deployment) Create ¶
func (d *Deployment) Create(id string) error
Create starts a new deployment with a given ID
func (*Deployment) MarkDone ¶
func (d *Deployment) MarkDone(addr string) error
MarkDone marks the addr as done in the service metadata
func (*Deployment) MarkPerforming ¶
func (d *Deployment) MarkPerforming(addr string, timeout int) error
MarkPerforming marks the given address as performing in the service metadata, ensuring there is only one address marked as performing at any given time (waiting for a ServiceMeta event and retrying if there is already an address performing).
type DeploymentMeta ¶
type DeploymentMeta struct { ID string `json:"id"` States map[string]DeploymentState `json:"states"` }
func NewDeploymentMeta ¶
func NewDeploymentMeta(id string) DeploymentMeta
type DeploymentState ¶
type DeploymentState string
const ( DeploymentStatePerforming DeploymentState = "performing" DeploymentStateDone DeploymentState = "done" )
Click to show internal directories.
Click to hide internal directories.