Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunOnListener ¶
RunOnListener uses a host-supplied listener and closes it on return, including startup failure. Dependencies remain owned by the service composition.
func Serve ¶
func Serve(ctx context.Context, listener net.Listener, tlsConfig *tls.Config, handler http.Handler, wrap func(http.Handler) http.Handler, probe func(context.Context) map[string]bool, timeout, grace time.Duration, logger *slog.Logger) error
Serve owns the supplied listener until shutdown. The caller owns dependencies and closes them after Serve returns. Probe never returns sensitive diagnostics.
Types ¶
type Config ¶
type Config struct {
AttestationIdentity *runtimeconfig.AttestationIdentity `json:"attestation_identity,omitempty"`
Gateways []mtlsidentity.GatewayBinding `json:"gateways,omitempty"`
Telemetry *runtimeconfig.Telemetry `json:"telemetry,omitempty"`
ContextArchive *ContextArchivePolicy `json:"context_archive,omitempty"`
AcceptTraceContext bool `json:"accept_trace_context,omitempty"`
OpenFGATraceContext bool `json:"openfga_trace_context,omitempty"`
Extraction *runtimeconfig.ExtractionScheduling `json:"extraction,omitempty"`
Retrieval []runtimeconfig.LexicalRoute `json:"retrieval"`
OperationsScope string `json:"operations_scope"`
Listen string `json:"listen"`
TLSCertificate string `json:"tls_certificate"`
TLSKey string `json:"tls_key"`
ClientCA string `json:"client_ca"`
Identities []mtlsidentity.Binding `json:"identities"`
OpenFGAURL string `json:"openfga_url"`
OpenFGAStore string `json:"openfga_store"`
OpenFGAModel string `json:"openfga_model"`
ReadinessScope string `json:"readiness_scope"`
AuditKeyID string `json:"audit_key_id"`
MaxConnections int32 `json:"max_connections"`
MaxConcurrent int `json:"max_concurrent"`
MaxRequestBytes int `json:"max_request_bytes"`
MaxResponseBytes int `json:"max_response_bytes"`
RPCTimeoutSeconds int `json:"rpc_timeout_seconds"`
ShutdownSeconds int `json:"shutdown_seconds"`
}
func LoadConfig ¶
type ContextArchivePolicy ¶
type ContextArchivePolicy struct {
Stream string `json:"stream"`
MaxPendingRevisions int64 `json:"max_pending_revisions"`
}
Config contains deployment settings, never credentials. Secrets are supplied through environment variables by the host's secret manager.
Click to show internal directories.
Click to hide internal directories.