Documentation
¶
Index ¶
Constants ¶
const ( InstanceStatusOnline InstanceStatus = "ONLINE" InstanceStatusMissing = "(MISSING)" InstanceStatusRecovering = "RECOVERING" InstanceStatusNotFound = "" InstanceStatusUnknown = "UNKNOWN" )
Instance statuses.
const DefaultClusterName = "MySQLCluster"
DefaultClusterName is the default name assigned to InnoDB clusters created by the MySQL operator.
const MySQLDBPort = 3306
MySQLDBPort is port on which MySQL listens for client connections.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterStatus ¶
type ClusterStatus struct { ClusterName string `json:"clusterName"` DefaultReplicaSet ReplicaSet `json:"defaultReplicaSet"` }
ClusterStatus represents the status of an InnoDB cluster
func (*ClusterStatus) DeepCopy ¶
func (s *ClusterStatus) DeepCopy() *ClusterStatus
DeepCopy takes a deep copy of a ClusterStatus object.
func (*ClusterStatus) GetInstanceStatus ¶
func (s *ClusterStatus) GetInstanceStatus(name string) InstanceStatus
GetInstanceStatus returns the InstanceStatus of the given instance.
func (*ClusterStatus) GetPrimaryAddr ¶
func (s *ClusterStatus) GetPrimaryAddr() (string, error)
GetPrimary returns a primary in the given cluster.
type Instance ¶
type Instance struct { Address string `json:"address"` Mode InstanceMode `json:"mode"` Role string `json:"role"` Status InstanceStatus `json:"status"` }
Instance represents an individual MySQL instance in an InnoDB cluster.
type InstanceMode ¶
type InstanceMode string
InstanceMode denotes the mode of a MySQL Instance.
const ( ReadWrite InstanceMode = "R/W" ReadOnly = "R/O" )
Instance modes.
type InstanceState ¶
type InstanceState struct { Reason instanceReason `json:"reason"` State instanceState `json:"state"` }
InstanceState represents the state of a MySQL instance with respect to an InnoDB cluster.
func (*InstanceState) CanRejoinCluster ¶
func (s *InstanceState) CanRejoinCluster() bool
CanRejoinCluster returns true if the instance can rejoin the InnoDB cluster.
func (*InstanceState) RequiresClearBinaryLogs ¶
func (s *InstanceState) RequiresClearBinaryLogs() bool
RequiresClearBinaryLogs returns true if the instance needs to clear its binary logs.
type InstanceStatus ¶
type InstanceStatus string
InstanceStatus denotes the status of a MySQL Instance.
type ReplicaSet ¶
type ReplicaSet struct { Name string `json:"name"` Primary string `json:"primary"` Status string `json:"status"` StatusText string `json:"statusText"` Topology map[string]*Instance `json:"topology"` }
ReplicaSet holds the server instances which belong to an InnoDB cluster.
func (*ReplicaSet) DeepCopy ¶
func (rs *ReplicaSet) DeepCopy() *ReplicaSet
DeepCopy takes a deep copy of a ReplicaSet object.