func (pw *proxyWatcher) StopChan() <-chan struct{} {
	return pw.stopCh
}
StopChan returns stop channel
package duck
import (
	"sync"
	"k8s.io/apimachinery/pkg/watch"
)
type proxyWatcher struct {
	result chan watch.Event
	stopCh chan struct{}
	mutex   sync.Mutex
	stopped bool
}
var _ watch.Interface = (*proxyWatcher)(nil)
func NewProxyWatcher(ch chan watch.Event) watch.Interface {
	return &proxyWatcher{
		result:  ch,
		stopCh:  make(chan struct{}),
		stopped: false,
	}
}
func (pw *proxyWatcher) Stop() {
	pw.mutex.Lock()
	defer pw.mutex.Unlock()
	if !pw.stopped {
		pw.stopped = true
		close(pw.stopCh)
	}
}
func (pw *proxyWatcher) Stopping() bool {
	pw.mutex.Lock()
	defer pw.mutex.Unlock()
	return pw.stopped
}
func (pw *proxyWatcher) ResultChan() <-chan watch.Event {
	return pw.result
}