Update godeps
This commit is contained in:
parent
a965f44f84
commit
73e22a50d2
453 changed files with 84778 additions and 70308 deletions
15
vendor/k8s.io/kubernetes/pkg/watch/watch.go
generated
vendored
15
vendor/k8s.io/kubernetes/pkg/watch/watch.go
generated
vendored
|
|
@ -20,6 +20,8 @@ import (
|
|||
"sync"
|
||||
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
|
||||
// Interface can be implemented by anything that knows how to watch and report changes.
|
||||
|
|
@ -89,16 +91,29 @@ func NewFake() *FakeWatcher {
|
|||
}
|
||||
}
|
||||
|
||||
func NewFakeWithChanSize(size int) *FakeWatcher {
|
||||
return &FakeWatcher{
|
||||
result: make(chan Event, size),
|
||||
}
|
||||
}
|
||||
|
||||
// Stop implements Interface.Stop().
|
||||
func (f *FakeWatcher) Stop() {
|
||||
f.Lock()
|
||||
defer f.Unlock()
|
||||
if !f.Stopped {
|
||||
glog.V(4).Infof("Stopping fake watcher.")
|
||||
close(f.result)
|
||||
f.Stopped = true
|
||||
}
|
||||
}
|
||||
|
||||
func (f *FakeWatcher) IsStopped() bool {
|
||||
f.Lock()
|
||||
defer f.Unlock()
|
||||
return f.Stopped
|
||||
}
|
||||
|
||||
// Reset prepares the watcher to be reused.
|
||||
func (f *FakeWatcher) Reset() {
|
||||
f.Lock()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue