2014-07-23 23:09:37 +00:00
|
|
|
/*
|
2015-05-01 16:19:44 +00:00
|
|
|
Copyright 2014 The Kubernetes Authors All rights reserved.
|
2014-07-23 23:09:37 +00:00
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2014-08-11 07:34:59 +00:00
|
|
|
package registrytest
|
2014-07-23 23:09:37 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
|
2015-05-08 11:01:09 +00:00
|
|
|
"github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/scheduler/algorithm"
|
2014-07-23 23:09:37 +00:00
|
|
|
)
|
|
|
|
|
2014-08-11 07:34:59 +00:00
|
|
|
type Scheduler struct {
|
|
|
|
Err error
|
2015-04-20 18:20:53 +00:00
|
|
|
Pod *api.Pod
|
2014-08-11 07:34:59 +00:00
|
|
|
Machine string
|
|
|
|
}
|
2014-07-23 23:09:37 +00:00
|
|
|
|
2015-05-08 11:01:09 +00:00
|
|
|
func (s *Scheduler) Schedule(pod *api.Pod, lister algorithm.MinionLister) (string, error) {
|
2014-08-11 07:34:59 +00:00
|
|
|
s.Pod = pod
|
|
|
|
return s.Machine, s.Err
|
2014-07-23 23:09:37 +00:00
|
|
|
}
|