syntactic changes

This commit is contained in:
Asim Aslam 2019-07-29 12:44:28 +01:00
parent 8855beb62d
commit 8fdc050e2e
3 changed files with 3 additions and 3 deletions

View File

@ -41,6 +41,7 @@ var (
// router implements default router
type router struct {
sync.RWMutex
// embed the table
*table
opts Options
@ -51,7 +52,6 @@ type router struct {
advertChan chan *Advert
advertWg *sync.WaitGroup
wg *sync.WaitGroup
sync.RWMutex
}
// newRouter creates new router and returns it

View File

@ -17,11 +17,11 @@ var (
// table is an in memory routing table
type table struct {
sync.RWMutex
// routes stores service routes
routes map[string]map[uint64]Route
// watchers stores table watchers
watchers map[string]*tableWatcher
sync.RWMutex
}
// newtable creates a new routing table and returns it

View File

@ -71,10 +71,10 @@ func WatchService(s string) WatchOption {
}
type tableWatcher struct {
sync.RWMutex
opts WatchOptions
resChan chan *Event
done chan struct{}
sync.RWMutex
}
// Next returns the next noticed action taken on table