image

package
v2.11.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2017 License: MIT Imports: 13 Imported by: 3

Documentation

Overview

Package image contains logic for image selection logic.

Worker supports two ways of selecting the image to use for a compute instance: An APISelector that talks to job-board (https://github.com/travis-ci/job-board) and an ENVSelector that gets the data from environment variables.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APISelector

type APISelector struct {
	// contains filtered or unexported fields
}

func NewAPISelector

func NewAPISelector(u *url.URL) *APISelector

func (*APISelector) Select

func (as *APISelector) Select(params *Params) (string, error)

type EnvSelector

type EnvSelector struct {
	// contains filtered or unexported fields
}

EnvSelector implements Selector for environment-based mappings

func NewEnvSelector

func NewEnvSelector(c *config.ProviderConfig) (*EnvSelector, error)

NewEnvSelector builds a new EnvSelector from the given *config.ProviderConfig

func (*EnvSelector) Select

func (es *EnvSelector) Select(params *Params) (string, error)

type Params

type Params struct {
	Infra    string
	Language string
	OsxImage string
	Dist     string
	Group    string
	OS       string

	JobID uint64
	Repo  string
}

type Selector

type Selector interface {
	Select(*Params) (string, error)
}

Selector is the interface for selecting an image!

Jump to

Keyboard shortcuts

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