Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DEFAULT_TASK = TaskResource{CPU: DEFAULT, MEM: DEFAULT} TINY_TASK = TaskResource{CPU: TINY, MEM: TINY} SMALL_TASK = TaskResource{CPU: SMALL, MEM: SMALL} LARGE_TASK = TaskResource{CPU: LARGE, MEM: LARGE} XLARGE_TASK = TaskResource{CPU: XLARGE, MEM: XLARGE} MEM_TASK = TaskResource{CPU: SMALL, MEM: LARGE} COMPUTE_TASK = TaskResource{CPU: LARGE, MEM: SMALL} PLEX_TASK = TaskResource{CPU: LARGE, MEM: XXLARGE} )
View Source
var DeployTargetRegex = map[DeployTarget]string{ ALL: "^.*$", SERVER: "^server-[0-9]+$", WORKER: "^worker-[0-9]+$", CODERBOX: "^coderbox$", DEVBOX: "^devbox$", PLEXBOX: "^plexbox$", }
DeployTargetRegex is a map of DeployTarget to a regex string that matches the target's hostname.
Functions ¶
This section is empty.
Types ¶
type DeployTarget ¶
type DeployTarget int
DeployTarget is an enum that represents the target of a job.
const ( UNKNOWN_DEPLOY_TARGET DeployTarget = iota ALL SERVER WORKER CODERBOX DEVBOX PLEXBOX )
type Job ¶
type Job struct { Name string Type JobType Shape TaskResource Target DeployTarget Ports []*Port Volumes []Volume Args []string Env map[string]string User string Templates map[string]string }
Job is a struct that represents a Nomad Job.
type Port ¶
Port is a struct that represents a network port for a task.
func BasicPortConfig ¶
BasicPortConfig returns a list with a single Port element with a default label.
type ResourceValue ¶
type ResourceValue int
const ( TINY ResourceValue = 128 SMALL ResourceValue = 256 DEFAULT ResourceValue = 512 LARGE ResourceValue = 1024 XLARGE ResourceValue = 2048 XXLARGE ResourceValue = 4096 )
type TaskResource ¶
type TaskResource struct { CPU ResourceValue MEM ResourceValue }
TaskResource is a struct that represents the CPU and MEM resources for a task.
Click to show internal directories.
Click to hide internal directories.