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.
| 32 | // data we will likely move to deprecate the Endpoints lock. |
| 33 | |
| 34 | type 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 |
| 44 | func (cml *ConfigMapLock) Get() (*LeaderElectionRecord, error) { |
nothing calls this directly
no outgoing calls
no test coverage detected