db

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminManager added in v1.2.0

type AdminManager struct {
	// contains filtered or unexported fields
}

func NewAdminManager added in v1.2.0

func NewAdminManager(pod *corev1.Pod, cliCmd clientcmd.Client, user apiv1.SystemUser, pass, host string) *AdminManager

func (*AdminManager) SetReadOnly added in v1.2.0

func (m *AdminManager) SetReadOnly(ctx context.Context, readonly bool) error

func (*AdminManager) SetSuperReadOnly added in v1.2.0

func (m *AdminManager) SetSuperReadOnly(ctx context.Context, readonly bool) error

type MemberState

type MemberState string
const (
	MemberStateOnline  MemberState = "ONLINE"
	MemberStateOffline MemberState = "OFFLINE"
	MemberStateError   MemberState = "ERROR"
)

type ReplicationDBManager

type ReplicationDBManager struct {
	// contains filtered or unexported fields
}

func NewReplicationManager

func NewReplicationManager(pod *corev1.Pod, cliCmd clientcmd.Client, user apiv1.SystemUser, pass, host string) *ReplicationDBManager

func (*ReplicationDBManager) ChangeReplicationSource

func (m *ReplicationDBManager) ChangeReplicationSource(ctx context.Context, host, replicaPass string, port int32, sourceRetryCount, sourceConnectRetry uint32) error

func (*ReplicationDBManager) CheckIfClusterMetadataDBExists added in v1.2.0

func (m *ReplicationDBManager) CheckIfClusterMetadataDBExists(ctx context.Context) (bool, error)

CheckIfClusterMetadataDBExists reports whether the InnoDB cluster metadata schema is present.

func (*ReplicationDBManager) GetClusterSetReplicationRunning added in v1.2.0

func (m *ReplicationDBManager) GetClusterSetReplicationRunning(ctx context.Context) (bool, error)

func (*ReplicationDBManager) GetGroupReplicationMembers

func (m *ReplicationDBManager) GetGroupReplicationMembers(ctx context.Context) ([]innodbcluster.Member, error)

func (*ReplicationDBManager) GetGroupReplicationPrimary

func (m *ReplicationDBManager) GetGroupReplicationPrimary(ctx context.Context) (string, error)

func (*ReplicationDBManager) GetGroupReplicationReplicas

func (m *ReplicationDBManager) GetGroupReplicationReplicas(ctx context.Context) ([]string, error)

TODO: finish implementation

func (*ReplicationDBManager) GetMemberState

func (m *ReplicationDBManager) GetMemberState(ctx context.Context, host string) (MemberState, error)

func (*ReplicationDBManager) ReplicationStatus

func (m *ReplicationDBManager) ReplicationStatus(ctx context.Context) (ReplicationStatus, string, error)

type ReplicationStatus

type ReplicationStatus int8
const (
	ReplicationStatusActive ReplicationStatus = iota
	ReplicationStatusError
	ReplicationStatusNotInitiated
	ReplicationStatusStopped
)

type UserManager

type UserManager struct {
	// contains filtered or unexported fields
}

func NewUserManager

func NewUserManager(pod *corev1.Pod, cliCmd clientcmd.Client, user apiv1.SystemUser, pass, host string) *UserManager

func (*UserManager) CreateClusterSetUser added in v1.2.0

func (m *UserManager) CreateClusterSetUser(ctx context.Context, pass string) error

CreateClusterSetUser creates the clusterset user with the same grants as ps-entrypoint.sh. The entrypoint creates users only on initial datadir initialization, so clusters created by operator versions older than 1.2.0 don't have this user. It is safe to call if the user already exists.

func (*UserManager) DiscardOldPasswords

func (m *UserManager) DiscardOldPasswords(ctx context.Context, users []mysql.User) error

DiscardOldPasswords discards old passwords of givens users

func (*UserManager) UpdateUserPasswords

func (m *UserManager) UpdateUserPasswords(ctx context.Context, users []mysql.User) error

UpdateUserPasswords updates user passwords but retains the current password using Dual Password feature of MySQL 8

Jump to

Keyboard shortcuts

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