diff options
Diffstat (limited to 'service/http/service.go')
-rw-r--r-- | service/http/service.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/service/http/service.go b/service/http/service.go index 1239acca..8105d218 100644 --- a/service/http/service.go +++ b/service/http/service.go @@ -25,7 +25,7 @@ const ( // http middleware type. type middleware func(f http.HandlerFunc) http.HandlerFunc -// Services manages rr, http servers. +// Service manages rr, http servers. type Service struct { cfg *Config env env.Environment @@ -39,8 +39,8 @@ type Service struct { https *http.Server } -// AddController attaches controller. Currently only one controller is supported. -func (s *Service) AddController(w roadrunner.Controller) { +// Attach attaches controller. Currently only one controller is supported. +func (s *Service) Attach(w roadrunner.Controller) { s.controller = w } @@ -85,7 +85,7 @@ func (s *Service) Serve() error { s.rr.Listen(s.throw) if s.controller != nil { - s.rr.Watch(s.controller) + s.rr.Attach(s.controller) } s.handler = &Handler{cfg: s.cfg, rr: s.rr} @@ -113,7 +113,7 @@ func (s *Service) Serve() error { return <-err } -// Detach stops the svc. +// Stop stops the http. func (s *Service) Stop() { s.mu.Lock() defer s.mu.Unlock() |