innodb

package
v0.0.0-...-9aebcc3 Latest Latest
Warning

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

Go to latest
Published: May 15, 2019 License: Apache-2.0 Imports: 2 Imported by: 42

Documentation

Index

Constants

View Source
const (
	InstanceStatusOnline      InstanceStatus = "ONLINE"
	InstanceStatusMissing                    = "(MISSING)"
	InstanceStatusRecovering                 = "RECOVERING"
	InstanceStatusUnreachable                = "UNREACHABLE"
	InstanceStatusNotFound                   = ""
	InstanceStatusUnknown                    = "UNKNOWN"
)

Instance statuses.

View Source
const (
	ReplicaSetStatusOk            ReplicaSetStatus = "OK"
	ReplicaSetStatusOkPartial                      = "OK_PARTIAL"
	ReplicaSetStatusOkNoTolerance                  = "OK_NO_TOLERANCE"
	ReplicaSetStatusNoQuorum                       = "NO_QUORUM"
	ReplicaSetStatusUnknown                        = "UNKNOWN"
)

Replica set statuses

View Source
const DefaultClusterName = "Cluster"

DefaultClusterName is the default name assigned to InnoDB clusters created by the MySQL operator.

View Source
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.

func (*Instance) DeepCopy

func (i *Instance) DeepCopy() *Instance

DeepCopy takes a deep copy of an Instance object.

func (*Instance) Name

func (i *Instance) Name() string

Name returns the dns name of the Instance.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL