StopObserver stops the service and http API server returned by StartObserver.
(service *Service, httpServer *http.Server)
| 83 | |
| 84 | // StopObserver stops the service and http API server returned by StartObserver. |
| 85 | func StopObserver(service *Service, httpServer *http.Server) (err error) { |
| 86 | // stop explorer api |
| 87 | if err = stopAPI(httpServer); err != nil { |
| 88 | log.WithError(err).Fatal("stop explorer api failed") |
| 89 | } |
| 90 | |
| 91 | // stop subscriptions |
| 92 | if err = stopService(service); err != nil { |
| 93 | log.WithError(err).Fatal("stop service failed") |
| 94 | } |
| 95 | return |
| 96 | } |
no test coverage detected