api

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2025 License: Apache-2.0 Imports: 4 Imported by: ? modules, 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

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HandlerFactory

type HandlerFactory = func(client client.Client, args string) (MutatingHandler, error)

HandlerFactory is a function that builds a MutatingHandler.

type MutatingHandler

type MutatingHandler interface {
	// Mutate injects affinity info into pod
	// if a plugin return true, it means that no need to call other plugins
	// map[string]base.RuntimeInfoInterface's key is pvcName
	Mutate(*corev1.Pod, map[string]base.RuntimeInfoInterface) (shouldStop bool, err error)
	// GetName returns the name of plugin
	GetName() string
}

MutatingHandler defines the interface for mutating a pod, implementations should be thread(goroutine) safe.

type Registry

type Registry map[string]HandlerFactory

func (Registry) Register

func (r Registry) Register(name string, factory HandlerFactory) error

type RegistryHandler

type RegistryHandler interface {
	GetPodWithoutDatasetHandler() []MutatingHandler
	GetPodWithDatasetHandler() []MutatingHandler
	GetServerlessPodWithDatasetHandler() []MutatingHandler
	GetServerlessPodWithoutDatasetHandler() []MutatingHandler
}

RegistryHandler record the active plugins including two kinds: plugins for pod with no dataset mounted and with dataset mounted

Jump to

Keyboard shortcuts

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