Documentation ¶
Index ¶
- Constants
- Variables
- func GlobalConnectionParams(lockSpec *planetscalev2.LockserverSpec, namespace, clusterName string) *planetscalev2.VitessLockserverParams
- func GlobalEtcdName(clusterName string) string
- func LocalConnectionParams(globalLockserverSpec, cellLockserverSpec *planetscalev2.LockserverSpec, ...) *planetscalev2.VitessLockserverParams
- func LocalEtcdName(clusterName, cellName string) string
- func NewEtcdLockserver(key client.ObjectKey, tpl *planetscalev2.EtcdLockserverTemplate, ...) *planetscalev2.EtcdLockserver
- func UpdateEtcdLockserver(obj *planetscalev2.EtcdLockserver, tpl *planetscalev2.EtcdLockserverTemplate, ...)
Constants ¶
const ( // EtcdClientPort is the port for clients to connect to etcd. EtcdClientPort = 2379 // VitessEtcdImplementationName is the topo plugin name to give Vitess to tell it to // connect to an etcd cluster as the lockserver (topology store). VitessEtcdImplementationName = "etcd2" )
Variables ¶
var EtcdLockserverNameConstraints = names.Constraints{ MaxLength: names.ServiceConstraints.MaxLength - len("-client"), ValidFirstChar: names.ServiceConstraints.ValidFirstChar, }
EtcdLockserverNameConstraints are special constraints for the generated name of an EtcdLockserver. The EtcdLockserver controller creates Service names by appending "-client" and "-peer" to the EtcdLockserver object name, so the name must fit into the constraints for a Service while also leaving space for the extra suffix.
Functions ¶
func GlobalConnectionParams ¶
func GlobalConnectionParams(lockSpec *planetscalev2.LockserverSpec, namespace, clusterName string) *planetscalev2.VitessLockserverParams
GlobalConnectionParams returns the Vitess connection parameters for a VitessCluster's global lockserver.
func GlobalEtcdName ¶
GlobalEtcdName returns the name of the EtcdLockserver object used for a global lockserver.
func LocalConnectionParams ¶
func LocalConnectionParams(globalLockserverSpec, cellLockserverSpec *planetscalev2.LockserverSpec, namespace, clusterName, cellName string) *planetscalev2.VitessLockserverParams
LocalConnectionParams returns the Vitess connection parameters for a VitessCluster cell's local lockserver.
func LocalEtcdName ¶
LocalEtcdName returns the name of the EtcdLockserver object used for a cell-local lockserver.
func NewEtcdLockserver ¶
func NewEtcdLockserver(key client.ObjectKey, tpl *planetscalev2.EtcdLockserverTemplate, labels map[string]string, zone string) *planetscalev2.EtcdLockserver
NewEtcdLockserver generates an EtcdLockserver object for the given EtcdLockserverTemplate. The EtcdLockserverTemplate must have already had defaults filled in.
func UpdateEtcdLockserver ¶
func UpdateEtcdLockserver(obj *planetscalev2.EtcdLockserver, tpl *planetscalev2.EtcdLockserverTemplate, labels map[string]string, zone string)
UpdateEtcdLockserver updates parts of an existing EtcdLockserver that are allowed to change in-place. The EtcdLockserverTemplate must have already had defaults filled in.
Types ¶
This section is empty.