Documentation ¶
Index ¶
- type HeartbeatConfigType
- type ReplTracker
- func (rt *ReplTracker) Close()
- func (rt *ReplTracker) EnableHeartbeat(enable bool)
- func (rt *ReplTracker) HeartbeatWriter() heartbeat.HeartbeatWriter
- func (rt *ReplTracker) InitDBConfig(target *querypb.Target, mysqld mysqlctl.MysqlDaemon)
- func (rt *ReplTracker) MakeNonPrimary()
- func (rt *ReplTracker) MakePrimary()
- func (rt *ReplTracker) Status() (time.Duration, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HeartbeatConfigType ¶ added in v0.21.0
type HeartbeatConfigType int
We identify these heartbeat configuration types: - No configuration: the heartbeat writer is generally disabled and does not produce heartbeats (but see below). - On-demand: on-demand heartbeat interval was specified. - Always: the heartbeat writer is always on and produces heartbeats at a regular interval.
const ( HeartbeatConfigTypeNone HeartbeatConfigType = iota HeartbeatConfigTypeOnDemand HeartbeatConfigTypeAlways )
type ReplTracker ¶
type ReplTracker struct {
// contains filtered or unexported fields
}
ReplTracker tracks replication lag.
func NewReplTracker ¶
func NewReplTracker(env tabletenv.Env, alias *topodatapb.TabletAlias) *ReplTracker
NewReplTracker creates a new ReplTracker.
func (*ReplTracker) EnableHeartbeat ¶ added in v0.8.0
func (rt *ReplTracker) EnableHeartbeat(enable bool)
EnableHeartbeat enables or disables writes of heartbeat. This functionality is only used by tests.
func (*ReplTracker) HeartbeatWriter ¶ added in v0.14.0
func (rt *ReplTracker) HeartbeatWriter() heartbeat.HeartbeatWriter
HeartbeatWriter returns the heartbeat writer used by this tracker
func (*ReplTracker) InitDBConfig ¶
func (rt *ReplTracker) InitDBConfig(target *querypb.Target, mysqld mysqlctl.MysqlDaemon)
InitDBConfig initializes the target name.
func (*ReplTracker) MakeNonPrimary ¶ added in v0.12.0
func (rt *ReplTracker) MakeNonPrimary()
MakeNonPrimary must be called if the tablet type becomes non-PRIMARY.
func (*ReplTracker) MakePrimary ¶ added in v0.12.0
func (rt *ReplTracker) MakePrimary()
MakePrimary must be called if the tablet type becomes PRIMARY.