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
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
Click to show internal directories.
Click to hide internal directories.