Documentation ¶
Index ¶
- Variables
- func Init(token string, memory string) http.Handler
- func Purge(w http.ResponseWriter, r *http.Request, p httprouter.Params, ...)
- func PurgeSelector(clientset kubernetes.Clientset, selector string)
- func Run(w http.ResponseWriter, r *http.Request, p httprouter.Params, ...)
- func Status(w http.ResponseWriter, r *http.Request, p httprouter.Params, ...)
- func Stop(w http.ResponseWriter, r *http.Request, p httprouter.Params, ...)
- type JobStatus
- type PostErrorResponse
- type PostRequest
- type PostSuccessResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultCPULimit = "0.44"
DefaultCPULimit is the maximum cpu amount
View Source
var DefaultCPURequest = "0.22"
DefaultCPURequest is the cpu amount requested
View Source
var DefaultMemory = "650Mi"
DefaultMemory is the maximum memory assigned to a Pod
View Source
var RootToken string
RootToken is the token used for the cluster's authentication
Functions ¶
func Purge ¶
func Purge(w http.ResponseWriter, r *http.Request, p httprouter.Params, response PostRequest, clientset kubernetes.Clientset)
Purge (delete) a task
func PurgeSelector ¶
func PurgeSelector(clientset kubernetes.Clientset, selector string)
PurgeSelector purges tasks by selector
func Run ¶
func Run(w http.ResponseWriter, r *http.Request, p httprouter.Params, response PostRequest, clientset kubernetes.Clientset)
Run a pod
func Status ¶
func Status(w http.ResponseWriter, r *http.Request, p httprouter.Params, response PostRequest, clientset kubernetes.Clientset)
Status returns the status of all current importers in the cluster
func Stop ¶
func Stop(w http.ResponseWriter, r *http.Request, p httprouter.Params, response PostRequest, clientset kubernetes.Clientset)
Stop (delete) a task
Types ¶
type JobStatus ¶
type JobStatus struct {
Status string `json:"status"`
}
JobStatus is the JSON status sent back to the api
type PostErrorResponse ¶
type PostErrorResponse struct { Success bool `json:"success"` Code int `json:"code"` Error string `json:"error"` Auth bool `json:"auth"` Id string `json:"id"` }
PostErrorResponse is the JSON error response payload
type PostRequest ¶
type PostRequest struct { Token string `json:"token"` Command string `json:"command"` Image string `json:"image"` Auth string `json:"auth"` Labels map[string]string `json:"labels` Name string `json:"name"` Id string `json:"id"` Memory string `json:"memory"` // 1G CPULimit string `json:"cpuLimit"` CPURequest string `json:"cpuRequest"` JobID string `json:"jobId"` ImporterID string `json:"importerId"` SourceID string `json:"sourceId"` PreStop string `json:"preStop"` }
PostRequest is the request sent to the manager
func HandleGetAuth ¶
func HandleGetAuth(w http.ResponseWriter, r *http.Request) (PostRequest, error)
func HandlePostAuth ¶
func HandlePostAuth(w http.ResponseWriter, r *http.Request) (PostRequest, error)
Click to show internal directories.
Click to hide internal directories.