 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Overview ¶
Package fake mocks a resource lock for testing purposes. Always returns leadership.
Index ¶
- func NewResourceLock(config *rest.Config, recorderProvider recorder.Provider, ...) (resourcelock.Interface, error)
- type ResourceLock
- func (f *ResourceLock) Create(ler resourcelock.LeaderElectionRecord) error
- func (f *ResourceLock) Describe() string
- func (f *ResourceLock) Get() (*resourcelock.LeaderElectionRecord, error)
- func (f *ResourceLock) Identity() string
- func (f *ResourceLock) RecordEvent(s string)
- func (f *ResourceLock) Update(ler resourcelock.LeaderElectionRecord) error
 
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 ResourceLock ¶
type ResourceLock struct {
	// contains filtered or unexported fields
}
    ResourceLock implements the ResourceLockInterface. By default returns that the current identity holds the lock.
func (*ResourceLock) Create ¶
func (f *ResourceLock) Create(ler resourcelock.LeaderElectionRecord) error
Create implements the ResourceLockInterface.
func (*ResourceLock) Describe ¶
func (f *ResourceLock) Describe() string
Describe implements the ResourceLockInterface.
func (*ResourceLock) Get ¶
func (f *ResourceLock) Get() (*resourcelock.LeaderElectionRecord, error)
Get implements the ResourceLockInterface.
func (*ResourceLock) Identity ¶
func (f *ResourceLock) Identity() string
Identity implements the ResourceLockInterface.
func (*ResourceLock) RecordEvent ¶
func (f *ResourceLock) RecordEvent(s string)
RecordEvent implements the ResourceLockInterface.
func (*ResourceLock) Update ¶
func (f *ResourceLock) Update(ler resourcelock.LeaderElectionRecord) error
Update implements the ResourceLockInterface.
 Click to show internal directories. 
   Click to hide internal directories.