Documentation
¶
Index ¶
- type Authorizer
- type Option
- func WithAuthorizer(authorizer Authorizer) Option
- func WithCommandDiagnostics(observer telemetry.CommandDiagnosticObserver) Option
- func WithConnectorHandler(handler http.Handler) Option
- func WithMaxInFlightRequests(limit int) Option
- func WithPhaseMetrics(metrics *telemetry.Registry) Option
- func WithQualificationReporter(reporter func() (string, string)) Option
- func WithRequestLogger(logger *log.Logger) Option
- type Server
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 WithMaxInFlightRequests ¶
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 ¶
WithPhaseMetrics appends fixed, content-free lifecycle and guest phase histograms to the existing Prometheus endpoint.
func WithQualificationReporter ¶
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 ¶
WithRequestLogger enables content-free access logs. The middleware records only request ID, method, matched route pattern, status, and duration.