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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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