Add Watch to /pods.

This commit is contained in:
Daniel Smith
2014-08-11 12:58:19 -07:00
parent 053e75d8e9
commit e40e5b53a7
4 changed files with 28 additions and 0 deletions

View File

@@ -17,10 +17,12 @@ limitations under the License.
package registrytest
import (
"errors"
"sync"
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels"
"github.com/GoogleCloudPlatform/kubernetes/pkg/watch"
)
type PodRegistry struct {
@@ -51,6 +53,10 @@ func (r *PodRegistry) ListPods(selector labels.Selector) ([]api.Pod, error) {
return filtered, nil
}
func (r *PodRegistry) WatchPods(label, field labels.Selector, resourceVersion uint64) (watch.Interface, error) {
return nil, errors.New("unimplemented")
}
func (r *PodRegistry) GetPod(podId string) (*api.Pod, error) {
r.Lock()
defer r.Unlock()