Documentation ¶
Index ¶
- type GetSyncLimit
- type LockKind
- type LockName
- type Manager
- func (cm *Manager) Initialize(wfs []wfv1.Workflow)
- func (cm *Manager) Release(wf *wfv1.Workflow, nodeName string, syncRef *wfv1.Synchronization)
- func (cm *Manager) ReleaseAll(wf *wfv1.Workflow) bool
- func (cm *Manager) TryAcquire(wf *wfv1.Workflow, nodeName string, syncLockRef *wfv1.Synchronization) (bool, bool, string, error)
- type NextWorkflow
- type PriorityMutex
- type PrioritySemaphore
- type Semaphore
- type Throttler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetSyncLimit ¶
type LockName ¶
func DecodeLockName ¶
func GetLockName ¶
func GetLockName(sync *v1alpha1.Synchronization, namespace string) (*LockName, error)
func NewLockName ¶
func (*LockName) EncodeName ¶
func (*LockName) ValidateEncoding ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewLockManager ¶
func NewLockManager(getSyncLimit GetSyncLimit, nextWorkflow NextWorkflow) *Manager
func (*Manager) Initialize ¶
func (*Manager) TryAcquire ¶
func (cm *Manager) TryAcquire(wf *wfv1.Workflow, nodeName string, syncLockRef *wfv1.Synchronization) (bool, bool, string, error)
TryAcquire tries to acquire the lock from semaphore. It returns status of acquiring a lock , status of Workflow status updated, waiting message if lock is not available and any error encountered
type NextWorkflow ¶
type NextWorkflow func(string)
type PriorityMutex ¶
type PriorityMutex struct {
// contains filtered or unexported fields
}
func NewMutex ¶
func NewMutex(name string, nextWorkflow NextWorkflow) *PriorityMutex
NewMutex creates new mutex lock object name of the mutex callbackFunc is a release notification function.
type PrioritySemaphore ¶
type PrioritySemaphore struct {
// contains filtered or unexported fields
}
func NewSemaphore ¶
func NewSemaphore(name string, limit int, nextWorkflow NextWorkflow, lockType string) *PrioritySemaphore
type Throttler ¶
type Throttler interface { Add(key interface{}, priority int32, creationTime time.Time) // Next returns true if item should be processed by controller now or return false. Next(key interface{}) (interface{}, bool) // Remove notifies throttler that item processing is done. In responses the throttler triggers processing of previously throttled items. Remove(key interface{}) // SetParallelism update throttler parallelism limit. SetParallelism(parallelism int) }
Throttler allows CRD controller to limit number of items it is processing in parallel.
func NewThrottler ¶
func NewThrottler(parallelism int, queue workqueue.RateLimitingInterface) Throttler
Click to show internal directories.
Click to hide internal directories.