Documentation ¶
Index ¶
- Constants
- type Config
- type Manager
- func (mgr *Manager) AddCurrentMemberToCluster(cluster *dcs.Cluster) error
- func (mgr *Manager) CreateRoot(ctx context.Context) error
- func (mgr *Manager) DeleteMemberFromCluster(cluster *dcs.Cluster, host string) error
- func (mgr *Manager) Demote() error
- func (mgr *Manager) Exec(ctx context.Context, sql string) (result int64, err error)
- func (mgr *Manager) Follow(cluster *dcs.Cluster) error
- func (mgr *Manager) GetHealthiestMember(cluster *dcs.Cluster, candidate string) *dcs.Member
- func (mgr *Manager) GetMemberAddrs(cluster *dcs.Cluster) []string
- func (mgr *Manager) GetMemberStateWithPool(ctx context.Context, pool *pgxpool.Pool) (string, error)
- func (mgr *Manager) GetOtherPoolsWithHosts(ctx context.Context, hosts []string) ([]*pgxpool.Pool, 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(context.Context, *dcs.Cluster) error
- func (mgr *Manager) IsClusterHealthy(ctx context.Context, cluster *dcs.Cluster) bool
- func (mgr *Manager) IsClusterInitialized(ctx context.Context, cluster *dcs.Cluster) (bool, error)
- func (mgr *Manager) IsCurrentMemberHealthy(ctx context.Context) bool
- func (mgr *Manager) IsCurrentMemberInCluster(ctx context.Context, cluster *dcs.Cluster) bool
- func (mgr *Manager) IsDBStartupReady() 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) IsLeaderWithPool(ctx context.Context, pool *pgxpool.Pool) (bool, error)
- func (mgr *Manager) IsMemberHealthy(ctx context.Context, cluster *dcs.Cluster, member *dcs.Member) bool
- func (mgr *Manager) IsRootCreated(ctx context.Context) (bool, error)
- func (mgr *Manager) IsRunning() bool
- func (mgr *Manager) Lock(ctx context.Context, reason string) error
- func (mgr *Manager) Promote() error
- func (mgr *Manager) Query(ctx context.Context, sql string) (result []byte, err error)
- func (mgr *Manager) QueryWithPool(ctx context.Context, sql string, pool *pgxpool.Pool) (result []byte, err error)
- func (mgr *Manager) Recover()
- func (mgr *Manager) Start() error
- func (mgr *Manager) Stop() error
- func (mgr *Manager) Unlock(ctx context.Context) error
- type PGStandby
- type PidFile
Constants ¶
View Source
const (
DefaultPort = 5432
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (*Config) GetConnectURLWithHost ¶
type Manager ¶
var Mgr *Manager
func (*Manager) AddCurrentMemberToCluster ¶
AddCurrentMemberToCluster postgresql don't need to add member
func (*Manager) DeleteMemberFromCluster ¶
DeleteMemberFromCluster postgresql don't need to delete member
func (*Manager) GetHealthiestMember ¶
func (*Manager) GetMemberStateWithPool ¶
func (*Manager) GetOtherPoolsWithHosts ¶
func (*Manager) HasOtherHealthyLeader ¶
func (*Manager) HasOtherHealthyMembers ¶
func (*Manager) InitializeCluster ¶
func (*Manager) IsClusterHealthy ¶
func (*Manager) IsClusterInitialized ¶
func (*Manager) IsCurrentMemberHealthy ¶
func (*Manager) IsCurrentMemberInCluster ¶
func (*Manager) IsDBStartupReady ¶
func (*Manager) IsLeaderMember ¶
func (*Manager) IsLeaderWithPool ¶
func (*Manager) IsMemberHealthy ¶
func (*Manager) IsRootCreated ¶
func (*Manager) QueryWithPool ¶
Click to show internal directories.
Click to hide internal directories.