| // +build !linux,!darwin,!dragonfly,!freebsd,!netbsd,!openbsd |
| // TODO(bprosnitz) Should change for nacl? |
| // Code to signal a network change every 2 minutes. We use |
| // this for systems where we don't yet have a good way to |
| // watch for network changes. |
| type timerNetConfigWatcher struct { |
| c chan struct{} // channel to signal confg changes |
| stop chan struct{} // channel to tell the watcher to stop |
| func (w *timerNetConfigWatcher) Stop() { |
| func (w *timerNetConfigWatcher) Channel() chan struct{} { |
| func (w *timerNetConfigWatcher) watcher() { |
| case <-time.NewTimer(2 * time.Minute).C: |
| func NewNetConfigWatcher() (NetConfigWatcher, error) { |
| w := &timerNetConfigWatcher{} |
| w.c = make(chan struct{}) |
| w.stop = make(chan struct{}, 1) |
| func GetIPRoutes(defaultOnly bool) []*IPRoute { |
| // TODO(nlacasse,bprosnitz): Consider implementing? For now return |
| // empty array, since that seems to keep things working. |