2019-05-31 01:11:13 +03:00
|
|
|
package env
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/micro/go-micro/config/source"
|
|
|
|
)
|
|
|
|
|
|
|
|
type watcher struct {
|
|
|
|
exit chan struct{}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (w *watcher) Next() (*source.ChangeSet, error) {
|
|
|
|
<-w.exit
|
|
|
|
|
2019-08-21 00:32:47 +03:00
|
|
|
return nil, source.ErrWatcherStopped
|
2019-05-31 01:11:13 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
func (w *watcher) Stop() error {
|
|
|
|
close(w.exit)
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func newWatcher() (source.Watcher, error) {
|
|
|
|
return &watcher{exit: make(chan struct{})}, nil
|
|
|
|
}
|