syntactic changes
This commit is contained in:
parent
8855beb62d
commit
8fdc050e2e
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user