api

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package api exposes HTTP handlers for health, diagnostics, traces, analytics, and key APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CostHandler

func CostHandler(store trace.TraceStore) http.Handler

func ErrorsHandler added in v1.1.8

func ErrorsHandler(store trace.TraceStore) http.Handler

func GatewayKeyDetailHandler

func GatewayKeyDetailHandler(store configstore.GatewayKeyStore, auditRecorder GatewayKeyAuditRecorder) http.Handler

func GatewayKeysHandler

func GatewayKeysHandler(store configstore.GatewayKeyStore, auditRecorder GatewayKeyAuditRecorder) http.Handler

func HealthHandler

func HealthHandler(options HealthOptions) http.Handler

func KeysHandler

func KeysHandler(store trace.TraceStore) http.Handler

func LatencyHandler added in v1.1.8

func LatencyHandler(store trace.TraceStore) http.Handler

func ModelsHandler

func ModelsHandler(store trace.TraceStore) http.Handler

func NewRouter

func NewRouter(options RouterOptions) http.Handler

func SummaryHandler

func SummaryHandler(store trace.TraceStore) http.Handler

func TraceDetailHandler

func TraceDetailHandler(store trace.TraceStore) http.Handler

func TracePipelineDiagnosticsHandler added in v1.1.7

func TracePipelineDiagnosticsHandler(options TracePipelineDiagnosticsOptions) http.Handler

func TracesHandler

func TracesHandler(store trace.TraceStore) http.Handler

func UsageHandler

func UsageHandler(store trace.TraceStore) http.Handler

Types

type GatewayKeyAuditEvent

type GatewayKeyAuditEvent struct {
	Action      string
	Outcome     string
	Reason      string
	StatusCode  int
	ActorKeyID  string
	OrgID       string
	WorkspaceID string
	TargetKeyID string
}

type GatewayKeyAuditRecorder

type GatewayKeyAuditRecorder func(r *http.Request, event GatewayKeyAuditEvent)

type HealthOptions

type HealthOptions struct {
	Version       string
	StartedAt     time.Time
	StorageDriver string
	StoragePath   string
	Store         trace.TraceStore
}

type RouterOptions

type RouterOptions struct {
	AppVersion              string
	Store                   trace.TraceStore
	StorageDriver           string
	StoragePath             string
	TracePipelineReader     trace.TracePipelineDiagnosticsReader
	GatewayKeyStore         configstore.GatewayKeyStore
	GatewayAuthHeader       string
	GatewayKeyAuditRecorder GatewayKeyAuditRecorder
}

type TracePipelineDiagnosticsOptions added in v1.1.7

type TracePipelineDiagnosticsOptions struct {
	Reader      trace.TracePipelineDiagnosticsReader
	StoreDriver string
}

Jump to

Keyboard shortcuts

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