Documentation ¶
Index ¶
- type Map
- type Sla
- type State
- type StateHttp
- type StateMachine
- func (SM *StateMachine) AddState(key string, s State)
- func (SM *StateMachine) CanMonitor() bool
- func (SM *StateMachine) ClearState()
- func (SM *StateMachine) DeleteState(key string)
- func (SM *StateMachine) GetHeartbeats() int64
- func (SM *StateMachine) GetOpenErrors() []StateHttp
- func (SM *StateMachine) GetOpenWarnings() []StateHttp
- func (SM *StateMachine) GetSla() Sla
- func (SM *StateMachine) GetStates() []string
- func (SM *StateMachine) GetUptime() string
- func (SM *StateMachine) GetUptimeFailable() string
- func (SM *StateMachine) GetUptimeSemiSync() string
- func (SM *StateMachine) Init()
- func (SM *StateMachine) IsDiscovered() bool
- func (SM *StateMachine) IsFailable() bool
- func (SM *StateMachine) IsInFailover() bool
- func (SM *StateMachine) IsInState(key string) bool
- func (SM *StateMachine) RemoveFailoverState()
- func (SM *StateMachine) ResetUptime()
- func (SM *StateMachine) SetFailoverState()
- func (SM *StateMachine) SetMasterUpAndSync(IsSemiSynced bool, IsNotDelay bool)
- func (SM *StateMachine) SetSla(mySla Sla)
- func (SM *StateMachine) UnDiscovered()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StateMachine ¶
type StateMachine struct { CurState *Map OldState *Map Firsttime int64 Uptime int64 UptimeFailable int64 UptimeSemisync int64 sync.Mutex // contains filtered or unexported fields }
func (*StateMachine) AddState ¶
func (SM *StateMachine) AddState(key string, s State)
func (*StateMachine) CanMonitor ¶
func (SM *StateMachine) CanMonitor() bool
CanMonitor checks if the current state contains errors and allows monitoring
func (*StateMachine) ClearState ¶
func (SM *StateMachine) ClearState()
Clear copies the current map to argument map and clears it
func (*StateMachine) DeleteState ¶
func (SM *StateMachine) DeleteState(key string)
func (*StateMachine) GetHeartbeats ¶
func (SM *StateMachine) GetHeartbeats() int64
func (*StateMachine) GetOpenErrors ¶
func (SM *StateMachine) GetOpenErrors() []StateHttp
func (*StateMachine) GetOpenWarnings ¶
func (SM *StateMachine) GetOpenWarnings() []StateHttp
func (*StateMachine) GetSla ¶
func (SM *StateMachine) GetSla() Sla
func (*StateMachine) GetStates ¶
func (SM *StateMachine) GetStates() []string
func (*StateMachine) GetUptime ¶
func (SM *StateMachine) GetUptime() string
func (*StateMachine) GetUptimeFailable ¶
func (SM *StateMachine) GetUptimeFailable() string
func (*StateMachine) GetUptimeSemiSync ¶
func (SM *StateMachine) GetUptimeSemiSync() string
func (*StateMachine) Init ¶
func (SM *StateMachine) Init()
func (*StateMachine) IsDiscovered ¶
func (SM *StateMachine) IsDiscovered() bool
func (*StateMachine) IsFailable ¶
func (SM *StateMachine) IsFailable() bool
func (*StateMachine) IsInFailover ¶
func (SM *StateMachine) IsInFailover() bool
func (*StateMachine) IsInState ¶
func (SM *StateMachine) IsInState(key string) bool
func (*StateMachine) RemoveFailoverState ¶
func (SM *StateMachine) RemoveFailoverState()
func (*StateMachine) ResetUptime ¶
func (SM *StateMachine) ResetUptime()
func (*StateMachine) SetFailoverState ¶
func (SM *StateMachine) SetFailoverState()
func (*StateMachine) SetMasterUpAndSync ¶
func (SM *StateMachine) SetMasterUpAndSync(IsSemiSynced bool, IsNotDelay bool)
func (*StateMachine) SetSla ¶
func (SM *StateMachine) SetSla(mySla Sla)
func (*StateMachine) UnDiscovered ¶
func (SM *StateMachine) UnDiscovered()
Click to show internal directories.
Click to hide internal directories.