github.com/annwntech/go-micro/v2@v2.9.5/config/source/env/watcher.go (about) 1 package env 2 3 import ( 4 "github.com/annwntech/go-micro/v2/config/source" 5 ) 6 7 type watcher struct { 8 exit chan struct{} 9 } 10 11 func (w *watcher) Next() (*source.ChangeSet, error) { 12 <-w.exit 13 14 return nil, source.ErrWatcherStopped 15 } 16 17 func (w *watcher) Stop() error { 18 close(w.exit) 19 return nil 20 } 21 22 func newWatcher() (source.Watcher, error) { 23 return &watcher{exit: make(chan struct{})}, nil 24 }