hatchery

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2017 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Client is a CDS Client
	Client sdk.HTTPClient
)

Functions

func Born

func Born(h Interface, api, token string, provision int, requestSecondsTimeout int, insecureSkipVerifyTLS bool)

Born creates hatchery

func CheckRequirement

func CheckRequirement(r sdk.Requirement) (bool, error)

CheckRequirement checks binary requirement in path

func Register

func Register(h *sdk.Hatchery, token string) error

Register calls CDS API to register current hatchery

Types

type Interface

type Interface interface {
	Init() error
	KillWorker(worker sdk.Worker) error
	SpawnWorker(model *sdk.Model, req []sdk.Requirement) error
	CanSpawn(model *sdk.Model, req []sdk.Requirement) bool
	WorkerStarted(model *sdk.Model) int
	Hatchery() *sdk.Hatchery
	ID() int64
}

Interface describe an interface for each hatchery mode (mesos, local)

Jump to

Keyboard shortcuts

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