Documentation ¶
Index ¶
- func NewManager(properties engines.Properties) (engines.DBManager, error)
- type Manager
- func (mgr *Manager) Follow(_ context.Context, cluster *dcs.Cluster) error
- func (mgr *Manager) GetDBState(ctx context.Context, cluster *dcs.Cluster) *dcs.DBState
- func (mgr *Manager) GetMemberAddrWithName(ctx context.Context, cluster *dcs.Cluster, memberName string) string
- func (mgr *Manager) GetMemberAddrs(ctx context.Context, cluster *dcs.Cluster) []string
- func (mgr *Manager) GetMemberRoleWithHost(ctx context.Context, host string) (string, error)
- func (mgr *Manager) GetReplicaRole(ctx context.Context, cluster *dcs.Cluster) (string, error)
- func (mgr *Manager) HasOtherHealthyLeader(ctx context.Context, cluster *dcs.Cluster) *dcs.Member
- func (mgr *Manager) HasOtherHealthyMembers(ctx context.Context, cluster *dcs.Cluster, leader string) []*dcs.Member
- func (mgr *Manager) InitializeCluster(ctx context.Context, _ *dcs.Cluster) error
- func (mgr *Manager) IsClusterHealthy(ctx context.Context, cluster *dcs.Cluster) bool
- func (mgr *Manager) IsClusterInitialized(ctx context.Context, _ *dcs.Cluster) (bool, error)
- func (mgr *Manager) IsCurrentMemberHealthy(ctx context.Context, cluster *dcs.Cluster) bool
- func (mgr *Manager) IsCurrentMemberInCluster(ctx context.Context, cluster *dcs.Cluster) bool
- func (mgr *Manager) IsDBStartupReady() bool
- func (mgr *Manager) IsLeader(ctx context.Context, _ *dcs.Cluster) (bool, error)
- func (mgr *Manager) IsLeaderWithHost(ctx context.Context, host string) (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) IsPromoted(ctx context.Context) bool
- func (mgr *Manager) JoinCurrentMemberToCluster(ctx context.Context, cluster *dcs.Cluster) error
- func (mgr *Manager) LeaveMemberFromCluster(ctx context.Context, _ *dcs.Cluster, host string) error
- func (mgr *Manager) Promote(ctx context.Context, cluster *dcs.Cluster) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewManager ¶
func NewManager(properties engines.Properties) (engines.DBManager, error)
Types ¶
type Manager ¶
var Mgr *Manager
func (*Manager) GetDBState ¶
func (*Manager) GetMemberAddrWithName ¶
func (*Manager) GetMemberAddrs ¶
func (*Manager) GetMemberRoleWithHost ¶
func (*Manager) GetReplicaRole ¶
func (*Manager) HasOtherHealthyLeader ¶
func (*Manager) HasOtherHealthyMembers ¶
func (*Manager) InitializeCluster ¶
func (*Manager) IsClusterHealthy ¶
IsClusterHealthy considers the health status of the cluster equivalent to the health status of the leader
func (*Manager) IsClusterInitialized ¶
func (*Manager) IsCurrentMemberHealthy ¶
func (*Manager) IsCurrentMemberInCluster ¶
func (*Manager) IsDBStartupReady ¶
func (*Manager) IsLeaderWithHost ¶
func (*Manager) IsMemberHealthy ¶
func (mgr *Manager) IsMemberHealthy(ctx context.Context, cluster *dcs.Cluster, member *dcs.Member) bool
IsMemberHealthy firstly get the leader's connection pool, because only leader can get the cluster healthy view
func (*Manager) IsMemberLagging ¶
func (*Manager) JoinCurrentMemberToCluster ¶
func (*Manager) LeaveMemberFromCluster ¶
Click to show internal directories.
Click to hide internal directories.