handler

package
v0.0.0-...-dcfb068 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeCacheHandlerWrapper

func MakeCacheHandlerWrapper() *handlerWrapper

Types

type CacheHandler

type CacheHandler interface {
	SchedulerName() string
	SchedulerType() string
	SubCluster() string
	SwitchType() framework.SwitchType

	// TODO: Revisit this and split the judgment section on whether storage needs to be enabled.
	IsStoreEnabled(string) bool

	TTL() time.Duration
	Period() time.Duration
	StopCh() <-chan struct{}

	PodLister() corelister.PodLister
	PodInformer() coreinformers.PodInformer

	// GetNodeInfo return the NodeInfo before NodeStore handle the event.
	GetNodeInfo(string) framework.NodeInfo
	// GetPodState return the PodState before PodStore handle the event.
	GetPodState(string) (*framework.CachePodState, bool)

	SetNodeHandler(NodeHandler)
	SetPodHandler(PodHandler)

	PodOp(pod *v1.Pod, isAdd bool, skippStores sets.String) error
	SetPodOpFunc(PodOpFunc)
}

type NodeHandler

type NodeHandler func(string) framework.NodeInfo

type PodHandler

type PodHandler func(string) (*framework.CachePodState, bool)

type PodOpFunc

type PodOpFunc func(pod *v1.Pod, isAdd bool, skippStores sets.String) error

Jump to

Keyboard shortcuts

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