Documentation ¶
Index ¶
- func MapToNodeScoreList(scoreMap map[string]int) []framework.NodeScore
- func NewFromConfig(ctx context.Context, pluginName string, config PluginConfig, ...) (framework.Plugin, error)
- func NodeScoreListToMap(nodeScoreList []framework.NodeScore) map[string]int
- func PluginFactory(pluginName string) frameworkruntime.PluginFactory
- type EventMessage
- type ObjectReference
- type PluginConfig
- type ProfilerSupport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MapToNodeScoreList ¶
Transforms a map of node names and scores (as integers) into a slice of framework.NodeScore structures.
func NewFromConfig ¶
func NewFromConfig(ctx context.Context, pluginName string, config PluginConfig, frameworkHandle framework.Handle) (framework.Plugin, error)
NewFromConfig is like New, except it allows us to explicitly provide the context and configuration of the plugin. This allows flexibility in tests.
func NodeScoreListToMap ¶
Converts a list of framework.NodeScore to a map with node names as keys and their scores as integer values.
func PluginFactory ¶
func PluginFactory(pluginName string) frameworkruntime.PluginFactory
Types ¶
type EventMessage ¶
type EventMessage struct { RegardingReference ObjectReference RelatedReference ObjectReference Eventtype string Reason string Action string Note string }
type ObjectReference ¶
type PluginConfig ¶
type PluginConfig struct { // GuestURL is the URL to the guest wasm. // Valid schemes are file:// for a local file or http[s]:// for one // retrieved via HTTP. GuestURL string `json:"guestURL"` // GuestConfig is any configuration to give to the guest. GuestConfig string `json:"guestConfig"` // LogSeverity has the following values: // // - 0: info (default) // - 1: warning // - 2: error // - 3: fatal LogSeverity int32 `json:"logSeverity"` // Args are the os.Args the guest will receive, exposed for tests. Args []string }
type ProfilerSupport ¶
type ProfilerSupport interface { Guest() wazero.CompiledModule // contains filtered or unexported methods }
ProfilerSupport exposes functions needed to profile the guest with wzprof.
Click to show internal directories.
Click to hide internal directories.