httpServer.go 397 B

12345678910111213141516
  1. package httpservers
  2. import (
  3. config "github.com/OliveTin/OliveTin/internal/config"
  4. "github.com/OliveTin/OliveTin/internal/executor"
  5. )
  6. // StartServers will start 3 HTTP servers. The WebUI, the Rest API, and a proxy
  7. // for both of them.
  8. func StartServers(cfg *config.Config, ex *executor.Executor) {
  9. if cfg.Prometheus.Enabled {
  10. go StartPrometheus(cfg)
  11. }
  12. StartSingleHTTPFrontend(cfg, ex)
  13. }