Documentation ¶
Index ¶
- Constants
- func HandleAddJob(cache job.JobCache, defaultOwner string, disableLocalJobs bool) func(http.ResponseWriter, *http.Request)
- func HandleDeleteAllJobs(cache job.JobCache, disableDeleteAll bool) func(w http.ResponseWriter, r *http.Request)
- func HandleDisableJobRequest(cache job.JobCache) func(w http.ResponseWriter, r *http.Request)
- func HandleEnableJobRequest(cache job.JobCache) func(w http.ResponseWriter, r *http.Request)
- func HandleJobParamsRequest(cache job.JobCache) func(w http.ResponseWriter, r *http.Request)
- func HandleJobRequest(cache job.JobCache, disableLocalJobs bool) func(w http.ResponseWriter, r *http.Request)
- func HandleJobRunRequest(cache job.JobCache) func(w http.ResponseWriter, r *http.Request)
- func HandleKalaStatsRequest(cache job.JobCache) func(w http.ResponseWriter, r *http.Request)
- func HandleListJobRunsRequest(cache job.JobCache) func(w http.ResponseWriter, r *http.Request)
- func HandleListJobsRequest(cache job.JobCache) func(w http.ResponseWriter, r *http.Request)
- func HandleStartJobRequest(cache job.JobCache) func(w http.ResponseWriter, r *http.Request)
- func MakeServer(listenAddr string, cache job.JobCache, defaultOwner string, profile bool, ...) *http.Server
- func SetupApiRoutes(r *mux.Router, cache job.JobCache, defaultOwner string, disableDeleteAll bool, ...)
- type AddJobResponse
- type JobResponse
- type JobRunResponse
- type KalaStatsResponse
- type ListJobStatsResponse
- type ListJobsResponse
Constants ¶
const ( // Base API v1 Path ApiUrlPrefix = "/api/v1/" JobPath = "job/" ApiJobPath = ApiUrlPrefix + JobPath )
Variables ¶
This section is empty.
Functions ¶
func HandleAddJob ¶
func HandleAddJob(cache job.JobCache, defaultOwner string, disableLocalJobs bool) func(http.ResponseWriter, *http.Request)
HandleAddJob takes a job object and unmarshals it to a Job type, and then throws the job in the schedulers.
func HandleDeleteAllJobs ¶
func HandleDeleteAllJobs(cache job.JobCache, disableDeleteAll bool) func(w http.ResponseWriter, r *http.Request)
HandleDeleteAllJobs is the handler for deleting all jobs DELETE /api/v1/job/all
func HandleDisableJobRequest ¶
HandleDisableJobRequest is the handler for mdisabling jobs /api/v1/job/disable/{id}
func HandleEnableJobRequest ¶
HandleEnableJobRequest is the handler for enable jobs /api/v1/job/enable/{id}
func HandleJobParamsRequest ¶
HandleJobParamsRequest handles requests to /api/v1/job/{id}/params to either return the remote job's parameters on a GET or replace them on a PUT. or updates the job if its a PUT request.
func HandleJobRequest ¶
func HandleJobRequest(cache job.JobCache, disableLocalJobs bool) func(w http.ResponseWriter, r *http.Request)
HandleJobRequest routes requests to /api/v1/job/{id} to either handleDeleteJob if its a DELETE or handleGetJob if its a GET request or updates the job if its a PUT request.
func HandleJobRunRequest ¶
HandleJobRunRequest is the handler for doing things to a single job run /api/v1/job/{job_id}/executions/{run_id}/
func HandleKalaStatsRequest ¶
HandleKalaStatsRequest is the handler for getting system-level metrics /api/v1/stats
func HandleListJobRunsRequest ¶
HandleListJobRunsRequest is the handler listing executions /api/v1/job/{id}/executions
func HandleListJobsRequest ¶
HandleListJobs responds with an array of all Jobs within the server, active or disabled.
func HandleStartJobRequest ¶
HandleStartJobRequest is the handler for manually starting jobs /api/v1/job/start/{id}
func MakeServer ¶
Types ¶
type AddJobResponse ¶
type AddJobResponse struct {
Id string `json:"id"`
}
type JobResponse ¶
type JobRunResponse ¶
JobRunResponse is for returning a single job execution