spawn

package
v0.0.0-...-900fa13 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2015 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxPerUser        = 3
	DefaultExpiration = time.Duration(24 * time.Hour)
)

Variables

View Source
var (
	SpawnLimitErr = errors.New("User is already running the max allowed # of spawn hosts")
)

Functions

This section is empty.

Types

type BadOptionsErr

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

BadOptionsErr represents an in valid set of spawn options.

func (BadOptionsErr) Error

func (bsoe BadOptionsErr) Error() string

type Options

type Options struct {
	Distro    string
	UserName  string
	PublicKey string
	UserData  string
}

Options holds the required parameters for spawning a host.

type Spawn

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

Spawn handles Spawning hosts for users.

func New

func New(settings *evergreen.Settings) Spawn

New returns an initialized Spawn controller.

func (Spawn) CreateHost

func (sm Spawn) CreateHost(so Options) (*host.Host, error)

CreateHost spawns a host with the given options.

func (Spawn) Validate

func (sm Spawn) Validate(so Options) error

Validate returns an instance of BadOptionsErr if the SpawnOptions object contains invalid data, SpawnLimitErr if the user is already at the spawned host limit, or some other untyped instance of Error if something fails during validation.

Jump to

Keyboard shortcuts

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