Documentation ¶
Index ¶
Constants ¶
const ( InstanceStatusOnline InstanceStatus = "ONLINE" InstanceStatusMissing = "(MISSING)" InstanceStatusRecovering = "RECOVERING" InstanceStatusUnreachable = "UNREACHABLE" InstanceStatusNotFound = "" InstanceStatusUnknown = "UNKNOWN" )
Instance statuses.
const ( ReplicaSetStatusOk ReplicaSetStatus = "OK" ReplicaSetStatusOkPartial = "OK_PARTIAL" ReplicaSetStatusOkNoTolerance = "OK_NO_TOLERANCE" ReplicaSetStatusNoQuorum = "NO_QUORUM" ReplicaSetStatusUnknown = "UNKNOWN" )
Replica set statuses
const DefaultClusterName = "Cluster"
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)
GetPrimaryAddr 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.
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 ReplicaSetStatus `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.
type ReplicaSetStatus ¶
type ReplicaSetStatus string
ReplicaSetStatus denotes the state of a MySQL replica set.