Documentation ¶
Index ¶
- type Alerter
- type Canary
- func (c *Canary) Chirp(conns []*models.NamedConnection, writeConn *models.NamedConnection, ...) (bool, error)
- func (c *Canary) Read(conns []*models.NamedConnection, timestamp time.Time) (bool, error)
- func (c *Canary) Setup(writeConn *models.NamedConnection) error
- func (c *Canary) Write(timestamp time.Time, writeConn *models.NamedConnection) error
- type Chirper
- type CoalMiner
- type ConnectionFactory
- type Healthchecker
- type SQLClient
- type State
- type StateMachine
- type StatefulStateMachine
- type StatelessStateMachine
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Canary ¶
type Canary struct {
// contains filtered or unexported fields
}
func (*Canary) Chirp ¶
func (c *Canary) Chirp( conns []*models.NamedConnection, writeConn *models.NamedConnection, timestamp time.Time, ) (bool, error)
Chirp returns (true,nil) when we know replication succeeded Chirp returns (false,nil) when we know know replication failed Chirp returns (false,error) when we cannot determine if replication succeeded Chirp will never return (true,error)
type Chirper ¶
type Chirper interface { Chirp( conns []*models.NamedConnection, writeConn *models.NamedConnection, timestamp time.Time, ) (bool, error) }
type CoalMiner ¶
type CoalMiner struct { StateMachine StateMachine // contains filtered or unexported fields }
func NewCoalMiner ¶
type ConnectionFactory ¶
type ConnectionFactory interface { Conns() ([]*models.NamedConnection, error) WriteConn() (*models.NamedConnection, error) }
type Healthchecker ¶
type Healthchecker interface {
Healthy(*models.NamedConnection) (bool, error)
}
type StateMachine ¶
type StatefulStateMachine ¶
type StatefulStateMachine struct { State State OnBecomesUnhealthy func(time.Time) OnBecomesNotUnhealthy func(time.Time) Logger lager.Logger }
func (*StatefulStateMachine) BecomesNotUnhealthy ¶
func (m *StatefulStateMachine) BecomesNotUnhealthy(timestamp time.Time)
func (*StatefulStateMachine) BecomesUnhealthy ¶
func (m *StatefulStateMachine) BecomesUnhealthy(timestamp time.Time)
func (*StatefulStateMachine) GetState ¶
func (m *StatefulStateMachine) GetState() State
func (*StatefulStateMachine) RemainsInSameState ¶
func (m *StatefulStateMachine) RemainsInSameState(timestamp time.Time)
type StatelessStateMachine ¶
type StatelessStateMachine struct { OnBecomesUnhealthy func(time.Time) OnBecomesNotUnhealthy func(time.Time) }
func (StatelessStateMachine) BecomesNotUnhealthy ¶
func (m StatelessStateMachine) BecomesNotUnhealthy(now time.Time)
func (StatelessStateMachine) BecomesUnhealthy ¶
func (m StatelessStateMachine) BecomesUnhealthy(now time.Time)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.