Documentation ¶
Overview ¶
Copyright Axis Communications AB.
For a full list of individual contributors, please see the commit history.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright Axis Communications AB.
For a full list of individual contributors, please see the commit history.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func New(cfg config.Config, log *logrus.Entry, provider provider.Provider, ...) application.Application
- func RespondWithError(w http.ResponseWriter, code int, message string)
- func RespondWithJSON(w http.ResponseWriter, code int, payload interface{})
- type Dataset
- type ProviderServiceApplication
- type ProviderServiceHandler
- func (h ProviderServiceHandler) ExecutorStart(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
- func (h ProviderServiceHandler) Selftest(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
- func (h ProviderServiceHandler) Start(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func (h ProviderServiceHandler) Status(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func (h ProviderServiceHandler) Stop(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- type StartRequest
- type StartResponse
- type StatusRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(cfg config.Config, log *logrus.Entry, provider provider.Provider, ctx context.Context) application.Application
New returns a new ProviderServiceApplication object/struct
func RespondWithError ¶
func RespondWithError(w http.ResponseWriter, code int, message string)
RespondWithError writes a JSON response with an error message and status code to the HTTP ResponseWriter.
func RespondWithJSON ¶
func RespondWithJSON(w http.ResponseWriter, code int, payload interface{})
RespondWithJSON writes a JSON response with a status code to the HTTP ResponseWriter.
Types ¶
type ProviderServiceApplication ¶
type ProviderServiceApplication struct {
// contains filtered or unexported fields
}
func (*ProviderServiceApplication) Close ¶
func (a *ProviderServiceApplication) Close()
Close waits for all active jobs to finish
func (ProviderServiceApplication) LoadRoutes ¶
func (a ProviderServiceApplication) LoadRoutes(router *httprouter.Router)
LoadRoutes loads all the v1alpha1 routes.
type ProviderServiceHandler ¶
type ProviderServiceHandler struct {
// contains filtered or unexported fields
}
func (ProviderServiceHandler) ExecutorStart ¶
func (h ProviderServiceHandler) ExecutorStart(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
Start starts up a testrunner job and waits for it to start completely
func (ProviderServiceHandler) Selftest ¶
func (h ProviderServiceHandler) Selftest(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
Selftest is a handler to just return 204.
func (ProviderServiceHandler) Start ¶
func (h ProviderServiceHandler) Start(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
Start handles the start request and checks out execution spaces
func (ProviderServiceHandler) Status ¶
func (h ProviderServiceHandler) Status(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
Status handles the status request, gets and returns the execution space checkout status
func (ProviderServiceHandler) Stop ¶
func (h ProviderServiceHandler) Stop(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
Stop handles the stop request, stops the execution space executors and checks in all the provided execution spaces
type StartRequest ¶
type StartRequest struct { MinimumAmount int `json:"minimum_amount"` MaximumAmount int `json:"maximum_amount"` TestRunner string `json:"test_runner"` Environment map[string]string `json:"environment"` ArtifactIdentity string `json:"identity"` ArtifactID string `json:"artifact_id"` ArtifactCreated eiffelevents.ArtifactCreatedV3 `json:"artifact_created,omitempty"` ArtifactPublished eiffelevents.ArtifactPublishedV3 `json:"artifact_published,omitempty"` TERCC eiffelevents.TestExecutionRecipeCollectionCreatedV4 `json:"tercc,omitempty"` Dataset Dataset `json:"dataset,omitempty"` Context uuid.UUID `json:"context,omitempty"` }