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 AsyncEvent
- type AsyncEventFatalError
- type AsyncEventManager
- type AsyncEventSetupError
- type AsyncEventTransporter
- type Auth
- type Container
- type Defaults
- type EnvItem
- type File
- type FileData
- type ImagePullAuth
- type Project
- type Runner
- type RunnerAssets
- type RunnerSpec
- type ServerError
- type Service
- type Suite
- type SuiteService
- type Tunnel
Constants ¶
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.
const ( RunnerAssetStateWaiting = "Waiting" RunnerAssetStateErrored = "Errored" )
Variables ¶
var ( Kind = "imagerunner" APIVersion = "v1alpha" ValidWorkloadType = []string{ "webdriver", "other", } ValidResourceProfilesFormat = "cXmX" ValidResourceProfilesValidator = regexp.MustCompile("^c([0-9]+)m([0-9]+)$") )
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.
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 AsyncEvent ¶ added in v0.171.0
type AsyncEventFatalError ¶ added in v0.171.0
type AsyncEventFatalError struct {
Err error
}
AsyncEventFatalError represents an error that occurs during the asynchronous event handling process. This error is considered fatal, meaning it cannot be recovered from.
func (AsyncEventFatalError) Error ¶ added in v0.171.0
func (e AsyncEventFatalError) Error() string
type AsyncEventManager ¶ added in v0.171.0
type AsyncEventManager interface { ParseEvent(event string) (*AsyncEvent, error) IsLogIdle() bool }
type AsyncEventSetupError ¶ added in v0.171.0
type AsyncEventSetupError struct {
Err error
}
AsyncEventSetupError represents an error that occurs during the setup of the asynchronous event handling process. This error indicates that the setup process failed and may need to be retried or debugged.
func (AsyncEventSetupError) Error ¶ added in v0.171.0
func (e AsyncEventSetupError) Error() string
type AsyncEventTransporter ¶ added in v0.172.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:"-"` LiveLogs bool `yaml:"-" json:"-"` Env map[string]string `yaml:"env,omitempty" json:"env"` EnvFlag map[string]string `yaml:"-" json:"-"` Reporters config.Reporters `yaml:"reporters,omitempty" 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"` Assets RunnerAssets `json:"assets,omitempty"` }
type RunnerAssets ¶ added in v0.173.2
type RunnerAssets struct {
Status string `json:"status,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"` }