Documentation ¶
Index ¶
- Constants
- func NewCommands() engines.ClusterCommands
- func NewManager(properties engines.Properties) (engines.DBManager, error)
- type Commands
- type Config
- type Manager
- func (mgr *Manager) CurrentMemberHealthyCheck(ctx context.Context, cluster *dcs.Cluster) error
- func (mgr *Manager) Demote(ctx context.Context) error
- func (mgr *Manager) Follow(ctx context.Context, cluster *dcs.Cluster) error
- func (mgr *Manager) GetCompatibilityMode(ctx context.Context) (string, error)
- func (mgr *Manager) GetDBConnWithMember(cluster *dcs.Cluster, member *dcs.Member) (db *sql.DB, err error)
- func (mgr *Manager) GetDBState(ctx context.Context, cluster *dcs.Cluster) *dcs.DBState
- func (mgr *Manager) GetMemberOpTimestamp(ctx context.Context, cluster *dcs.Cluster, member *dcs.Member) (int64, error)
- func (mgr *Manager) GetMySQLDBConn() (*sql.DB, error)
- func (mgr *Manager) GetMySQLDBConnWithAddr(addr string) (*sql.DB, error)
- func (mgr *Manager) GetReplicaRole(ctx context.Context, cluster *dcs.Cluster) (string, error)
- func (mgr *Manager) GetReplicaRoleForMember(ctx context.Context, cluster *dcs.Cluster, member *dcs.Member) (string, error)
- func (mgr *Manager) HasOtherHealthyLeader(ctx context.Context, cluster *dcs.Cluster) *dcs.Member
- func (mgr *Manager) HealthyCheckForMySQLMode(ctx context.Context, cluster *dcs.Cluster, member *dcs.Member) error
- func (mgr *Manager) HealthyCheckForOracleMode(ctx context.Context, cluster *dcs.Cluster, member *dcs.Member) error
- func (mgr *Manager) InitializeCluster(context.Context, *dcs.Cluster) error
- func (mgr *Manager) IsClusterInitialized(ctx context.Context, cluster *dcs.Cluster) (bool, error)
- func (mgr *Manager) IsCurrentMemberHealthy(ctx context.Context, cluster *dcs.Cluster) bool
- func (mgr *Manager) IsLeader(ctx context.Context, cluster *dcs.Cluster) (bool, error)
- func (mgr *Manager) IsLeaderMember(ctx context.Context, cluster *dcs.Cluster, member *dcs.Member) (bool, error)
- func (mgr *Manager) IsMemberHealthy(ctx context.Context, cluster *dcs.Cluster, member *dcs.Member) bool
- func (mgr *Manager) IsMemberLagging(ctx context.Context, cluster *dcs.Cluster, member *dcs.Member) (bool, int64)
- func (mgr *Manager) LeaderHealthyCheck(ctx context.Context, cluster *dcs.Cluster) error
- func (mgr *Manager) MemberHealthyCheck(ctx context.Context, cluster *dcs.Cluster, member *dcs.Member) error
- func (mgr *Manager) Promote(ctx context.Context, cluster *dcs.Cluster) error
- func (mgr *Manager) WriteCheck(ctx context.Context, db *sql.DB) error
Constants ¶
View Source
const ( Role = "ROLE" CurrentLeader = "CURRENT_LEADER" PRIMARY = "PRIMARY" STANDBY = "STANDBY" MYSQL = "MYSQL" ORACLE = "ORACLE" )
Variables ¶
This section is empty.
Functions ¶
func NewCommands ¶
func NewCommands() engines.ClusterCommands
func NewManager ¶
func NewManager(properties engines.Properties) (engines.DBManager, error)
Types ¶
type Commands ¶
type Commands struct {
// contains filtered or unexported fields
}
func (*Commands) ConnectCommand ¶
func (*Commands) ConnectExample ¶
func (r *Commands) ConnectExample(info *engines.ConnectionInfo, client string) string
type Manager ¶
type Manager struct { mysql.Manager ReplicaTenant string CompatibilityMode string Members []dcs.Member MaxLag int64 }
func (*Manager) CurrentMemberHealthyCheck ¶ added in v0.8.4
func (*Manager) GetCompatibilityMode ¶ added in v0.8.4
func (*Manager) GetDBConnWithMember ¶
func (mgr *Manager) GetDBConnWithMember(cluster *dcs.Cluster, member *dcs.Member) (db *sql.DB, err error)
GetDBConnWithMember retrieves a database connection for a specific member of a cluster.
func (*Manager) GetDBState ¶ added in v0.8.4
func (*Manager) GetMemberOpTimestamp ¶ added in v0.8.4
func (*Manager) GetMySQLDBConn ¶ added in v0.8.4
func (*Manager) GetMySQLDBConnWithAddr ¶ added in v0.8.4
func (*Manager) GetReplicaRole ¶
func (*Manager) GetReplicaRoleForMember ¶ added in v0.8.4
func (*Manager) HasOtherHealthyLeader ¶ added in v0.8.4
func (*Manager) HealthyCheckForMySQLMode ¶ added in v0.8.4
func (*Manager) HealthyCheckForOracleMode ¶ added in v0.8.4
func (*Manager) InitializeCluster ¶
func (*Manager) IsClusterInitialized ¶ added in v0.8.4
func (*Manager) IsCurrentMemberHealthy ¶ added in v0.8.4
func (*Manager) IsLeaderMember ¶ added in v0.8.4
func (*Manager) IsMemberHealthy ¶ added in v0.8.4
func (*Manager) IsMemberLagging ¶ added in v0.8.4
func (*Manager) LeaderHealthyCheck ¶ added in v0.8.4
func (*Manager) MemberHealthyCheck ¶ added in v0.8.4
Click to show internal directories.
Click to hide internal directories.