Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultChannelName = ""
Variables ¶
View Source
var ErrGroupReplicationNotReady = errors.New("Error 3092: The server is not configured properly to be an active member of the group.")
View Source
var ErrRestartAfterClone error = errors.New("Error 3707: Restart server failed (mysqld is not managed by supervisor process).")
Functions ¶
This section is empty.
Types ¶
type MemberState ¶ added in v0.2.0
type MemberState string
const ( MemberStateOnline MemberState = "ONLINE" MemberStateRecovering MemberState = "RECOVERING" MemberStateOffline MemberState = "OFFLINE" MemberStateError MemberState = "ERROR" MemberStateUnreachable MemberState = "UNREACHABLE" )
type ReplicationStatus ¶
type ReplicationStatus int8
const ( ReplicationStatusActive ReplicationStatus = iota ReplicationStatusError ReplicationStatusNotInitiated )
type Replicator ¶
type Replicator interface { ChangeReplicationSource(host, replicaPass string, port int32) error StartReplication(host, replicaPass string, port int32) error StopReplication() error ResetReplication() error ReplicationStatus() (ReplicationStatus, string, error) EnableSuperReadonly() error IsReadonly() (bool, error) ReportHost() (string, error) Close() error CloneInProgress() (bool, error) NeedsClone(donor string, port int32) (bool, error) Clone(donor, user, pass string, port int32) error IsReplica() (bool, error) DumbQuery() error SetSemiSyncSource(enabled bool) error SetSemiSyncSize(size int) error GetGlobal(variable string) (interface{}, error) SetGlobal(variable, value interface{}) error ChangeGroupReplicationPassword(replicaPass string) error StartGroupReplication(password string) error StopGroupReplication() error GetGroupReplicationPrimary() (string, error) GetGroupReplicationReplicas() ([]string, error) GetMemberState(host string) (MemberState, error) GetGroupReplicationMembers() ([]string, error) CheckIfDatabaseExists(name string) (bool, error) }
func NewReplicator ¶
func NewReplicator(user apiv1alpha1.SystemUser, pass, host string, port int32) (Replicator, error)
Click to show internal directories.
Click to hide internal directories.