Documentation ¶
Overview ¶
Package score exports an api.ScorePlugin to the host. Only import this package when setting Plugin, as doing otherwise will cause overhead.
Index ¶
Constants ¶
View Source
const ( // MaxNodeScore is the maximum score a Score plugin is expected to return. MaxNodeScore int64 = 100 )
Variables ¶
This section is empty.
Functions ¶
func SetPlugin ¶
func SetPlugin(scorePlugin api.ScorePlugin)
SetPlugin should be called in `main` to assign an api.ScorePlugin instance.
For example:
func main() { score.SetPlugin(scorePlugin{}) } type scorePlugin struct{} func (scorePlugin) Score(state api.CycleState, pod api.Pod, nodeName string) (score int32, status *api.Status) { panic("implement me") }
Note: If you need state, you can assign it with prescore.SetPlugin.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.