package healthchecker
import "github.com/mesos/mesos-go/healthchecker"
Index ¶
- type HealthChecker
- type MockedHealthChecker
- func NewMockedHealthChecker() *MockedHealthChecker
- func (m *MockedHealthChecker) Continue(slaveUPID *upid.UPID)
- func (m *MockedHealthChecker) Pause()
- func (m *MockedHealthChecker) Start() <-chan time.Time
- func (m *MockedHealthChecker) Stop()
- func (m *MockedHealthChecker) TriggerUnhealthyEvent()
- type SlaveHealthChecker
- func NewSlaveHealthChecker(slaveUPID *upid.UPID, threshold int, checkDuration time.Duration, timeout time.Duration) *SlaveHealthChecker
- func (s *SlaveHealthChecker) Continue(slaveUPID *upid.UPID)
- func (s *SlaveHealthChecker) Pause()
- func (s *SlaveHealthChecker) Start() <-chan time.Time
- func (s *SlaveHealthChecker) Stop()
Types ¶
type HealthChecker ¶
type HealthChecker interface { // Start will start the health checker, and returns a notification channel. // if the checker thinks the slave is unhealthy, it will send the timestamp // via the channel. Start() <-chan time.Time // Pause will pause the slave health checker. Pause() // Continue will continue the slave health checker with a new slave upid. Continue(slaveUPID *upid.UPID) // Stop will stop the health checker. it should be called only once during // the life span of the checker. Stop() }
HealthChecker defines the interface of a health checker.
type MockedHealthChecker ¶
func NewMockedHealthChecker ¶
func NewMockedHealthChecker() *MockedHealthChecker
NewMockedHealthChecker returns a new mocked health checker.
func (*MockedHealthChecker) Continue ¶
func (m *MockedHealthChecker) Continue(slaveUPID *upid.UPID)
Continue will continue the slave health checker with a new slave upid.
func (*MockedHealthChecker) Pause ¶
func (m *MockedHealthChecker) Pause()
Pause will pause the slave health checker.
func (*MockedHealthChecker) Start ¶
func (m *MockedHealthChecker) Start() <-chan time.Time
Start will start the checker and returns the notification channel.
func (*MockedHealthChecker) Stop ¶
func (m *MockedHealthChecker) Stop()
Stop will stop the checker.
func (*MockedHealthChecker) TriggerUnhealthyEvent ¶
func (m *MockedHealthChecker) TriggerUnhealthyEvent()
type SlaveHealthChecker ¶
SlaveHealthChecker is for checking the slave's health.
func NewSlaveHealthChecker ¶
func NewSlaveHealthChecker(slaveUPID *upid.UPID, threshold int, checkDuration time.Duration, timeout time.Duration) *SlaveHealthChecker
NewSlaveHealthChecker creates a slave health checker and return a notification channel. Each time the checker thinks the slave is unhealthy, it will send a notification through the channel.
func (*SlaveHealthChecker) Continue ¶
func (s *SlaveHealthChecker) Continue(slaveUPID *upid.UPID)
Continue will continue the slave health checker with a new slave upid.
func (*SlaveHealthChecker) Pause ¶
func (s *SlaveHealthChecker) Pause()
Pause will pause the slave health checker.
func (*SlaveHealthChecker) Start ¶
func (s *SlaveHealthChecker) Start() <-chan time.Time
Start will start the health checker and returns the notification channel.
func (*SlaveHealthChecker) Stop ¶
func (s *SlaveHealthChecker) Stop()
Stop will stop the slave health checker. It should be called only once during the life span of the checker.
Source Files ¶
health_checker.go mocked_slave_health_checker.go slave_health_checker.go
- Version
- v0.0.1
- Published
- Sep 15, 2015
- Platform
- js/wasm
- Imports
- 9 packages
- Last checked
- 9 hours ago –
Tools for package owners.