Skip to content

Commit

Permalink
syntactic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
asim committed Jul 29, 2019
1 parent 8855beb commit 8fdc050
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion network/router/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ var (

// router implements default router
type router struct {
sync.RWMutex
// embed the table
*table
opts Options
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion network/router/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion network/router/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8fdc050

Please sign in to comment.