Documentation
¶
Index ¶
- type KubernetesBackend
- func (k *KubernetesBackend) Close() error
- func (k *KubernetesBackend) GetLocks(group string) (int, error)
- func (k *KubernetesBackend) GetStaleLocks(ts time.Duration) ([]types.Lock, error)
- func (k *KubernetesBackend) HasLock(group string, id string) (bool, error)
- func (k *KubernetesBackend) Release(group string, id string) error
- func (k *KubernetesBackend) Reserve(group string, id string) error
- type KubernetesConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KubernetesBackend ¶
type KubernetesBackend struct {
// contains filtered or unexported fields
}
func NewKubernetesBackend ¶
func NewKubernetesBackend(cfg KubernetesConfig) (*KubernetesBackend, error)
func NewKubernetesBackendWithFakeClient ¶
func NewKubernetesBackendWithFakeClient(namespace string) (*KubernetesBackend, *fake.Clientset)
Create a test client with a fake kubernetes clientset
func (*KubernetesBackend) Close ¶
func (k *KubernetesBackend) Close() error
Calls all necessary finalization if necessary
func (*KubernetesBackend) GetLocks ¶
func (k *KubernetesBackend) GetLocks(group string) (int, error)
Returns the current number of locks for the given group
func (*KubernetesBackend) GetStaleLocks ¶
Return all locks older than x
func (*KubernetesBackend) HasLock ¶
func (k *KubernetesBackend) HasLock(group string, id string) (bool, error)
Check if a given id already has a lock for this group
type KubernetesConfig ¶
Click to show internal directories.
Click to hide internal directories.