Documentation
¶
Index ¶
- Variables
- func NewServeMux(handler *Handler, useProcedureMode bool) *http.ServeMux
- func SendWebhook(webhook string, pr *runner.PredictionResponse) error
- type Handler
- func (h *Handler) ActiveRunners() []*runner.Runner
- func (h *Handler) Cancel(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ExitCode() int
- func (h *Handler) ForceKillAll()
- func (h *Handler) HandleIPC(w http.ResponseWriter, r *http.Request)
- func (h *Handler) HealthCheck(w http.ResponseWriter, r *http.Request)
- func (h *Handler) OpenAPI(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Predict(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Root(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Start(ctx context.Context) error
- func (h *Handler) Stop() error
- type HealthCheck
- type IPC
- type IPCStatus
- type PredictConfig
- type SetupResult
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func SendWebhook ¶
func SendWebhook(webhook string, pr *runner.PredictionResponse) error
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*Handler) ActiveRunners ¶
ActiveRunners returns active runners from the runner manager
func (*Handler) ForceKillAll ¶
func (h *Handler) ForceKillAll()
ForceKillAll immediately force-kills all runners (for test cleanup)
func (*Handler) HealthCheck ¶
func (h *Handler) HealthCheck(w http.ResponseWriter, r *http.Request)
type HealthCheck ¶
type HealthCheck struct {
Status string `json:"status"`
Setup *SetupResult `json:"setup,omitempty"`
Concurrency runner.Concurrency `json:"concurrency,omitempty"`
}
type PredictConfig ¶
type SetupResult ¶
type SetupResult struct {
StartedAt string `json:"started_at"`
CompletedAt string `json:"completed_at"`
Status runner.SetupStatus `json:"status"`
Logs string `json:"logs,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.