Documentation ¶
Index ¶
Constants ¶
View Source
const ( StatusAlive = WorkerStatus("ALIVE") StatusDead = WorkerStatus("DEAD") JobStateQueued = JobState("QUEUED") JobStateStarted = JobState("STARTED") JobStateFinished = JobState("FINISHED") PathWorkers = "/workers" PathJobs = "/jobs" SignalStop = Signal("STOP") SignalSave = Signal("SAVE") SignalJobDone = Signal("JOB_DONE") SignalOK = Signal("OK") )
Variables ¶
View Source
var (
JobRate = 5 * time.Second
)
Functions ¶
Types ¶
type Job ¶
type Job struct { Container *docker.Container Fileset *JobFileset Owner string States []State Result *JobResult // contains filtered or unexported fields }
type JobFileset ¶
type Worker ¶
type Worker struct { // The following are exported fields matching a worker's serialized form Name string InstanceId string PrivateIp string PublicIp string Job int64 Heartbeat time.Time Stats WorkerStats Status WorkerStatus Id string // contains filtered or unexported fields }
func NewWorker ¶
func NewWorker(config *WorkerConfig) (worker *Worker, err error)
type WorkerConfig ¶
type WorkerStats ¶
type WorkerStatus ¶
type WorkerStatus string
Click to show internal directories.
Click to hide internal directories.