mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Revendor engine-api
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
This commit is contained in:
parent
9c1be541ff
commit
3585026c3a
2 changed files with 34 additions and 5 deletions
|
@ -60,7 +60,7 @@ clone git golang.org/x/net 2beffdc2e92c8a3027590f898fe88f69af48a3f8 https://gith
|
||||||
clone git golang.org/x/sys eb2c74142fd19a79b3f237334c7384d5167b1b46 https://github.com/golang/sys.git
|
clone git golang.org/x/sys eb2c74142fd19a79b3f237334c7384d5167b1b46 https://github.com/golang/sys.git
|
||||||
clone git github.com/docker/go-units 651fc226e7441360384da338d0fd37f2440ffbe3
|
clone git github.com/docker/go-units 651fc226e7441360384da338d0fd37f2440ffbe3
|
||||||
clone git github.com/docker/go-connections fa2850ff103453a9ad190da0df0af134f0314b3d
|
clone git github.com/docker/go-connections fa2850ff103453a9ad190da0df0af134f0314b3d
|
||||||
clone git github.com/docker/engine-api ebb728a1346926edc2ad9418f9b6045901810b20
|
clone git github.com/docker/engine-api 53b6b19ee622c8584c28fdde0e3893383b290da3
|
||||||
clone git github.com/RackSec/srslog 259aed10dfa74ea2961eddd1d9847619f6e98837
|
clone git github.com/RackSec/srslog 259aed10dfa74ea2961eddd1d9847619f6e98837
|
||||||
clone git github.com/imdario/mergo 0.2.1
|
clone git github.com/imdario/mergo 0.2.1
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ type Service struct {
|
||||||
Meta
|
Meta
|
||||||
Spec ServiceSpec `json:",omitempty"`
|
Spec ServiceSpec `json:",omitempty"`
|
||||||
Endpoint Endpoint `json:",omitempty"`
|
Endpoint Endpoint `json:",omitempty"`
|
||||||
|
UpdateStatus UpdateStatus `json:",omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ServiceSpec represents the spec of a service.
|
// ServiceSpec represents the spec of a service.
|
||||||
|
@ -29,6 +30,26 @@ type ServiceMode struct {
|
||||||
Global *GlobalService `json:",omitempty"`
|
Global *GlobalService `json:",omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UpdateState is the state of a service update.
|
||||||
|
type UpdateState string
|
||||||
|
|
||||||
|
const (
|
||||||
|
// UpdateStateUpdating is the updating state.
|
||||||
|
UpdateStateUpdating UpdateState = "updating"
|
||||||
|
// UpdateStatePaused is the paused state.
|
||||||
|
UpdateStatePaused UpdateState = "paused"
|
||||||
|
// UpdateStateCompleted is the completed state.
|
||||||
|
UpdateStateCompleted UpdateState = "completed"
|
||||||
|
)
|
||||||
|
|
||||||
|
// UpdateStatus reports the status of a service update.
|
||||||
|
type UpdateStatus struct {
|
||||||
|
State UpdateState `json:",omitempty"`
|
||||||
|
StartedAt time.Time `json:",omitempty"`
|
||||||
|
CompletedAt time.Time `json:",omitempty"`
|
||||||
|
Message string `json:",omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
// ReplicatedService is a kind of ServiceMode.
|
// ReplicatedService is a kind of ServiceMode.
|
||||||
type ReplicatedService struct {
|
type ReplicatedService struct {
|
||||||
Replicas *uint64 `json:",omitempty"`
|
Replicas *uint64 `json:",omitempty"`
|
||||||
|
@ -37,8 +58,16 @@ type ReplicatedService struct {
|
||||||
// GlobalService is a kind of ServiceMode.
|
// GlobalService is a kind of ServiceMode.
|
||||||
type GlobalService struct{}
|
type GlobalService struct{}
|
||||||
|
|
||||||
|
const (
|
||||||
|
// UpdateFailureActionPause PAUSE
|
||||||
|
UpdateFailureActionPause = "pause"
|
||||||
|
// UpdateFailureActionContinue CONTINUE
|
||||||
|
UpdateFailureActionContinue = "continue"
|
||||||
|
)
|
||||||
|
|
||||||
// UpdateConfig represents the update configuration.
|
// UpdateConfig represents the update configuration.
|
||||||
type UpdateConfig struct {
|
type UpdateConfig struct {
|
||||||
Parallelism uint64 `json:",omitempty"`
|
Parallelism uint64 `json:",omitempty"`
|
||||||
Delay time.Duration `json:",omitempty"`
|
Delay time.Duration `json:",omitempty"`
|
||||||
|
FailureAction string `json:",omitempty"`
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue