external

package
v0.0.0-...-fa41a9c Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CurrentImage

type CurrentImage struct {
	URL   string `json:"url"`
	Start string `json:"start"`
	Limit int    `json:"limit"`
}

CurrentImage item

type LatestImage

type LatestImage struct {
	ImageName string
	Created   time.Time
}

LatestImage for output

type RemoteImage

type RemoteImage struct {
	Repo      string `json:"repo"`
	Tag       string `json:"tag"`
	Digest    string `json:"digest"`
	Timestamp string `json:"timestamp"`
}

RemoteImage item

type RunnerParams

type RunnerParams struct {
	BearerToken    string // API Bearer token
	InstanceName   string // Runner name
	GroupName      string // Runner group name
	ImageName      string // Docker image
	OrgID          string // Organization ID
	AppNames       string // Application names
	OrgList        string // Organizations
	Workflows      string // Workflows
	StorePath      string // Local storage location
	LoggerPath     string // Where to write logs
	RunnerCount    int    // Number of runner containers
	ShutdownFlag   bool   // Shutdown if true
	Debug          bool   // debug enabled
	AllOption      bool   // --all option
	NoWait         bool   // --nowait options
	PullRemote     bool   // --pull option
	PollFreq       int    // Polling frequency
	DockerEndpoint string // docker endpoint
	OCIOptions     *core.OCIOptions
	OCIDownload    string // OCI Download endpoint
	// following values are set during processing
	Basename string // base name for container creation
	Logger   *util.LogEntry

	ProdType      bool // Set to true for production
	OverrideImage string
	// contains filtered or unexported fields
}

RunnerParams are the parameters that drive the control of Docker containers where the external runner executes. This structure is passed from the Wercker CLI when runner is specified.

func NewDockerController

func NewDockerController() *RunnerParams

NewDockerController -

func (*RunnerParams) CheckRegistryImages

func (cp *RunnerParams) CheckRegistryImages(isInternal bool) error

Check the external runner images between local and remote repositories. If local exists but remote does not then do nothing If local exists and is the same as the remote then do nothing If local is older than remote then give user the option to download the remote If neither exists then fail immediately

func (*RunnerParams) RunDockerController

func (cp *RunnerParams) RunDockerController(statusOnly bool)

RunDockerController is commander-in-chief of external runners. It is called from Wercker CLI to start or stop external runners. The Wercker CLI builds the RunnParams and calls this function.

Jump to

Keyboard shortcuts

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