diff options
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 { |