Documentation
¶
Overview ¶
Package runtimeapiprocess composes the separately runnable public API role from explicit operator configuration.
Index ¶
- func Check(config Config, lookup SecretLookup) error
- func CheckWithTelemetry(config Config, lookup SecretLookup, providers TelemetryProviders) error
- func Run(ctx context.Context, config Config, lookup SecretLookup, ready func(string)) error
- func RunWithExportingTelemetry(ctx context.Context, config Config, lookup SecretLookup, ready func(string)) error
- func RunWithTelemetry(ctx context.Context, config Config, lookup SecretLookup, ...) error
- func Serve(ctx context.Context, config Config, lookup SecretLookup, listener net.Listener) error
- func ServeWithTelemetry(ctx context.Context, config Config, lookup SecretLookup, ...) error
- type Config
- type ExportingTelemetry
- type SecretLookup
- type TelemetryProviders
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Check ¶
func Check(config Config, lookup SecretLookup) error
Check validates the strict declaration and required injected values without binding a listener or contacting dependencies.
func CheckWithTelemetry ¶
func CheckWithTelemetry(config Config, lookup SecretLookup, providers TelemetryProviders) error
CheckWithTelemetry validates the strict declaration and explicit telemetry composition without binding a listener or contacting dependencies.
func RunWithExportingTelemetry ¶
func RunWithExportingTelemetry(ctx context.Context, config Config, lookup SecretLookup, ready func(string)) error
RunWithExportingTelemetry starts the API with its declared paired OTLP telemetry pipeline and flushes it during process shutdown.
func RunWithTelemetry ¶
func RunWithTelemetry(ctx context.Context, config Config, lookup SecretLookup, providers TelemetryProviders, ready func(string)) error
RunWithTelemetry starts the public API role with explicit OpenTelemetry provider composition and blocks until cancellation or server failure.
func Serve ¶
Serve runs the role on an already-owned listener so process tests need no timing guesses.
func ServeWithTelemetry ¶
func ServeWithTelemetry(ctx context.Context, config Config, lookup SecretLookup, providers TelemetryProviders, listener net.Listener) error
ServeWithTelemetry runs the API role with explicit OpenTelemetry provider composition on an already-owned listener.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config is a validated immutable runtime API process declaration.
func (Config) HasOTLPExporter ¶
HasOTLPExporter reports whether this exact declaration opts into the explicit paired exporter path. It never reads ambient environment settings.
type ExportingTelemetry ¶
type ExportingTelemetry struct {
Providers TelemetryProviders
// contains filtered or unexported fields
}
ExportingTelemetry owns paired OTLP providers for one API process. It uses an explicit in-cluster gRPC target, no ambient exporter environment, no headers, and no credential configuration.
func NewExportingTelemetry ¶
func NewExportingTelemetry(ctx context.Context, endpoint string) (*ExportingTelemetry, error)
NewExportingTelemetry creates the paired OTLP trace and metric exporters. Call Shutdown after RunWithTelemetry returns so both pipelines flush their bounded pending batches before the process exits.
type SecretLookup ¶
SecretLookup resolves only explicitly named, injected environment values at composition time.
type TelemetryProviders ¶
type TelemetryProviders struct {
MeterProvider metric.MeterProvider
TracerProvider trace.TracerProvider
}
TelemetryProviders supplies the OpenTelemetry SDK composition for the API process. A caller either supplies both providers, including any configured exporters, or leaves both nil to use the process-wide OpenTelemetry providers. Endpoints, headers, and credentials deliberately do not cross this seam.