Documentation ¶
Index ¶
Constants ¶
const ( V0 = "apiv0" V1 = "apiv1" )
API Version constants
Variables ¶
This section is empty.
Functions ¶
func RequestFromV0 ¶
RequestFromV0 is needed for Go versions < 1.8 In go 1.8, Request(RequestV0) would work instead
func RequestFromV1 ¶
RequestFromV1 is needed for Go versions < 1.8 In go 1.8, Request(RequestV1) would work instead
func TaskFromV0 ¶
TaskFromV0 is needed for Go versions < 1.8 In go 1.8, Task(TaskV0) would work instead
func TaskFromV1 ¶
TaskFromV1 is needed for Go versions < 1.8 In go 1.8, Task(TaskV1) would work instead
Types ¶
type RequestV0 ¶
type RequestV0 struct { TaskCPUs float64 `json:"task_cpus"` TaskMem float64 `json:"task_mem"` DockerImage string `json:"docker_image"` Command string `json:"command"` Args []string `json:"args"` Volumes []eremetic.Volume `json:"volumes"` Ports []eremetic.Port `json:"ports"` Network string `json:"network"` DNS string `json:"dns"` Environment map[string]string `json:"env"` MaskedEnvironment map[string]string `json:"masked_env"` AgentConstraints []eremetic.AgentConstraint `json:"slave_constraints"` CallbackURI string `json:"callback_uri"` URIs []string `json:"uris"` Fetch []eremetic.URI `json:"fetch"` ForcePullImage bool `json:"force_pull_image"` }
RequestV0 represents the old deprecated json-structure of a job request
type RequestV1 ¶
type RequestV1 struct { TaskCPUs float64 `json:"cpu"` TaskMem float64 `json:"mem"` DockerImage string `json:"image"` Command string `json:"command"` Args []string `json:"args"` Volumes []eremetic.Volume `json:"volumes"` Ports []eremetic.Port `json:"ports"` Network string `json:"network"` DNS string `json:"dns"` Environment map[string]string `json:"env"` MaskedEnvironment map[string]string `json:"masked_env"` AgentConstraints []eremetic.AgentConstraint `json:"agent_constraints"` CallbackURI string `json:"callback_uri"` Fetch []eremetic.URI `json:"fetch"` ForcePullImage bool `json:"force_pull_image"` }
RequestV1 represents the V1 json-structure of a job request
type TaskV0 ¶
type TaskV0 struct { TaskCPUs float64 `json:"task_cpus"` TaskMem float64 `json:"task_mem"` Command string `json:"command"` Args []string `json:"args"` User string `json:"user"` Environment map[string]string `json:"env"` MaskedEnvironment map[string]string `json:"masked_env"` Image string `json:"image"` Volumes []eremetic.Volume `json:"volumes"` Ports []eremetic.Port `json:"ports"` Status []eremetic.Status `json:"status"` ID string `json:"id"` Name string `json:"name"` Network string `json:"network"` DNS string `json:"dns"` FrameworkID string `json:"framework_id"` AgentID string `json:"slave_id"` AgentConstraints []eremetic.AgentConstraint `json:"slave_constraints"` Hostname string `json:"hostname"` Retry int `json:"retry"` CallbackURI string `json:"callback_uri"` SandboxPath string `json:"sandbox_path"` AgentIP string `json:"agent_ip"` AgentPort int32 `json:"agent_port"` ForcePullImage bool `json:"force_pull_image"` FetchURIs []eremetic.URI `json:"fetch"` }
TaskV0 defines the deprecated json-structure for the properties of a scheduled task.
func TaskV0FromTask ¶
TaskV0FromTask is needed for Go versions < 1.8 In go 1.8, TaskV0(Task) would work instead
type TaskV1 ¶
type TaskV1 struct { TaskCPUs float64 `json:"cpu"` TaskMem float64 `json:"mem"` Command string `json:"command"` Args []string `json:"args"` User string `json:"user"` Environment map[string]string `json:"env"` MaskedEnvironment map[string]string `json:"masked_env"` Image string `json:"image"` Volumes []eremetic.Volume `json:"volumes"` Ports []eremetic.Port `json:"ports"` Status []eremetic.Status `json:"status"` ID string `json:"id"` Name string `json:"name"` Network string `json:"network"` DNS string `json:"dns"` FrameworkID string `json:"framework_id"` AgentID string `json:"agent_id"` AgentConstraints []eremetic.AgentConstraint `json:"agent_constraints"` Hostname string `json:"hostname"` Retry int `json:"retry"` CallbackURI string `json:"callback_uri"` SandboxPath string `json:"sandbox_path"` AgentIP string `json:"agent_ip"` AgentPort int32 `json:"agent_port"` ForcePullImage bool `json:"force_pull_image"` FetchURIs []eremetic.URI `json:"fetch"` }
TaskV1 defines the API V1 json-structure for the properties of a scheduled task.
func TaskV1FromTask ¶
TaskV1FromTask is needed for Go versions < 1.8 In go 1.8, TaskV1(Task) would work instead