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

package apicache

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

Index

Types

type APICache

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

APICache is responsible for sending API calls' requests through scheduling queue or cache.

func New

func New(schedulingQueue internalqueue.SchedulingQueue, cache internalcache.Cache) *APICache

func (*APICache) BindPod

func (c *APICache) BindPod(binding *v1.Binding) (<-chan error, error)

BindPod sends a binding request through a cache. The binding could be first applied to the cached Pod object and then the API call is executed asynchronously. It returns a channel that can be used to wait for the call's completion.

func (*APICache) PatchPodStatus

func (c *APICache) PatchPodStatus(pod *v1.Pod, condition *v1.PodCondition, nominatingInfo *framework.NominatingInfo) (<-chan error, error)

PatchPodStatus sends a patch request for a Pod's status through a scheduling queue. The patch could be first applied to the cached Pod object and then the API call is executed asynchronously. It returns a channel that can be used to wait for the call's completion.

func (*APICache) WaitOnFinish

func (c *APICache) WaitOnFinish(ctx context.Context, onFinish <-chan error) error

WaitOnFinish blocks until the result of an API call is sent to the given onFinish channel (returned by methods BindPod or PreemptPod).

It returns the error received from the channel. It also returns nil if the call was skipped or overwritten, as these are considered successful lifecycle outcomes.

Source Files

api_cache.go

Version
v1.34.0-rc.0
Published
Aug 6, 2025
Platform
darwin/amd64
Imports
6 packages
Last checked
4 minutes ago

Tools for package owners.