Documentation
¶
Index ¶
- func DecodeLockName(name string) (*lockName, error)
- type GetSyncLimit
- type IsWorkflowDeleted
- type Key
- type Manager
- func (sm *Manager) CheckWorkflowExistence(ctx context.Context)
- func (sm *Manager) Initialize(ctx context.Context, wfs []wfv1.Workflow)
- func (sm *Manager) Release(ctx context.Context, wf *wfv1.Workflow, nodeName string, ...)
- func (sm *Manager) ReleaseAll(wf *wfv1.Workflow) bool
- func (sm *Manager) TryAcquire(ctx context.Context, wf *wfv1.Workflow, nodeName string, ...) (bool, bool, string, string, error)
- type NextWorkflow
- type QueueFunc
- type SyncLevelType
- type Throttler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeLockName ¶
Types ¶
type GetSyncLimit ¶
type IsWorkflowDeleted ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewLockManager ¶
func NewLockManager(ctx context.Context, kubectlConfig kubernetes.Interface, namespace string, config *config.SyncConfig, getSyncLimit GetSyncLimit, nextWorkflow NextWorkflow, isWFDeleted IsWorkflowDeleted) *Manager
func (*Manager) CheckWorkflowExistence ¶
func (*Manager) Initialize ¶
func (*Manager) TryAcquire ¶
func (sm *Manager) TryAcquire(ctx context.Context, wf *wfv1.Workflow, nodeName string, syncLockRef *wfv1.Synchronization) (bool, bool, string, 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, the failed lock, and any error encountered
type NextWorkflow ¶
type NextWorkflow func(string)
type SyncLevelType ¶ added in v3.5.11
type SyncLevelType int
const ( WorkflowLevel SyncLevelType = 1 TemplateLevel SyncLevelType = 2 ErrorLevel SyncLevelType = 3 )
type Throttler ¶
type Throttler interface {
Init(wfs []wfv1.Workflow) error
Add(key Key, priority int32, creationTime time.Time)
// Admit returns if the item should be processed.
Admit(key Key) bool
// Remove notifies throttler that item processing is no longer needed
Remove(key Key)
// UpdateParallelism
UpdateParallelism(limit int)
// UpdateNamespaceParallelism updates the namespace parallelism
UpdateNamespaceParallelism(namespace string, limit int)
// ResetNamespaceParallelism sets the namespace parallelism to the default value
ResetNamespaceParallelism(namespace string)
}
Throttler allows the controller to limit number of items it is processing in parallel. Items are processed in priority order, and one processing starts, other items (including higher-priority items) will be kept pending until the processing is complete. Implementations should be idempotent.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.