Documentation ¶
Index ¶
- Constants
- Variables
- func Health(manager environment.Manager) http.HandlerFunc
- func NewRouter(runnerManager runner.Manager, environmentManager environment.ManagerHandler) *mux.Router
- func StatisticsExecutionEnvironments(manager environment.Manager) http.HandlerFunc
- func Version(writer http.ResponseWriter, request *http.Request)
- type EnvironmentController
- type ExecutionEnvironmentsResponse
- type RunnerController
Constants ¶
View Source
const ( BasePath = "/api/v1" HealthPath = "/health" VersionPath = "/version" RunnersPath = "/runners" EnvironmentsPath = "/execution-environments" StatisticsPath = "/statistics" )
View Source
const ( ExecutePath = "/execute" WebsocketPath = "/websocket" UpdateFileSystemPath = "/files" ListFileSystemRouteName = UpdateFileSystemPath + "_list" FileContentRawPath = UpdateFileSystemPath + "/raw" ProvideRoute = "provideRunner" DeleteRoute = "deleteRunner" RunnerIDKey = "runnerId" ExecutionIDKey = "executionID" PathKey = "path" RecursiveKey = "recursive" PrivilegedExecutionKey = "privilegedExecution" )
Variables ¶
View Source
var ErrForbiddenCharacter = errors.New("use of forbidden character")
View Source
var ErrMissingURLParameter = errors.New("url parameter missing")
View Source
var ErrPrewarmingPoolDepleting = errors.New("the prewarming pool is depleting")
View Source
var ErrUnknownExecutionID = errors.New("execution id unknown")
Functions ¶
func Health ¶
func Health(manager environment.Manager) http.HandlerFunc
Health handles the health route. It responds that the server is alive. If it is not, the response won't reach the client.
func NewRouter ¶
func NewRouter(runnerManager runner.Manager, environmentManager environment.ManagerHandler) *mux.Router
NewRouter returns a *mux.Router which can be used by the net/http package to serve the routes of our API. It always returns a router for the newest version of our API. We use gorilla/mux because it is more convenient than net/http, e.g. when extracting path parameters.
func StatisticsExecutionEnvironments ¶
func StatisticsExecutionEnvironments(manager environment.Manager) http.HandlerFunc
StatisticsExecutionEnvironments handles the route for statistics about execution environments. It responds the prewarming pool size and the number of idle runners and used runners.
Types ¶
type EnvironmentController ¶
type EnvironmentController struct {
// contains filtered or unexported fields
}
func (*EnvironmentController) ConfigureRoutes ¶
func (e *EnvironmentController) ConfigureRoutes(router *mux.Router)
type ExecutionEnvironmentsResponse ¶
type ExecutionEnvironmentsResponse struct {
ExecutionEnvironments []runner.ExecutionEnvironment `json:"executionEnvironments"`
}
type RunnerController ¶
type RunnerController struct {
// contains filtered or unexported fields
}
func (*RunnerController) ConfigureRoutes ¶
func (r *RunnerController) ConfigureRoutes(router *mux.Router)
ConfigureRoutes configures a given router with the runner routes of our API.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.