types

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2018 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package types contains the types that are used both by mistry server and client.

Index

Constants

View Source
const ContainerFailureExitCode = -999

ContainerFailureExitCode is the exit code that signifies a failure before even running the container

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildInfo

type BuildInfo struct {
	// Params are the job build parameters
	Params Params

	// Group is the job group
	Group string

	// Path is the absolute path where the build artifacts are located.
	Path string

	// Cached is true if the build artifacts were retrieved from the cache.
	Cached bool

	// Coalesced is true if the build was returned from another pending
	// build.
	Coalesced bool

	// Incremental is true if the results of a previous build were
	// used as the base for this build (ie. build cache).
	Incremental bool

	// ExitCode is the exit code of the container command.
	//
	// NOTE: irrelevant if Coalesced is true.
	ExitCode int

	// ErrBuild contains any errors that occured during the build.
	//
	// TODO: It might contain errors internal to the server, that the
	// user can do nothing about. This should be fixed
	ErrBuild string

	// ContainerStdouterr contains the stdout/stderr of the container.
	ContainerStdouterr string `json:",omitempty"`

	// ContainerStderr contains the stderr of the container.
	ContainerStderr string `json:",omitempty"`

	// TransportMethod is the method with which the build artifacts can be
	// fetched.
	TransportMethod TransportMethod

	// StartedAt is the date and time when the build started.
	StartedAt time.Time

	// Duration is how much the build took to complete. If it cannot be
	// calculated yet, the value will be -1 seconds.
	//
	// NOTE: if Cached is true, this refers to the original build.
	Duration time.Duration

	// URL is the relative URL at which the build log is available.
	URL string
}

BuildInfo contains various information regarding the outcome of a particular build.

func NewBuildInfo

func NewBuildInfo() *BuildInfo

type ErrImageBuild

type ErrImageBuild struct {
	Image string
	Err   error
}

func (ErrImageBuild) Error

func (e ErrImageBuild) Error() string

type JobRequest

type JobRequest struct {
	Project string
	Params  Params
	Group   string
	Rebuild bool
}

JobRequest contains the data the job was requested with

type Params

type Params map[string]string

type TransportMethod

type TransportMethod string
const (
	Rsync TransportMethod = "rsync"
	Scp                   = "scp"
)

Jump to

Keyboard shortcuts

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