handler

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 10 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	RequeueAfterWhenPrefixNotAvailable = time.Minute * 2
	RequeueAfterWhenWPEmpty            = time.Millisecond * 600
	RequeueAfterWhenResourceCooling    = time.Second * 20
	ReasonResourceAllocationFailed     = "ResourceAllocationFailed"
	ReasonResourceAllocated            = "ResourceAllocated"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	HandleCreate(requestCount int, pod *v1.Pod) (ctrl.Result, error)
	HandleDelete(pod *v1.Pod) (ctrl.Result, error)
}

Handler interface allows different types of resource implementation to be clubbed under a single handler. For instance, warm resource handler would handle all the types of resources that support warm pools. An example of warm pool resource is IPv4. Another example of handler is on demand handler, resources that can be only processed on demand would fit into this category. For instance, Branch ENIs are tied to the Security Group required by the pod which we would know only after receiving the pod request.

func NewOnDemandHandler

func NewOnDemandHandler(log logr.Logger, resourceName string,
	ondDemandProvider provider.ResourceProvider) Handler

NewOnDemandHandler returns a new on demand handler with all the workers that can handle particular resource types

func NewWarmResourceHandler

func NewWarmResourceHandler(log logr.Logger, wrapper api.Wrapper,
	resourceName string, resourceProviders provider.ResourceProvider, ctx context.Context) Handler

Jump to

Keyboard shortcuts

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