Documentation
¶
Overview ¶
Package fake mocks a resource lock for testing purposes. Always returns leadership.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewResourceLock ¶
func NewResourceLock(config *rest.Config, recorderProvider recorder.Provider, options leaderelection.Options) (resourcelock.Interface, error)
NewResourceLock creates a new ResourceLock for use in testing leader election.
Types ¶
type ControllableResourceLockInterface ¶ added in v0.22.0
type ControllableResourceLockInterface interface {
resourcelock.Interface
// BlockLeaderElection blocks the leader election process when called. It will not be unblocked
// until UnblockLeaderElection is called.
BlockLeaderElection()
// UnblockLeaderElection unblocks the leader election.
UnblockLeaderElection()
}
ControllableResourceLockInterface is an interface that extends resourcelock.Interface to be controllable.
Click to show internal directories.
Click to hide internal directories.