PredicateMetadata factory and optimization, Cleaned up some comments,

Comments addressed, Make emptyMetadataProducer a func to avoid casting,
FakeSvcLister: remove error return for len(svc)=0.  New test for
predicatePrecomp to make method semantics explictly enforced when meta
is missing. Precompute wrapper.
This commit is contained in:
jayunit100
2016-10-12 12:03:01 -04:00
parent 66a0aa64c2
commit 08cff0157d
13 changed files with 250 additions and 107 deletions

View File

@@ -66,6 +66,11 @@ func init() {
return priorities.PriorityMetadata
})
factory.RegisterPredicateMetadataProducerFactory(
func(args factory.PluginFactoryArgs) algorithm.MetadataProducer {
return predicates.NewPredicateMetadataFactory(args.PodLister)
})
// EqualPriority is a prioritizer function that gives an equal weight of one to all nodes
// Register the priority function so that its available
// but do not include it as part of the default priorities