package apicache
import "k8s.io/kubernetes/pkg/scheduler/backend/api_cache"
Index ¶
- type APICache
- func New(schedulingQueue internalqueue.SchedulingQueue, cache internalcache.Cache) *APICache
- func (c *APICache) BindPod(binding *v1.Binding) (<-chan error, error)
- func (c *APICache) PatchPodStatus(pod *v1.Pod, condition *v1.PodCondition, nominatingInfo *framework.NominatingInfo) (<-chan error, error)
- func (c *APICache) WaitOnFinish(ctx context.Context, onFinish <-chan error) error
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 ¶
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 ¶
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.35.0-alpha.0
- Published
- Aug 2, 2025
- Platform
- windows/amd64
- Imports
- 6 packages
- Last checked
- 8 minutes ago –
Tools for package owners.