Documentation ¶
Index ¶
- func NewManager(properties engines.Properties) (engines.DBManager, error)
- type Manager
- func (mgr *Manager) CurrentMemberHealthCheck(ctx context.Context, cluster *dcs.Cluster) error
- func (mgr *Manager) GetReplicaRole(ctx context.Context, cluster *dcs.Cluster) (string, error)
- func (mgr *Manager) GetReplicaRoleThroughASMAction(ctx context.Context, cluster *dcs.Cluster) (string, error)
- func (mgr *Manager) GetReplicaRoleThroughCommands(ctx context.Context, cluster *dcs.Cluster) (string, error)
- func (mgr *Manager) InitComponentDefinitionActions() error
- func (mgr *Manager) InitInstanceSetActions() error
- func (mgr *Manager) JoinCurrentMemberToCluster(ctx context.Context, cluster *dcs.Cluster) error
- func (mgr *Manager) LeaveMemberFromCluster(ctx context.Context, cluster *dcs.Cluster, memberName string) error
- func (mgr *Manager) Lock(ctx context.Context, reason string) error
- func (mgr *Manager) PostProvision(ctx context.Context, ...) error
- func (mgr *Manager) PreTerminate(ctx context.Context) error
- func (mgr *Manager) Unlock(ctx context.Context) error
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) CurrentMemberHealthCheck ¶ added in v0.8.4
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 (*Manager) GetReplicaRoleThroughASMAction ¶ added in v0.8.2
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 (*Manager) InitInstanceSetActions ¶ added in v0.9.0
func (*Manager) JoinCurrentMemberToCluster ¶ added in v0.8.2
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
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
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
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 .