kubernetesk8s.io/kubernetes/pkg/scheduler/backend/api_dispatcher Index | Files

package apidispatcher

import "k8s.io/kubernetes/pkg/scheduler/backend/api_dispatcher"

Index

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.

Source Files

api_dispatcher.go call_queue.go goroutines_limiter.go

Version
v1.35.0-alpha.0
Published
Aug 2, 2025
Platform
windows/amd64
Imports
14 packages
Last checked
18 minutes ago

Tools for package owners.