custom

package
v0.9.3-beta.16 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: AGPL-3.0 Imports: 19 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 {
	engines.DBManagerBase
	// contains filtered or unexported fields
}

func (*Manager) CreateUser added in v0.9.1

func (mgr *Manager) CreateUser(ctx context.Context, userName, password, statement string) error

CreateUser provides the following dedicated environment variables for the action:

- KB_ACCOUNT_NAME: The name of the account to create. - KB_ACCOUNT_PASSWORD: The password of the account to create. - KB_ACCOUNT_STATEMENT: The statement used to create the account.

func (*Manager) CurrentMemberHealthCheck added in v0.8.4

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

CurrentMemberHealthCheck provides the following dedicated environment variables for the action:

- KB_POD_FQDN: The FQDN of the replica pod to check the role. - KB_SERVICE_PORT: The port on which the DB service listens. - KB_SERVICE_USER: The username used to access the DB service with sufficient privileges. - KB_SERVICE_PASSWORD: The password of the user used to access the DB service .

func (*Manager) GetReplicaRole

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

func (*Manager) GetReplicaRoleThroughASMAction added in v0.8.2

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

func (*Manager) GetReplicaRoleThroughCommands added in v0.8.2

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

GetReplicaRoleThroughCommands provides the following dedicated environment variables for the action:

- KB_POD_FQDN: The pod FQDN of the replica to check the role. - KB_SERVICE_PORT: The port on which the DB service listens. - KB_SERVICE_USER: The username used to access the DB service and retrieve the role information with sufficient privileges. - KB_SERVICE_PASSWORD: The password of the user used to access the DB service and retrieve the role information.

func (*Manager) InitComponentDefinitionActions added in v0.9.0

func (mgr *Manager) InitComponentDefinitionActions() error

func (*Manager) InitInstanceSetActions added in v0.9.0

func (mgr *Manager) InitInstanceSetActions() error

func (*Manager) JoinCurrentMemberToCluster added in v0.8.2

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

JoinCurrentMemberToCluster provides the following dedicated environment variables for the action:

- KB_SERVICE_PORT: The port on which the DB service listens. - KB_SERVICE_USER: The username used to access the DB service with sufficient privileges. - KB_SERVICE_PASSWORD: The password of the user used to access the DB service . - KB_PRIMARY_POD_FQDN: The FQDN of the original primary Pod before switchover. - KB_MEMBER_ADDRESSES: The addresses of all members. - KB_NEW_MEMBER_POD_NAME: The name of the new member's Pod. - KB_NEW_MEMBER_POD_IP: The name of the new member's Pod.

func (*Manager) LeaveMemberFromCluster added in v0.8.2

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

LeaveMemberFromCluster provides the following dedicated environment variables for the action:

- KB_SERVICE_PORT: The port on which the DB service listens. - KB_SERVICE_USER: The username used to access the DB service with sufficient privileges. - KB_SERVICE_PASSWORD: The password of the user used to access the DB service . - KB_PRIMARY_POD_FQDN: The FQDN of the original primary Pod before switchover. - KB_MEMBER_ADDRESSES: The addresses of all members. - KB_LEAVE_MEMBER_POD_NAME: The name of the leave member's Pod. - KB_LEAVE_MEMBER_POD_IP: The IP of the leave member's Pod.

func (*Manager) Lock added in v0.8.2

func (mgr *Manager) Lock(ctx context.Context, reason string) error

Lock provides the following dedicated environment variables for the action:

- KB_POD_FQDN: The FQDN of the replica pod to check the role. - KB_SERVICE_PORT: The port on which the DB service listens. - KB_SERVICE_USER: The username used to access the DB service with sufficient privileges. - KB_SERVICE_PASSWORD: The password of the user used to access the DB service .

func (*Manager) PostProvision added in v0.8.2

func (mgr *Manager) PostProvision(ctx context.Context, componentNames, podNames, podIPs, podHostNames, podHostIPs string) error

PostProvision provides the following dedicated environment variables for the action:

- KB_SERVICE_PORT: The port on which the DB service listens. - KB_SERVICE_USER: The username used to access the DB service with sufficient privileges. - KB_SERVICE_PASSWORD: The password of the user used to access the DB service . - KB_CLUSTER_COMPONENT_LIST: Lists all components in the cluster, joined by ',' (e.g., "comp1,comp2"). - KB_CLUSTER_COMPONENT_POD_NAME_LIST: Lists all pod names in this component, joined by ',' (e.g., "pod1,pod2"). - KB_CLUSTER_COMPONENT_POD_IP_LIST: Lists the IP addresses of each pod in this component, corresponding one-to-one with each pod in the KB_CLUSTER_COMPONENT_POD_NAME_LIST. Joined by ',' (e.g., "podIp1,podIp2"). - KB_CLUSTER_COMPONENT_POD_HOST_NAME_LIST: Lists the host names where each pod resides in this component, corresponding one-to-one with each pod in the KB_CLUSTER_COMPONENT_POD_NAME_LIST. Joined by ',' (e.g., "hostName1,hostName2"). - KB_CLUSTER_COMPONENT_POD_HOST_IP_LIST: Lists the host IP addresses where each pod resides in this component, corresponding one-to-one with each pod in the KB_CLUSTER_COMPONENT_POD_NAME_LIST. Joined by ',' (e.g., "hostIp1,hostIp2").

func (*Manager) PreTerminate added in v0.8.2

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

PreTerminate provides the following dedicated environment variables for the action:

- KB_POD_FQDN: The FQDN of the replica pod to check the role. - KB_SERVICE_PORT: The port on which the DB service listens. - KB_SERVICE_USER: The username used to access the DB service with sufficient privileges. - KB_SERVICE_PASSWORD: The password of the user used to access the DB service .

func (*Manager) Unlock added in v0.8.2

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

Unlock provides the following dedicated environment variables for the action:

- KB_POD_FQDN: The FQDN of the replica pod to check the role. - KB_SERVICE_PORT: The port on which the DB service listens. - KB_SERVICE_USER: The username used to access the DB service with sufficient privileges. - KB_SERVICE_PASSWORD: The password of the user used to access the DB service .

Jump to

Keyboard shortcuts

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