Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnknownPulseType = errors.New("specified pulse type is unknown") ErrInvalidPulseInterval = errors.New("pulse interval must be positive") )
Possible validation errors.
Functions ¶
This section is empty.
Types ¶
type Driver ¶
type Driver interface {
Check() StatusType
}
Driver provides the actual health check for Pulse.
type ID ¶
type ID struct {
VsID, RsID string
}
ID is a (vsID, rsID) tuple used in Pulse notifications.
type Metrics ¶
type Metrics struct { Status StatusType `json:"status"` Health float64 `json:"health"` Uptime time.Duration `json:"uptime"` // contains filtered or unexported fields }
Metrics contain statistical information about backend's Pulse.
func (*Metrics) Update ¶
func (m *Metrics) Update(status StatusType) Metrics
Update updates metrics based on Pulse status message.
type Options ¶
type Options struct { Type string `json:"type"` Interval string `json:"interval"` Args util.DynamicMap `json:"args"` // contains filtered or unexported fields }
Options contain Pulse configuration.
type Pulse ¶
type Pulse struct {
// contains filtered or unexported fields
}
Pulse is an health check manager for a backend.
type StatusType ¶
type StatusType int
StatusType represents the backend's Pulse status code.
const ( // StatusUp means the backend is up and healthy. StatusUp StatusType = iota // StatusDown means the backend is not responding to Pulse. StatusDown )
func (StatusType) String ¶
func (status StatusType) String() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.