зеркало из https://github.com/docker/engine-api.git
Merge pull request #369 from stevvooe/heartbeat-should-be-duration
swarm: clarify meaning of time related fields
This commit is contained in:
Коммит
f52a1ff447
|
@ -54,13 +54,27 @@ type RaftConfig struct {
|
||||||
SnapshotInterval uint64 `json:",omitempty"`
|
SnapshotInterval uint64 `json:",omitempty"`
|
||||||
KeepOldSnapshots uint64 `json:",omitempty"`
|
KeepOldSnapshots uint64 `json:",omitempty"`
|
||||||
LogEntriesForSlowFollowers uint64 `json:",omitempty"`
|
LogEntriesForSlowFollowers uint64 `json:",omitempty"`
|
||||||
HeartbeatTick uint32 `json:",omitempty"`
|
|
||||||
ElectionTick uint32 `json:",omitempty"`
|
// ElectionTick is the number of ticks that a follower will wait for a message
|
||||||
|
// from the leader before becoming a candidate and starting an election.
|
||||||
|
// ElectionTick must be greater than HeartbeatTick.
|
||||||
|
//
|
||||||
|
// A tick currently defaults to one second, so these translate directly to
|
||||||
|
// seconds currently, but this is NOT guaranteed.
|
||||||
|
ElectionTick int
|
||||||
|
|
||||||
|
// HeartbeatTick is the number of ticks between heartbeats. Every
|
||||||
|
// HeartbeatTick ticks, the leader will send a heartbeat to the
|
||||||
|
// followers.
|
||||||
|
//
|
||||||
|
// A tick currently defaults to one second, so these translate directly to
|
||||||
|
// seconds currently, but this is NOT guaranteed.
|
||||||
|
HeartbeatTick int
|
||||||
}
|
}
|
||||||
|
|
||||||
// DispatcherConfig represents dispatcher configuration.
|
// DispatcherConfig represents dispatcher configuration.
|
||||||
type DispatcherConfig struct {
|
type DispatcherConfig struct {
|
||||||
HeartbeatPeriod uint64 `json:",omitempty"`
|
HeartbeatPeriod time.Duration `json:",omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// CAConfig represents CA configuration.
|
// CAConfig represents CA configuration.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче