From 3800c27ff9ec2641248d6dc2ce2f7ab56c237664 Mon Sep 17 00:00:00 2001 From: Wolfy-J Date: Sat, 4 May 2019 23:07:30 +0300 Subject: golint --- service/http/service.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'service/http/service.go') 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() -- cgit v1.2.3