officalpostgres

package
v0.7.1-beta.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

func NewManager

func NewManager(logger logr.Logger) (*Manager, error)

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(ctx context.Context, cluster *dcs.Cluster) []string

func (*Manager) GetMemberRoleWithHost

func (mgr *Manager) GetMemberRoleWithHost(ctx context.Context, host string) (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, cluster *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, cluster *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