Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckNodeInCluster ¶
CheckNodeInCluster checks whether or not the local MySQL instance is a member of an InnoDB cluster.
func GetClusterStatus ¶
func GetClusterStatus(ctx context.Context) (*innodb.ClusterStatus, error)
GetClusterStatus returns a JSON string representing the status of the InnoDb MySQL cluster. TODO: Remove me.
Types ¶
type Instance ¶
type Instance struct { // Namespace is the Kubernetes Namespace in which the instance is running. Namespace string // ClusterName is the name of the MySQLCluster to which the instance // belongs. ClusterName string // ParentName is the name of the StatefulSet to which the instance belongs. ParentName string // Ordinal is the StatefulSet ordinal of the instances Pod. Ordinal int // Port is the port on which MySQLDB is listening. Port int // MultiMaster specifies if all, or just a single, instance is configured to be read/write. MultiMaster bool }
Instance represents the local MySQL instance.
func NewInstance ¶
func NewInstance(namespace, clusterName, parentName string, ordinal, port int, multiMaster bool) *Instance
NewInstance creates a new Instance.
func NewInstanceFromGroupSeed ¶
NewInstanceFromGroupSeed creates an Instance from a fully qualified group seed.
func NewLocalInstance ¶
NewLocalInstance creates a new instance of this structure, with it's name and index populated from os.Hostname().
func (*Instance) GetPassword ¶
GetPassword returns the password of the MySQL operator's management user.
func (*Instance) GetShellURI ¶
GetShellURI returns the MySQL shell URI for the local MySQL instance.
Click to show internal directories.
Click to hide internal directories.