health check endpoint for checking both the SQL store and also influx (#372)

This commit is contained in:
Michael Quigley
2023-08-08 13:48:34 -04:00
parent e4a1261e73
commit 7cc83e3e69
4 changed files with 75 additions and 3 deletions

View File

@@ -128,6 +128,7 @@ func Run(inCfg *config.Config) error {
defer func() { _ = server.Shutdown() }()
server.Host = cfg.Endpoint.Host
server.Port = cfg.Endpoint.Port
rest_server_zrok.HealthCheck = HealthCheckHTTP
server.ConfigureAPI()
if err := server.Serve(); err != nil {
return errors.Wrap(err, "api server error")
@@ -135,3 +136,7 @@ func Run(inCfg *config.Config) error {
return nil
}
func Store() *store.Store {
return str
}