Explicitly declare the interfaces for extension points

This make it easier to catch the issue during the compilation, also,
this also align with other plugins, i.e. plugin of "InterPodAffinity".

Signed-off-by: Dave Chen <dave.chen@arm.com>
This commit is contained in:
Dave Chen 2020-06-17 15:11:44 +08:00
parent 53f3699cf9
commit 9ebd872e71
2 changed files with 2 additions and 0 deletions

View File

@ -33,6 +33,7 @@ type DefaultPodTopologySpread struct {
handle framework.FrameworkHandle
}
var _ framework.PreScorePlugin = &DefaultPodTopologySpread{}
var _ framework.ScorePlugin = &DefaultPodTopologySpread{}
const (

View File

@ -28,6 +28,7 @@ import (
// NodePorts is a plugin that checks if a node has free ports for the requested pod ports.
type NodePorts struct{}
var _ framework.PreFilterPlugin = &NodePorts{}
var _ framework.FilterPlugin = &NodePorts{}
const (