Documentation ¶
Index ¶
- Variables
- func CapturePanic(panics func()) (captured string)
- type FakeHandle
- func (h *FakeHandle) AddNominatedPod(logger klog.Logger, pod *framework.PodInfo, node *framework.NominatingInfo)
- func (h *FakeHandle) ClientSet() clientset.Interface
- func (h *FakeHandle) DeleteNominatedPodIfExists(pod *v1.Pod)
- func (h *FakeHandle) EventRecorder() events.EventRecorder
- func (h *FakeHandle) Extenders() []framework.Extender
- func (h *FakeHandle) GetWaitingPod(uid types.UID) (w framework.WaitingPod)
- func (h *FakeHandle) IterateOverWaitingPods(callback func(framework.WaitingPod))
- func (h *FakeHandle) KubeConfig() *restclient.Config
- func (h *FakeHandle) NominatedPodsForNode(nodeName string) (f []*framework.PodInfo)
- func (h *FakeHandle) Parallelizer() (p parallelize.Parallelizer)
- func (h *FakeHandle) RejectWaitingPod(uid types.UID) (b bool)
- func (h *FakeHandle) RunFilterPlugins(context.Context, *framework.CycleState, *v1.Pod, *framework.NodeInfo) (s *framework.Status)
- func (h *FakeHandle) RunFilterPluginsWithNominatedPods(ctx context.Context, state *framework.CycleState, pod *v1.Pod, ...) (s *framework.Status)
- func (h *FakeHandle) RunPreFilterExtensionAddPod(ctx context.Context, state *framework.CycleState, podToSchedule *v1.Pod, ...) (s *framework.Status)
- func (h *FakeHandle) RunPreFilterExtensionRemovePod(ctx context.Context, state *framework.CycleState, podToSchedule *v1.Pod, ...) (s *framework.Status)
- func (h *FakeHandle) RunPreScorePlugins(context.Context, *framework.CycleState, *v1.Pod, []*framework.NodeInfo) (s *framework.Status)
- func (h *FakeHandle) RunScorePlugins(context.Context, *framework.CycleState, *v1.Pod, []*framework.NodeInfo) (n []framework.NodePluginScores, s *framework.Status)
- func (h *FakeHandle) SharedInformerFactory() informers.SharedInformerFactory
- func (h *FakeHandle) SnapshotSharedLister() framework.SharedLister
- func (h *FakeHandle) UpdateNominatedPod(logger klog.Logger, oldPod *v1.Pod, newPodInfo *framework.PodInfo)
- type FakeNodeInfoLister
- func (c *FakeNodeInfoLister) Get(name string) (*framework.NodeInfo, error)
- func (c *FakeNodeInfoLister) HavePodsWithAffinityList() ([]*framework.NodeInfo, error)
- func (c *FakeNodeInfoLister) HavePodsWithRequiredAntiAffinityList() ([]*framework.NodeInfo, error)
- func (c *FakeNodeInfoLister) List() ([]*framework.NodeInfo, error)
- type FakeRecorder
- type FakeSharedLister
Constants ¶
This section is empty.
Variables ¶
View Source
var NodeReal = func() *v1.Node { node := v1.Node{} decodeYaml(yamlNodeReal, &node) return &node }()
NodeReal is a realistic v1.Node used for testing and benchmarks.
View Source
var NodeSmall = &v1.Node{ObjectMeta: apimeta.ObjectMeta{Name: NodeSmallName}}
NodeSmall is the smallest node that works with URLExampleFilterSimple.
View Source
var NodeSmallName = "good-node"
View Source
var PodForHandleTest = &v1.Pod{ ObjectMeta: apimeta.ObjectMeta{ Name: "handle-pod", Namespace: "test", UID: "handle-test", }, Spec: v1.PodSpec{NodeName: NodeSmall.Name}, }
PodForHandleTest is the pod for testing handle.
View Source
var PodReal = func() *v1.Pod { pod := v1.Pod{} decodeYaml(yamlPodReal, &pod) return &pod }()
PodReal is a realistic v1.Pod used for testing and benchmarks.
View Source
var PodSmall = &v1.Pod{ ObjectMeta: apimeta.ObjectMeta{ Name: "good-pod", Namespace: "test", UID: "384900cd-dc7b-41ec-837e-9c4c1762363e", }, Spec: v1.PodSpec{NodeName: NodeSmall.Name}, }
PodSmall is the smallest pod that works with URLExampleFilterSimple.
View Source
var URLErrorNotPlugin = localURL(pathWatError("not_plugin"))
View Source
var URLErrorPanicOnBind = localURL(pathWatError("panic_on_bind"))
View Source
var URLErrorPanicOnEnqueue = localURL(pathWatError("panic_on_enqueue"))
View Source
var URLErrorPanicOnFilter = localURL(pathWatError("panic_on_filter"))
View Source
var URLErrorPanicOnGetConfig = localURL(pathWatError("panic_on_get_config"))
View Source
var URLErrorPanicOnPermit = localURL(pathWatError("panic_on_permit"))
View Source
var URLErrorPanicOnPostBind = localURL(pathWatError("panic_on_postbind"))
View Source
var URLErrorPanicOnPostFilter = localURL(pathWatError("panic_on_postfilter"))
View Source
var URLErrorPanicOnPreBind = localURL(pathWatError("panic_on_prebind"))
View Source
var URLErrorPanicOnPreFilter = localURL(pathWatError("panic_on_prefilter"))
View Source
var URLErrorPanicOnPreFilterExtensions = localURL(pathWatError("panic_on_prefilterextensions"))
View Source
var URLErrorPanicOnPreScore = localURL(pathWatError("panic_on_prescore"))
View Source
var URLErrorPanicOnReserve = localURL(pathWatError("panic_on_reserve"))
View Source
var URLErrorPanicOnScore = localURL(pathWatError("panic_on_score"))
View Source
var URLErrorPanicOnScoreExtensions = localURL(pathWatError("panic_on_scoreextensions"))
View Source
var URLErrorPanicOnStart = localURL(pathWatError("panic_on_start"))
View Source
var URLErrorPreScoreWithoutScore = localURL(pathWatError("prescore_without_score"))
View Source
var URLErrorScoreExtensionsWithoutScore = localURL(pathWatError("scoreextensions_without_score"))
View Source
var URLExampleAdvanced = localURL(pathTinyGoExample("advanced"))
View Source
var URLExampleImageLocality = localURL(pathTinyGoExample("imagelocality"))
View Source
var URLExampleNodeNumber = localURL(pathTinyGoExample("nodenumber"))
View Source
var URLTestAllNoopWat = localURL(pathWatTest("all_noop"))
View Source
var URLTestBind = localURL(pathTinyGoTest("bind"))
View Source
var URLTestBindFromGlobal = localURL(pathWatTest("bind_from_global"))
View Source
var URLTestCycleState = localURL(pathTinyGoTest("cyclestate"))
View Source
var URLTestFilter = localURL(pathTinyGoTest("filter"))
View Source
var URLTestFilterFromGlobal = localURL(pathWatTest("filter_from_global"))
View Source
var URLTestHandle = localURL(pathTinyGoTest("handle"))
View Source
var URLTestPermit = localURL(pathTinyGoTest("permit"))
View Source
var URLTestPermitFromGlobal = localURL(pathWatTest("permit_from_global"))
View Source
var URLTestPostBindFromGlobal = localURL(pathWatTest("postbind_from_global"))
View Source
var URLTestPostFilterFromGlobal = localURL(pathWatTest("postfilter_from_global"))
View Source
var URLTestPreBindFromGlobal = localURL(pathWatTest("prebind_from_global"))
View Source
var URLTestPreFilterExtensionsFromGlobal = localURL(pathWatTest("prefilterextensions_from_global"))
View Source
var URLTestPreFilterFromGlobal = localURL(pathWatTest("prefilter_from_global"))
View Source
var URLTestPreScoreFromGlobal = localURL(pathWatTest("prescore_from_global"))
View Source
var URLTestReserve = localURL(pathTinyGoTest("reserve"))
View Source
var URLTestReserveFromGlobal = localURL(pathWatTest("reserve_from_global"))
View Source
var URLTestScore = localURL(pathTinyGoTest("score"))
View Source
var URLTestScoreExtensionsFromGlobal = localURL(pathWatTest("scoreextensions_from_global"))
View Source
var URLTestScoreFromGlobal = localURL(pathWatTest("score_from_global"))
Functions ¶
func CapturePanic ¶
func CapturePanic(panics func()) (captured string)
CapturePanic returns what was recovered from a panic as a string.
Note: This was originally adapted from wazero require.CapturePanic
Types ¶
type FakeHandle ¶
type FakeHandle struct { Recorder events.EventRecorder RejectWaitingPodValue types.UID }
func (*FakeHandle) AddNominatedPod ¶
func (h *FakeHandle) AddNominatedPod(logger klog.Logger, pod *framework.PodInfo, node *framework.NominatingInfo)
func (*FakeHandle) ClientSet ¶
func (h *FakeHandle) ClientSet() clientset.Interface
func (*FakeHandle) DeleteNominatedPodIfExists ¶
func (h *FakeHandle) DeleteNominatedPodIfExists(pod *v1.Pod)
func (*FakeHandle) EventRecorder ¶
func (h *FakeHandle) EventRecorder() events.EventRecorder
func (*FakeHandle) Extenders ¶
func (h *FakeHandle) Extenders() []framework.Extender
func (*FakeHandle) GetWaitingPod ¶
func (h *FakeHandle) GetWaitingPod(uid types.UID) (w framework.WaitingPod)
func (*FakeHandle) IterateOverWaitingPods ¶
func (h *FakeHandle) IterateOverWaitingPods(callback func(framework.WaitingPod))
func (*FakeHandle) KubeConfig ¶
func (h *FakeHandle) KubeConfig() *restclient.Config
func (*FakeHandle) NominatedPodsForNode ¶
func (h *FakeHandle) NominatedPodsForNode(nodeName string) (f []*framework.PodInfo)
func (*FakeHandle) Parallelizer ¶
func (h *FakeHandle) Parallelizer() (p parallelize.Parallelizer)
func (*FakeHandle) RejectWaitingPod ¶
func (h *FakeHandle) RejectWaitingPod(uid types.UID) (b bool)
func (*FakeHandle) RunFilterPlugins ¶
func (*FakeHandle) RunFilterPluginsWithNominatedPods ¶
func (*FakeHandle) RunPreFilterExtensionAddPod ¶
func (*FakeHandle) RunPreFilterExtensionRemovePod ¶
func (*FakeHandle) RunPreScorePlugins ¶
func (*FakeHandle) RunScorePlugins ¶
func (h *FakeHandle) RunScorePlugins(context.Context, *framework.CycleState, *v1.Pod, []*framework.NodeInfo) (n []framework.NodePluginScores, s *framework.Status)
func (*FakeHandle) SharedInformerFactory ¶
func (h *FakeHandle) SharedInformerFactory() informers.SharedInformerFactory
func (*FakeHandle) SnapshotSharedLister ¶
func (h *FakeHandle) SnapshotSharedLister() framework.SharedLister
func (*FakeHandle) UpdateNominatedPod ¶
func (h *FakeHandle) UpdateNominatedPod(logger klog.Logger, oldPod *v1.Pod, newPodInfo *framework.PodInfo)
type FakeNodeInfoLister ¶
func (*FakeNodeInfoLister) Get ¶
func (c *FakeNodeInfoLister) Get(name string) (*framework.NodeInfo, error)
func (*FakeNodeInfoLister) HavePodsWithAffinityList ¶
func (c *FakeNodeInfoLister) HavePodsWithAffinityList() ([]*framework.NodeInfo, error)
func (*FakeNodeInfoLister) HavePodsWithRequiredAntiAffinityList ¶
func (c *FakeNodeInfoLister) HavePodsWithRequiredAntiAffinityList() ([]*framework.NodeInfo, error)
type FakeRecorder ¶
type FakeRecorder struct {
EventMsg string
}
type FakeSharedLister ¶
type FakeSharedLister struct {
}func (*FakeSharedLister) NodeInfos ¶
func (c *FakeSharedLister) NodeInfos() framework.NodeInfoLister
func (*FakeSharedLister) StorageInfos ¶
func (c *FakeSharedLister) StorageInfos() framework.StorageInfoLister
Click to show internal directories.
Click to hide internal directories.