Initial commit after restructure

This commit is contained in:
Daniel
2018-08-13 14:14:27 +02:00
commit bdeddc41f9
177 changed files with 26108 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
package environment
import (
"sync"
)
var (
networkChangedEventCh = make(chan struct{}, 0)
networkChangedEventLock sync.Mutex
)
func triggerNetworkChanged() {
networkChangedEventLock.Lock()
defer networkChangedEventLock.Unlock()
close(networkChangedEventCh)
networkChangedEventCh = make(chan struct{}, 0)
}
func NetworkChanged() <-chan struct{} {
networkChangedEventLock.Lock()
defer networkChangedEventLock.Unlock()
return networkChangedEventCh
}