Add the Environment ID to the influxdb data.

Also move the interface of an execution environment into its own file, execution_environment.go.
This commit is contained in:
Maximilian Paß
2022-04-10 23:02:33 +02:00
parent b7a20e3114
commit eabe3a1b27
7 changed files with 85 additions and 57 deletions

View File

@ -47,8 +47,8 @@ func configureV1Router(router *mux.Router,
w.WriteHeader(http.StatusNotFound)
})
v1 := router.PathPrefix(BasePath).Subrouter()
v1.HandleFunc(HealthPath, Health).Methods(http.MethodGet)
v1.HandleFunc(VersionPath, Version).Methods(http.MethodGet)
v1.HandleFunc(HealthPath, Health).Methods(http.MethodGet).Name(HealthPath)
v1.HandleFunc(VersionPath, Version).Methods(http.MethodGet).Name(VersionPath)
runnerController := &RunnerController{manager: runnerManager}
environmentController := &EnvironmentController{manager: environmentManager}
@ -59,7 +59,8 @@ func configureV1Router(router *mux.Router,
// May add a statistics controller if another route joins
statisticsRouter := router.PathPrefix(StatisticsPath).Subrouter()
statisticsRouter.
HandleFunc(EnvironmentsPath, StatisticsExecutionEnvironments(environmentManager)).Methods(http.MethodGet)
HandleFunc(EnvironmentsPath, StatisticsExecutionEnvironments(environmentManager)).
Methods(http.MethodGet).Name(EnvironmentsPath)
}
if auth.InitializeAuthentication() {