MCPcopy
hub / github.com/kubernetes/client-go / ConfigMapLock

Struct ConfigMapLock

tools/leaderelection/resourcelock/configmaplock.go:34–41  ·  view source on GitHub ↗

TODO: This is almost a exact replica of Endpoints lock. going forwards as we self host more and more components and use ConfigMaps as the means to pass that configuration data we will likely move to deprecate the Endpoints lock.

Source from the content-addressed store, hash-verified

32// data we will likely move to deprecate the Endpoints lock.
33
34type ConfigMapLock struct {
35 // ConfigMapMeta should contain a Name and a Namespace of a
36 // ConfigMapMeta object that the LeaderElector will attempt to lead.
37 ConfigMapMeta metav1.ObjectMeta
38 Client corev1client.ConfigMapsGetter
39 LockConfig ResourceLockConfig
40 cm *v1.ConfigMap
41}
42
43// Get returns the election record from a ConfigMap Annotation
44func (cml *ConfigMapLock) Get() (*LeaderElectionRecord, error) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected