Documentation ¶
Index ¶
- Constants
- type Manager
- type Monitor
- type SentinelAdded
- type SentinelClustersMonitoredUpdate
- type SentinelEvent
- type SentinelInfo
- type SentinelLost
- type SentinelManager
- type SentinelPing
- type SentinelState
- type SentinelTopology
- type SentinelUnknown
- type StartMonitoringSentinel
- type Throttle
- type TopologyRequest
Constants ¶
View Source
const ( SentinelMarkedUp = 1 SentinelMarkedDown = 2 SentinelMarkedAlive = 3 SentinelMarkedUnknown = 4 )
View Source
const ( SentinelReconnectionPeriod = time.Second * 5 MonitorPingInterval = time.Second * 1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager interface {
Notify(event SentinelEvent)
}
type Monitor ¶
type Monitor struct {
// contains filtered or unexported fields
}
func NewMonitor ¶
func (*Monitor) StartMonitoringMasterEvents ¶
func (m *Monitor) StartMonitoringMasterEvents(switchmasterchannel chan types.MasterSwitchedEvent, connectionChannel chan types.ConnectionEvent) error
type SentinelAdded ¶
func (SentinelAdded) GetSentinel ¶
func (s SentinelAdded) GetSentinel() types.Sentinel
type SentinelClustersMonitoredUpdate ¶
func (SentinelClustersMonitoredUpdate) GetSentinel ¶
func (s SentinelClustersMonitoredUpdate) GetSentinel() types.Sentinel
type SentinelEvent ¶
type SentinelInfo ¶
type SentinelLost ¶
func (SentinelLost) GetSentinel ¶
func (s SentinelLost) GetSentinel() types.Sentinel
type SentinelManager ¶
type SentinelManager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(switchmasterchannel chan types.MasterSwitchedEvent, cm *configuration.ConfigurationManager) *SentinelManager
func (*SentinelManager) GetCurrentTopology ¶
func (m *SentinelManager) GetCurrentTopology() types.MasterDetailsCollection
func (*SentinelManager) GetState ¶
func (m *SentinelManager) GetState(request TopologyRequest)
func (*SentinelManager) Notify ¶
func (m *SentinelManager) Notify(event SentinelEvent)
type SentinelPing ¶
func (SentinelPing) GetSentinel ¶
func (s SentinelPing) GetSentinel() types.Sentinel
type SentinelState ¶
type SentinelState struct {
// contains filtered or unexported fields
}
func NewSentinelState ¶
func NewSentinelState(fn StartMonitoringSentinel) SentinelState
func (SentinelState) GetState ¶
func (s SentinelState) GetState(request TopologyRequest)
func (SentinelState) Notify ¶
func (s SentinelState) Notify(event SentinelEvent)
type SentinelTopology ¶
type SentinelTopology struct {
Sentinels map[string]*SentinelInfo `json:"sentinels"`
}
func (SentinelTopology) FindSentinelInfo ¶
func (topology SentinelTopology) FindSentinelInfo(sentinel types.Sentinel) (*SentinelInfo, bool)
type SentinelUnknown ¶
func (SentinelUnknown) GetSentinel ¶
func (s SentinelUnknown) GetSentinel() types.Sentinel
type StartMonitoringSentinel ¶
type Throttle ¶
type Throttle struct {
// contains filtered or unexported fields
}
func NewThrottle ¶
func NewThrottle(in chan types.MasterSwitchedEvent, out chan types.MasterSwitchedEvent) *Throttle
type TopologyRequest ¶
type TopologyRequest struct {
ReplyChannel chan SentinelTopology
}
Click to show internal directories.
Click to hide internal directories.