handler

package
v0.0.0-...-265a0a8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CancelRun

func CancelRun(j *repository.RunRepository) func(w http.ResponseWriter, r *http.Request)

CancelRun handles the runs cancel endpoint

func CreateCluster

func CreateCluster(j *repository.ClusterRepository) func(w http.ResponseWriter, r *http.Request)

CreateCluster handles the cluster create endpoint

func CreateJob

func CreateJob(j *repository.JobRepository) func(w http.ResponseWriter, r *http.Request)

CreateJob handles the job create endpoint

func DeleteCluster

func DeleteCluster(j *repository.ClusterRepository) func(w http.ResponseWriter, r *http.Request)

DeleteCluster handles the cluster delete endpoint

func DeleteJob

func DeleteJob(j *repository.JobRepository) func(w http.ResponseWriter, r *http.Request)

DeleteJob handles the job delete endpoint

func DeleteRun

func DeleteRun(j *repository.RunRepository) func(w http.ResponseWriter, r *http.Request)

DeleteRun handles the runs delete endpoint

func EditCluster

func EditCluster(j *repository.ClusterRepository) func(w http.ResponseWriter, r *http.Request)

EditCluster handles the cluster edit endpoint

func GetCluster

func GetCluster(j *repository.ClusterRepository) func(w http.ResponseWriter, r *http.Request)

GetCluster handles the cluster get endpoint

func GetConfig

func GetConfig() func(w http.ResponseWriter, r *http.Request)

GetConfig gets the current config

func GetJob

func GetJob(j *repository.JobRepository) func(w http.ResponseWriter, r *http.Request)

GetJob handles the job get endpoint

func GetRun

func GetRun(j *repository.RunRepository) func(w http.ResponseWriter, r *http.Request)

GetRun handles the runs get endpoint

func GetRunOutput

func GetRunOutput(j *repository.RunRepository) func(w http.ResponseWriter, r *http.Request)

GetRunOutput handles the runs get output endpoint

func Index

func Index(w http.ResponseWriter, r *http.Request)

Index returns index page

func ListClusters

func ListClusters(j *repository.ClusterRepository) func(w http.ResponseWriter, r *http.Request)

ListClusters handles the cluster list endpoint

func ListJobs

func ListJobs(j *repository.JobRepository) func(w http.ResponseWriter, r *http.Request)

ListJobs handles the job list endpoint

func ListRuns

func ListRuns(j *repository.RunRepository) func(w http.ResponseWriter, r *http.Request)

ListRuns handles the runs list endpoint

func MethodNotAllowed

func MethodNotAllowed(w http.ResponseWriter, r *http.Request)

MethodNotAllowed returns a method not allowed page

func NotFoundPage

func NotFoundPage(w http.ResponseWriter, r *http.Request)

NotFoundPage returns a not found page

func PatchConfig

func PatchConfig() func(w http.ResponseWriter, r *http.Request)

PatchConfig allows updating a subset of the config

func SetConfig

func SetConfig() func(w http.ResponseWriter, r *http.Request)

SetConfig updates the config

func SubmitRun

func SubmitRun(runRepo *repository.RunRepository, jobRepo *repository.JobRepository) func(w http.ResponseWriter, r *http.Request)

SubmitRun handles the runs submit endpoint

Types

type Config

type Config struct {
	LatencySlowRequestMax       *int `json:"DATABRICKS_MOCK_API_LATENCY_MILLISECONDS_SLOW_REQUEST_MAX"`
	LatencySlowRequestMin       *int `json:"DATABRICKS_MOCK_API_LATENCY_MILLISECONDS_SLOW_REQUEST_MIN"`
	LatencyFastRequestMax       *int `json:"DATABRICKS_MOCK_API_LATENCY_MILLISECONDS_FAST_REQUEST_MAX"`
	LatencyFastRequestMin       *int `json:"DATABRICKS_MOCK_API_LATENCY_MILLISECONDS_FAST_REQUEST_MIN"`
	RateLimit                   *int `json:"DATABRICKS_MOCK_API_RATE_LIMIT"`
	Error500Probability         *int `json:"DATABRICKS_MOCK_API_ERROR_500_PROBABILITY"`
	ErrorSinkHoleProbability    *int `json:"DATABRICKS_MOCK_API_ERROR_SINKHOLE_PROBABILITY"`
	ErrorXMLResponseProbability *int `json:"DATABRICKS_MOCK_API_ERROR_XML_RESPONSE_PROBABILITY"`
}

Config is used to represent the mock api config

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL