Documentation ¶
Index ¶
- Constants
- type Config
- type Manager
- func (mgr *Manager) CreateRoot(ctx context.Context) error
- func (mgr *Manager) Demote(context.Context) error
- func (mgr *Manager) Exec(ctx context.Context, sql string) (result int64, err error)
- func (mgr *Manager) Follow(ctx context.Context, cluster *dcs.Cluster) error
- func (mgr *Manager) GetHealthiestMember(cluster *dcs.Cluster, candidate string) *dcs.Member
- func (mgr *Manager) GetMemberAddrs(ctx context.Context, 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, 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, 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) JoinCurrentMemberToCluster(ctx context.Context, cluster *dcs.Cluster) error
- func (mgr *Manager) LeaveMemberFromCluster(context.Context, *dcs.Cluster, string) error
- func (mgr *Manager) Lock(ctx context.Context, reason string) error
- func (mgr *Manager) Promote(ctx context.Context, cluster *dcs.Cluster) 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(context.Context) error
- func (mgr *Manager) ShutDownWithWait()
- 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) GetHealthiestMember ¶
func (*Manager) GetMemberAddrs ¶
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) JoinCurrentMemberToCluster ¶
JoinCurrentMemberToCluster postgresql don't need to add member
func (*Manager) LeaveMemberFromCluster ¶
LeaveMemberFromCluster postgresql don't need to delete member
func (*Manager) QueryWithPool ¶
func (*Manager) ShutDownWithWait ¶
func (mgr *Manager) ShutDownWithWait()
Click to show internal directories.
Click to hide internal directories.