Versions in this module Expand all Collapse all v0 v0.1.0 May 21, 2021 Changes in this version + type ExternalServiceList struct + HealthCheck bool + Init Initialiser + func NewServiceList(initialiser Initialiser) *ExternalServiceList + func (e *ExternalServiceList) GetHTTPServer(bindAddr string, router http.Handler) HTTPServer + func (e *ExternalServiceList) GetHealthCheck(cfg *config.Config, buildTime, gitCommit, version string) (HealthChecker, error) + type HTTPServer interface + ListenAndServe func() error + Shutdown func(ctx context.Context) error + type HealthChecker interface + AddCheck func(name string, checker healthcheck.Checker) (err error) + Handler func(w http.ResponseWriter, req *http.Request) + Start func(ctx context.Context) + Stop func() + type Init struct + func (e *Init) DoGetHTTPServer(bindAddr string, router http.Handler) HTTPServer + func (e *Init) DoGetHealthCheck(cfg *config.Config, buildTime, gitCommit, version string) (HealthChecker, error) + type Initialiser interface + DoGetHTTPServer func(bindAddr string, router http.Handler) HTTPServer + DoGetHealthCheck func(cfg *config.Config, buildTime, gitCommit, version string) (HealthChecker, error) + type Service struct + Api *api.API + Config *config.Config + HealthCheck HealthChecker + Router *mux.Router + Server HTTPServer + ServiceList *ExternalServiceList + func Run(ctx context.Context, cfg *config.Config, serviceList *ExternalServiceList, ...) (*Service, error) + func (svc *Service) Close(ctx context.Context) error