apidispatcher

package
v1.34.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIDispatcher

type APIDispatcher struct {
	// contains filtered or unexported fields
}

APIDispatcher implements the fwk.APIDispatcher interface and allows for queueing and dispatching API calls asynchronously.

func New

func New(client clientset.Interface, parallelization int, apiCallRelevances fwk.APICallRelevances) *APIDispatcher

New returns a new APIDispatcher object.

func (*APIDispatcher) Add

func (ad *APIDispatcher) Add(newAPICall fwk.APICall, opts fwk.APICallOptions) error

Add adds an API call to the dispatcher's queue. It returns an error if the call is not enqueued (e.g., if it's skipped). The caller should handle ErrCallSkipped if returned.

func (*APIDispatcher) Close

func (ad *APIDispatcher) Close()

Close shuts down the APIDispatcher.

func (*APIDispatcher) Run

func (ad *APIDispatcher) Run(logger klog.Logger)

Run starts the main processing loop of the APIDispatcher, which pops calls from the queue and dispatches them to worker goroutines for execution.

func (*APIDispatcher) SyncObject

func (ad *APIDispatcher) SyncObject(obj metav1.Object) (metav1.Object, error)

SyncObject performs a two-way synchronization between the given object and a pending API call held within the dispatcher and returns the modified object.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL