officalpostgres

package
v1.0.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: AGPL-3.0 Imports: 17 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) Demote

func (mgr *Manager) Demote(ctx context.Context) error

func (*Manager) Follow

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

func (*Manager) GetDBState

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

func (*Manager) GetMemberAddrs

func (mgr *Manager) GetMemberAddrs(_ 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(context.Context, *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(context.Context, *dcs.Cluster) error

func (*Manager) IsClusterInitialized

func (mgr *Manager) IsClusterInitialized(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(context.Context, *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

func (*Manager) IsMemberLagging

func (mgr *Manager) IsMemberLagging(ctx context.Context, cluster *dcs.Cluster, member *dcs.Member) (bool, int64)

func (*Manager) JoinCurrentMemberToCluster

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

func (*Manager) LeaveMemberFromCluster

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

func (*Manager) Promote

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

func (*Manager) Start

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

Start for postgresql replication, not only means the start of a database instance but also signifies its launch as a follower in the cluster, following the leader.

func (*Manager) Stop

func (mgr *Manager) Stop() error

Jump to

Keyboard shortcuts

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