labserver

package
v0.40.0 Latest Latest
Warning

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

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

Documentation

Overview

Package labserver assembles the lab's HTTP surface: the read/clear records API and the health endpoint. Reads are filtered by scenario rather than assuming the store holds only the current scenario's events, because asynchronous, batched audit delivery can land a late event from one scenario after the next has started.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseGVRs

func ParseGVRs(spec string) ([]schema.GroupVersionResource, error)

ParseGVRs parses a comma-separated GVR spec for the watch recorder. Each item is "group/version/resource", or "version/resource" for core types (e.g. "v1/configmaps,apps/v1/deployments"). Whitespace and empty items are ignored.

Types

type API

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

API serves the lab's records and health endpoints over plain HTTP.

func NewAPI

func NewAPI(s *store.Store, prober ...WatchProber) *API

NewAPI returns an API backed by the given store.

func (*API) Routes

func (a *API) Routes() *http.ServeMux

Routes registers the records and health handlers on a fresh mux.

type WatchProber

type WatchProber interface {
	Probe(context.Context, recorder.WatchProbeRequest) ([]mutationlab.Record, error)
}

WatchProber captures targeted watch transport events for lab rows whose payloads cannot be attributed by object labels alone.

Jump to

Keyboard shortcuts

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