host

package
v0.0.0-...-dd9b67b Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2014 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AttachSuccess byte = iota
	AttachWaiting
	AttachError
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ActiveJob

type ActiveJob struct {
	Job *Job

	ContainerID string
	Status      JobStatus
	StartedAt   time.Time
	EndedAt     time.Time
	ExitCode    int
	Error       *string
}

type AddJobsReq

type AddJobsReq struct {
	// map of host id -> new jobs
	HostJobs map[string][]*Job
}

type AddJobsRes

type AddJobsRes struct {
	// The state of the cluster after the operation
	State map[string]Host
}

type AttachFlag

type AttachFlag uint8
const (
	AttachFlagStdout AttachFlag = 1 << iota
	AttachFlagStderr
	AttachFlagStdin
	AttachFlagLogs
	AttachFlagStream
)

type AttachReq

type AttachReq struct {
	JobID  string
	Flags  AttachFlag
	Height int
	Width  int
}

type Event

type Event struct {
	Event string
	JobID string
	Job   *ActiveJob
}

type Host

type Host struct {
	ID string

	// Currently running jobs
	Jobs []*Job
	// Host attributes
	Attributes map[string]string
}

type HostEvent

type HostEvent struct {
	Event  string
	HostID string
}

type Job

type Job struct {
	ID string

	// Job attributes
	Attributes map[string]string
	// Number of TCP ports required by the job
	TCPPorts int

	Config     *docker.Config
	HostConfig *docker.HostConfig
}

type JobStatus

type JobStatus uint8
const (
	StatusStarting JobStatus = iota
	StatusRunning
	StatusDone
	StatusCrashed
	StatusFailed
)

func (JobStatus) String

func (s JobStatus) String() string

Jump to

Keyboard shortcuts

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