package heartbeat
import "github.com/docker/swarmkit/manager/dispatcher/heartbeat"
Index ¶
Types ¶
type Heartbeat ¶
type Heartbeat struct {
// contains filtered or unexported fields
}
Heartbeat is simple way to track heartbeats.
func New ¶
New creates new Heartbeat with specified duration. timeoutFunc will be called if timeout for heartbeat is expired. Note that in case of timeout you need to call Beat() to reactivate Heartbeat.
func (*Heartbeat) Beat ¶
func (hb *Heartbeat) Beat()
Beat resets internal timer to zero. It also can be used to reactivate Heartbeat after timeout.
func (*Heartbeat) Stop ¶
func (hb *Heartbeat) Stop()
Stop stops Heartbeat timer.
func (*Heartbeat) Update ¶
Update updates internal timeout to d. It does not do Beat.
Source Files ¶
- Version
- v1.12.0 (latest)
- Published
- Jul 26, 2016
- Platform
- linux/amd64
- Imports
- 2 packages
- Last checked
- 6 hours ago –
Tools for package owners.