package apidispatcher
import "k8s.io/kubernetes/pkg/scheduler/backend/api_dispatcher"
Index ¶
- type APIDispatcher
- func New(client clientset.Interface, parallelization int, apiCallRelevances fwk.APICallRelevances) *APIDispatcher
- func (ad *APIDispatcher) Add(newAPICall fwk.APICall, opts fwk.APICallOptions) error
- func (ad *APIDispatcher) Close()
- func (ad *APIDispatcher) Run(logger klog.Logger)
- func (ad *APIDispatcher) SyncObject(obj metav1.Object) (metav1.Object, error)
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 ¶
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.34.0-rc.0
- Published
- Aug 6, 2025
- Platform
- linux/amd64
- Imports
- 14 packages
- Last checked
- 26 seconds ago –
Tools for package owners.