providerservice

package
v0.0.0-...-44c4069 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 34 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

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 Dataset

type Dataset struct {
	ETRBranch string `json:"ETR_BRANCH"`
	ETRRepo   string `json:"ETR_REPO"`
}

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

Start starts up a testrunner job and waits for it to start completely

func (ProviderServiceHandler) Selftest

Selftest is a handler to just return 204.

func (ProviderServiceHandler) Start

Start handles the start request and checks out execution spaces

func (ProviderServiceHandler) Status

Status handles the status request, gets and returns the execution space checkout status

func (ProviderServiceHandler) Stop

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"`
}

type StartResponse

type StartResponse struct {
	ID uuid.UUID `json:"id"`
}

type StatusRequest

type StatusRequest struct {
	ID uuid.UUID `json:"id"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL