router: update interface (#1732)

* router: replace Start and Stop with Close

* router: update default network to micro

* router: update tests
This commit is contained in:
ben-toogood
2020-06-24 11:09:16 +01:00
committed by GitHub
parent 695cc9d526
commit c940961574
8 changed files with 33 additions and 42 deletions

View File

@@ -85,13 +85,6 @@ func (s *svc) Table() router.Table {
return s.table
}
// Start starts the service
func (s *svc) Start() error {
s.Lock()
defer s.Unlock()
return nil
}
func (s *svc) advertiseEvents(advertChan chan *router.Advert, stream pb.Router_AdvertiseService) error {
go func() {
<-s.exit
@@ -202,8 +195,8 @@ func (s *svc) Process(advert *router.Advert) error {
return nil
}
// Remote router cannot be stopped
func (s *svc) Stop() error {
// Remote router cannot be closed
func (s *svc) Close() error {
s.Lock()
defer s.Unlock()