lockserver

package
v0.0.0-...-8a63693 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

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

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

func GlobalEtcdName(clusterName string) string

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

func LocalEtcdName(clusterName, cellName string) string

LocalEtcdName returns the name of the EtcdLockserver object used for a cell-local lockserver.

func NewEtcdLockserver

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.

Jump to

Keyboard shortcuts

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