@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
14
14
limitations under the License.
15
15
*/
16
16
17
- package prebind
17
+ package noop
18
18
19
19
import (
20
20
"k8s.io/api/core/v1"
@@ -23,27 +23,28 @@ import (
23
23
framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1"
24
24
)
25
25
26
- // NoOpFilter is a plugin that implements the filter plugin and always returns Success.
26
+ // Filter is a plugin that implements the filter plugin and always returns Success.
27
27
// This is just to make sure that all code dependencies are properly addressed while
28
28
// working on legitimate plugins.
29
- type NoOpFilter struct {}
29
+ // Note: The struct cannot be named NoOpFilter, otherwise the golint check cannot pass
30
+ type Filter struct {}
30
31
31
- var _ = framework .FilterPlugin (NoOpFilter {})
32
+ var _ = framework .FilterPlugin (Filter {})
32
33
33
34
// Name is the name of the plugin used in Registry and configurations.
34
35
const Name = "noop-filter"
35
36
36
37
// Name returns name of the plugin. It is used in logs, etc.
37
- func (n NoOpFilter ) Name () string {
38
+ func (n Filter ) Name () string {
38
39
return Name
39
40
}
40
41
41
42
// Filter invoked at the filter extension point.
42
- func (n NoOpFilter ) Filter (pc * framework.PluginContext , pod * v1.Pod , nodeName string ) * framework.Status {
43
+ func (n Filter ) Filter (pc * framework.PluginContext , pod * v1.Pod , nodeName string ) * framework.Status {
43
44
return nil
44
45
}
45
46
46
47
// New initializes a new plugin and returns it.
47
48
func New (_ * runtime.Unknown , _ framework.FrameworkHandle ) (framework.Plugin , error ) {
48
- return & NoOpFilter {}, nil
49
+ return & Filter {}, nil
49
50
}
0 commit comments