api

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BenchmarkHandler added in v0.4.0

type BenchmarkHandler struct {
	// contains filtered or unexported fields
}

BenchmarkHandler serves the read-only benchmark API.

func NewBenchmarkHandler added in v0.4.0

func NewBenchmarkHandler(store BenchmarkStore) *BenchmarkHandler

NewBenchmarkHandler builds a benchmark API handler.

func (*BenchmarkHandler) RegisterRoutesWithMiddleware added in v0.4.0

func (h *BenchmarkHandler) RegisterRoutesWithMiddleware(mux *http.ServeMux, middleware func(http.Handler) http.Handler)

RegisterRoutesWithMiddleware registers benchmark routes with optional middleware.

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler serves the read-only task run API.

func NewHandler

func NewHandler(store Store) *Handler

NewHandler builds an API handler bound to a persistence store.

func (*Handler) RegisterRoutes

func (h *Handler) RegisterRoutes(mux *http.ServeMux)

RegisterRoutes registers the task run API routes on the provided mux.

func (*Handler) RegisterRoutesWithMiddleware

func (h *Handler) RegisterRoutesWithMiddleware(mux *http.ServeMux, middleware func(http.Handler) http.Handler)

RegisterRoutesWithMiddleware registers the task run API routes and wraps each endpoint with the provided middleware when present.

type Store

type Store interface {
	ListTaskRuns(ctx context.Context, filter persistence.TaskRunFilter) ([]persistence.TaskRunSummary, error)
	GetTaskRun(ctx context.Context, runID string) (*persistence.TaskRunSummary, error)
	ListTaskRunBenchmarkLinks(ctx context.Context, runID string) ([]persistence.TaskRunBenchmarkLink, error)
	GetTaskRunEvents(ctx context.Context, runID string) ([]persistence.TaskRunEvent, error)
}

Store provides the persistence-backed projections required by the API.

Jump to

Keyboard shortcuts

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