httpapi

package
v0.0.0-...-3159864 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: Apache-2.0 Imports: 23 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authorizer

type Authorizer interface {
	Authorize(token, projectID string) (authenticated bool, authorized bool)
}

Authorizer authenticates an opaque bearer credential and independently authorizes the requested project. Implementations must not infer project identity from an untrusted request header alone.

type Option

type Option func(*Server)

func WithAuthorizer

func WithAuthorizer(authorizer Authorizer) Option

WithAuthorizer replaces the trusted-operator token behavior used by New. Production deployments should always supply a project-binding authorizer.

func WithCommandDiagnostics

func WithCommandDiagnostics(observer telemetry.CommandDiagnosticObserver) Option

WithCommandDiagnostics enables opt-in benchmark-path timing. The observer receives only fixed components, monotonic durations, and byte/event counts.

func WithConnectorHandler

func WithConnectorHandler(handler http.Handler) Option

func WithMaxInFlightRequests

func WithMaxInFlightRequests(limit int) Option

WithMaxInFlightRequests sets a process-wide admission ceiling for API, connector, and preview traffic. Health, readiness, and metrics remain available while ordinary requests are saturated.

func WithPhaseMetrics

func WithPhaseMetrics(metrics *telemetry.Registry) Option

WithPhaseMetrics appends fixed, content-free lifecycle and guest phase histograms to the existing Prometheus endpoint.

func WithQualificationReporter

func WithQualificationReporter(reporter func() (string, string)) Option

WithQualificationReporter supplies the qualification state for the exact running revision. The reporter is evaluated for every capabilities request so an atomically published or invalidated receipt takes effect immediately.

func WithRequestLogger

func WithRequestLogger(logger *log.Logger) Option

WithRequestLogger enables content-free access logs. The middleware records only request ID, method, matched route pattern, status, and duration.

type Server

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

func New

func New(svc *service.Service, token string, options ...Option) (*Server, error)

func (*Server) Handler

func (s *Server) Handler() http.Handler

Jump to

Keyboard shortcuts

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