Documentation ¶
Index ¶
- Constants
- Variables
- func Done(status string) bool
- func FilterSuites(p *Project, suiteName string) error
- func GetCanonicalServiceName(serviceName string) string
- func SetDefaults(p *Project)
- func Validate(p Project) error
- func ValidateServices(service []SuiteService, suiteName string) error
- type ArtifactList
- type Auth
- type Container
- type Defaults
- type EnvItem
- type File
- type FileData
- type ImagePullAuth
- type Project
- type Runner
- type RunnerSpec
- type ServerError
- type Service
- type Suite
- type SuiteService
- type Tunnel
Constants ¶
View Source
const ( StateUnknown = "Unknown" StatePending = "Pending" StateRunning = "Running" StateUploading = "Uploading" StateSucceeded = "Succeeded" StateCancelled = "Cancelled" StateFailed = "Failed" StateTerminated = "Terminated" )
The different states that a runner can be in.
Variables ¶
View Source
var ( Kind = "imagerunner" APIVersion = "v1alpha" ValidWorkloadType = []string{ "webdriver", "other", } ValidResourceProfilesFormat = "cXmX" ValidResourceProfilesValidator = regexp.MustCompile("^c([0-9]+)m([0-9]+)$") )
View Source
var DoneStates = []string{StateSucceeded, StateCancelled, StateFailed, StateTerminated}
DoneStates represents states that a runner doesn't transition out of, i.e. once the runner is in one of these states, it's done.
View Source
var ErrResourceNotFound = errors.New("resource not found")
Functions ¶
func FilterSuites ¶ added in v0.137.0
FilterSuites filters out suites in the project that don't match the given suite name.
func GetCanonicalServiceName ¶ added in v0.163.0
func SetDefaults ¶ added in v0.135.0
func SetDefaults(p *Project)
SetDefaults applies config defaults in case the user has left them blank.
func ValidateServices ¶ added in v0.163.0
func ValidateServices(service []SuiteService, suiteName string) error
Types ¶
type ArtifactList ¶ added in v0.133.0
type ImagePullAuth ¶
type Project ¶
type Project struct { config.TypeDef `yaml:",inline" mapstructure:",squash"` Defaults Defaults `yaml:"defaults" json:"defaults"` Sauce config.SauceConfig `yaml:"sauce,omitempty" json:"sauce"` // Used fields are `region` and `tunnel`. Suites []Suite `yaml:"suites,omitempty" json:"suites"` Artifacts config.Artifacts `yaml:"artifacts,omitempty" json:"artifacts"` DryRun bool `yaml:"-" json:"-"` Env map[string]string `yaml:"env,omitempty" json:"env"` EnvFlag map[string]string `yaml:"-" json:"-"` }
type Runner ¶
type Runner struct { ID string `json:"id,omitempty"` Status string `json:"status,omitempty"` Image string `json:"image,omitempty"` CreationTime int64 `json:"creation_time,omitempty"` TerminationTime int64 `json:"termination_time,omitempty"` TerminationReason string `json:"termination_reason,omitempty"` }
type RunnerSpec ¶
type RunnerSpec struct { Container Container `json:"container,omitempty"` EntryPoint string `json:"entrypoint,omitempty"` Env []EnvItem `json:"env,omitempty"` Files []FileData `json:"files,omitempty"` Metadata map[string]string `json:"metadata,omitempty"` Artifacts []string `json:"artifacts,omitempty"` WorkloadType string `json:"workload_type,omitempty"` Tunnel *Tunnel `json:"tunnel,omitempty"` Services []Service `json:"services,omitempty"` }
type ServerError ¶ added in v0.164.1
type ServerError struct { // HTTPStatus is the HTTP status code as returned by the server. HTTPStatus int `json:"-"` // Short is a short error prefix saying what failed, e.g. "failed to do x". Short string `json:"-"` // Code is the error code, such as 'ERR_IMAGE_NOT_ACCESSIBLE'. Code string `json:"code"` // Msg describes the error in more detail. Msg string `json:"message"` }
func (*ServerError) Error ¶ added in v0.164.1
func (s *ServerError) Error() string
type Suite ¶
type Suite struct { Name string `yaml:"name,omitempty" json:"name"` Image string `yaml:"image,omitempty" json:"image"` ImagePullAuth ImagePullAuth `yaml:"imagePullAuth,omitempty" json:"imagePullAuth"` EntryPoint string `yaml:"entrypoint,omitempty" json:"entrypoint"` Files []File `yaml:"files,omitempty" json:"files"` Artifacts []string `yaml:"artifacts,omitempty" json:"artifacts"` Env map[string]string `yaml:"env,omitempty" json:"env"` Timeout time.Duration `yaml:"timeout,omitempty" json:"timeout"` Workload string `yaml:"workload,omitempty" json:"workload,omitempty"` ResourceProfile string `yaml:"resourceProfile,omitempty" json:"resourceProfile,omitempty"` Metadata map[string]string `yaml:"metadata,omitempty" json:"metadata,omitempty"` Services []SuiteService `yaml:"services,omitempty" json:"services,omitempty"` }
type SuiteService ¶ added in v0.163.0
type SuiteService struct { Name string `yaml:"name,omitempty" json:"name"` Image string `yaml:"image,omitempty" json:"image"` ImagePullAuth ImagePullAuth `yaml:"imagePullAuth,omitempty" json:"imagePullAuth"` EntryPoint string `yaml:"entrypoint,omitempty" json:"entrypoint"` Files []File `yaml:"files,omitempty" json:"files"` Env map[string]string `yaml:"env,omitempty" json:"env"` ResourceProfile string `yaml:"resourceProfile,omitempty" json:"resourceProfile,omitempty"` }
Click to show internal directories.
Click to hide internal directories.