diff options
author | Wolfy-J <[email protected]> | 2019-05-03 12:30:02 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2019-05-03 12:30:02 +0300 |
commit | 3454c00ac37a141d7bb8db6990d90606f1bb14b3 (patch) | |
tree | ec92ac8717b9efe80fe9b9eb21fbcf986e6443f0 /service/http/service.go | |
parent | 9b886ceab6a63e8264f2b2c9d35d76628085dbd6 (diff) |
added pool watcher capability
Diffstat (limited to 'service/http/service.go')
-rw-r--r-- | service/http/service.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/service/http/service.go b/service/http/service.go index 1a06a76a..47175ec3 100644 --- a/service/http/service.go +++ b/service/http/service.go @@ -118,6 +118,14 @@ func (s *Service) Stop() { go s.http.Shutdown(context.Background()) } +// Server returns associated roadrunner server (if any). +func (s *Service) Server() *roadrunner.Server { + s.mu.Lock() + defer s.mu.Unlock() + + return s.rr +} + // ServeHTTP handles connection using set of middleware and rr PSR-7 server. func (s *Service) ServeHTTP(w http.ResponseWriter, r *http.Request) { if s.https != nil && r.TLS == nil && s.cfg.SSL.Redirect { |