healthcheck

package
v0.0.0-...-948e253 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FailoverChan = make(chan int)

FailoverChan 通过该通道通知main函数,重启canal 解析

Functions

func CheckTargetMysqlHealth

func CheckTargetMysqlHealth() error

CheckTargetMysqlHealth 检查Mysql 健康状态 for jucloud

func CheckTargetRedisHealth

func CheckTargetRedisHealth() error

CheckTargetRedisHealth 检查Redis 健康状态

func GetMasterAddr

func GetMasterAddr() string

GetMasterAddr 获取fusion 要连接的mysql addr

func GetTargetMysql

func GetTargetMysql() (string, string, string)

GetTargetMysql 获取fusion 要连接的mysql 信息, 目前只通过read_only 来判断是否符合要求

func IsMaxConnERR

func IsMaxConnERR(err error) bool

IsMaxConnERR 判断是否是mysql连接数打满的错误码 1040: Too many connections

func MonitorTargetMysqlHealth

func MonitorTargetMysqlHealth() error

MonitorTargetMysqlHealth 检查是否出现mysql 主从切换

Types

type Variables

type Variables struct {
	VariableName  string `db:"VARIABLE_NAME"`
	VariableValue string `db:"VARIABLE_VALUE"`
}

Variables mysql 变量信息, 例如read_only 值得查询

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL