db

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2024 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 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 apiv1alpha1.SystemUser, pass, host string) *ReplicationDBManager

func (*ReplicationDBManager) ChangeReplicationSource

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

func (*ReplicationDBManager) CheckIfDatabaseExists

func (m *ReplicationDBManager) CheckIfDatabaseExists(ctx context.Context, name string) (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
)

type UserManager

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

func NewUserManager

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

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