diff options
author | Wolfy-J <[email protected]> | 2019-05-04 23:07:30 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2019-05-04 23:07:30 +0300 |
commit | 3800c27ff9ec2641248d6dc2ce2f7ab56c237664 (patch) | |
tree | c8026df76f0fea5519f958d310210e1da46f369d /service/limit/service.go | |
parent | 2afa417f4f46b31b79043e3e56513d51e4ad2fde (diff) |
golint
Diffstat (limited to 'service/limit/service.go')
-rw-r--r-- | service/limit/service.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/service/limit/service.go b/service/limit/service.go index 72673d1f..99e2b1ee 100644 --- a/service/limit/service.go +++ b/service/limit/service.go @@ -8,13 +8,13 @@ import ( // ID defines controller service name. const ID = "constrain" -// Controllable defines the ability to attach rr controller. -type Controllable interface { - // AddController attaches controller to the service. - AddController(c roadrunner.Controller) +// controllable defines the ability to attach rr controller. +type controllable interface { + // Attach attaches controller to the service. + Attach(c roadrunner.Controller) } -// Services to control the state of rr service inside other services. +// Service to control the state of rr service inside other services. type Service struct { cfg *Config lsns []func(event int, ctx interface{}) @@ -25,8 +25,8 @@ func (s *Service) Init(cfg *Config, c service.Container) (bool, error) { // mount Services to designated services for id, watcher := range cfg.Controllers(s.throw) { svc, _ := c.Get(id) - if ctrl, ok := svc.(Controllable); ok { - ctrl.AddController(watcher) + if ctrl, ok := svc.(controllable); ok { + ctrl.Attach(watcher) } } |