apecloudpostgres

package
v0.8.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewManager

func NewManager(properties engines.Properties) (engines.DBManager, error)

Types

type Manager

type Manager struct {
	postgres.Manager
	// contains filtered or unexported fields
}
var Mgr *Manager

func (*Manager) Follow

func (mgr *Manager) Follow(_ context.Context, cluster *dcs.Cluster) error

func (*Manager) GetDBState

func (mgr *Manager) GetDBState(ctx context.Context, cluster *dcs.Cluster) *dcs.DBState

func (*Manager) GetMemberAddrWithName

func (mgr *Manager) GetMemberAddrWithName(ctx context.Context, cluster *dcs.Cluster, memberName string) string

func (*Manager) GetMemberAddrs

func (mgr *Manager) GetMemberAddrs(ctx context.Context, cluster *dcs.Cluster) []string

func (*Manager) GetMemberRoleWithHost

func (mgr *Manager) GetMemberRoleWithHost(ctx context.Context, host string) (string, error)

func (*Manager) GetReplicaRole

func (mgr *Manager) GetReplicaRole(ctx context.Context, cluster *dcs.Cluster) (string, error)

func (*Manager) HasOtherHealthyLeader

func (mgr *Manager) HasOtherHealthyLeader(ctx context.Context, cluster *dcs.Cluster) *dcs.Member

func (*Manager) HasOtherHealthyMembers

func (mgr *Manager) HasOtherHealthyMembers(ctx context.Context, cluster *dcs.Cluster, leader string) []*dcs.Member

func (*Manager) InitializeCluster

func (mgr *Manager) InitializeCluster(ctx context.Context, _ *dcs.Cluster) error

func (*Manager) IsClusterHealthy

func (mgr *Manager) IsClusterHealthy(ctx context.Context, cluster *dcs.Cluster) bool

IsClusterHealthy considers the health status of the cluster equivalent to the health status of the leader

func (*Manager) IsClusterInitialized

func (mgr *Manager) IsClusterInitialized(ctx context.Context, _ *dcs.Cluster) (bool, error)

func (*Manager) IsCurrentMemberHealthy

func (mgr *Manager) IsCurrentMemberHealthy(ctx context.Context, cluster *dcs.Cluster) bool

func (*Manager) IsCurrentMemberInCluster

func (mgr *Manager) IsCurrentMemberInCluster(ctx context.Context, cluster *dcs.Cluster) bool

func (*Manager) IsDBStartupReady

func (mgr *Manager) IsDBStartupReady() bool

func (*Manager) IsLeader

func (mgr *Manager) IsLeader(ctx context.Context, _ *dcs.Cluster) (bool, error)

func (*Manager) IsLeaderWithHost

func (mgr *Manager) IsLeaderWithHost(ctx context.Context, host string) (bool, error)

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 (mgr *Manager) IsMemberLagging(ctx context.Context, cluster *dcs.Cluster, member *dcs.Member) (bool, int64)

func (*Manager) IsPromoted

func (mgr *Manager) IsPromoted(ctx context.Context) bool

func (*Manager) JoinCurrentMemberToCluster

func (mgr *Manager) JoinCurrentMemberToCluster(ctx context.Context, cluster *dcs.Cluster) error

func (*Manager) LeaveMemberFromCluster

func (mgr *Manager) LeaveMemberFromCluster(ctx context.Context, _ *dcs.Cluster, host string) error

func (*Manager) Promote

func (mgr *Manager) Promote(ctx context.Context, cluster *dcs.Cluster) error

Jump to

Keyboard shortcuts

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