Documentation ¶
Index ¶
Constants ¶
const BLIP_TABLE_DDL = `` /* 266-byte string literal not displayed */
Variables ¶
var InitErrorWait = 10 * time.Second
InitErrorWait is how long to wait between retries when initializing the heartbeat table (the first INSERT). This should be a relatively long wait.
var NoHeartbeatWait = 3 * time.Second
var ReadErrorWait = 1 * time.Second
var ReadOnlyWait = 20 * time.Second
ReadOnlyWait is how long to wait when MySQL is read-only (not writable). This should be a long wait because it could mean Blip is effectively in standby mode on a read-only replica until it's promoted to be the writable source, which might not happen for a very long time.
var ReadTimeout = 2 * time.Second
var ReplCheckWait = 3 * time.Second
var WriteTimeout = 5 * time.Second
WriteTimeout is how long to wait for MySQL to execute any heartbeat write. This should be much greater than the write frequency (config.heartbeat.freq) because it allows for slow network, MySQL, and so on.
Functions ¶
This section is empty.
Types ¶
type BlipReader ¶
BlipReader reads heartbeats from BlipWriter.
func NewBlipReader ¶
func NewBlipReader(args BlipReaderArgs) *BlipReader
func (*BlipReader) Start ¶
func (r *BlipReader) Start() error
func (*BlipReader) Stop ¶
func (r *BlipReader) Stop()
type BlipReaderArgs ¶
type Reader ¶
Reader reads heartbeats from a writer. It runs in a separate goroutine and reports replication lag for the repl.lag metric collector, where it's also created in Prepare. Currently, there's only one implementation: BlipReader, but an implementation for pt-table-heartbeat is an idea.