Files
lincodex/runner/internal/api/oas_unimplemented_gen.go

77 lines
3.0 KiB
Go

// Code generated by ogen, DO NOT EDIT.
package api
import (
"context"
ht "github.com/ogen-go/ogen/http"
)
// UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.
type UnimplementedHandler struct{}
var _ Handler = UnimplementedHandler{}
// GetRun implements GetRun operation.
//
// Answers 404 `not_found` for an ID the runner does not hold, including a run forgotten after its
// retention time or lost in a restart.
//
// GET /v1/runs/{run_id}
func (UnimplementedHandler) GetRun(ctx context.Context, params GetRunParams) (r *RunStatus, _ error) {
return r, ht.ErrNotImplemented
}
// GetRunnerHealthz implements GetRunnerHealthz operation.
//
// Check whether the runner process is responding.
//
// GET /healthz
func (UnimplementedHandler) GetRunnerHealthz(ctx context.Context) (r *RunnerHealthResponse, _ error) {
return r, ht.ErrNotImplemented
}
// GetRunnerReadyz implements GetRunnerReadyz operation.
//
// Ready means that the cgroup hierarchy, the work directory, and the sandbox binary were prepared at
// startup and the process is not draining. A busy runner is still ready; busy is reported by
// SubmitRun.
//
// GET /readyz
func (UnimplementedHandler) GetRunnerReadyz(ctx context.Context) (r GetRunnerReadyzRes, _ error) {
return r, ht.ErrNotImplemented
}
// SubmitRun implements SubmitRun operation.
//
// Idempotent by `run_id`:
//
// - a new ID with a free sandbox slot starts the run and answers 202 with `state: running`;
// - the same ID with the same payload answers 200 with the current state of that run, including the
// finished result, without running it again;
// - the same ID with a different payload answers 422 `idempotency_key_reused` and changes nothing;
// - a new ID while every slot is busy, or while the runner is draining, answers 503 `runner_busy`
// with Retry-After; nothing is stored, so the caller retries with the same ID.
//
// Payloads are compared by a SHA-256 fingerprint of the decoded request. The runner keeps runs only in
// memory for a bounded time after they finish; an ID that was forgotten or lost in a restart starts a
// new run. Requests above the configured body limit (8 MiB by default) answer 413 `payload_too_large`.
// Semantic rules that the schema cannot express answer 400 `validation_failed`: group IDs are unique
// in a run, test IDs are unique in a group, the number of tests multiplied by `limits.time_limit_ms`
// does not exceed 300000, a `numbers` checker has a positive tolerance, a `custom` checker has a
// program, and no other kind carries tolerances or a program.
//
// PUT /v1/runs/{run_id}
func (UnimplementedHandler) SubmitRun(ctx context.Context, req *RunRequest, params SubmitRunParams) (r SubmitRunRes, _ error) {
return r, ht.ErrNotImplemented
}
// NewError creates *ProblemStatusCode from error returned by handler.
//
// Used for common default response.
func (UnimplementedHandler) NewError(ctx context.Context, err error) (r *ProblemStatusCode) {
r = new(ProblemStatusCode)
return r
}