Documentation ¶
Index ¶
- type LockAction
- type LockName
- type LockType
- type Mutex
- type ReleaseNotifyCallbackFunc
- type Semaphore
- type SyncLimitConfigFunc
- type SyncManager
- func (cm *SyncManager) Initialize(wfList *wfv1.WorkflowList)
- func (cm *SyncManager) Release(wf *wfv1.Workflow, nodeName, namespace string, syncRef *wfv1.Synchronization)
- func (cm *SyncManager) ReleaseAll(wf *wfv1.Workflow) bool
- func (cm *SyncManager) TryAcquire(wf *wfv1.Workflow, nodeName string, priority int32, creationTime time.Time, ...) (bool, bool, string, error)
- type Synchronization
- type Throttler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LockAction ¶
type LockAction string
const ( LockActionAcquired LockAction = "acquired" LockActionReleased LockAction = "released" LockActionWaiting LockAction = "waiting" )
type ReleaseNotifyCallbackFunc ¶
type ReleaseNotifyCallbackFunc func(string)
type SyncLimitConfigFunc ¶
type SyncManager ¶
type SyncManager struct {
// contains filtered or unexported fields
}
func NewLockManager ¶
func NewLockManager(getSyncLimitConfigFunc func(string) (int, error), callbackFunc func(string)) *SyncManager
func (*SyncManager) Initialize ¶
func (cm *SyncManager) Initialize(wfList *wfv1.WorkflowList)
func (*SyncManager) Release ¶
func (cm *SyncManager) Release(wf *wfv1.Workflow, nodeName, namespace string, syncRef *wfv1.Synchronization)
func (*SyncManager) ReleaseAll ¶
func (cm *SyncManager) ReleaseAll(wf *wfv1.Workflow) bool
func (*SyncManager) TryAcquire ¶
func (cm *SyncManager) TryAcquire(wf *wfv1.Workflow, nodeName string, priority int32, creationTime time.Time, 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 Synchronization ¶
type Synchronization interface {
// contains filtered or unexported methods
}
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.