Documentation
¶
Overview ¶
Package rapid implements synchronous even dispatch loop.
Package rapid implements synchronous even dispatch loop.
Index ¶
Constants ¶
const ( RuntimeDomain = "runtime" OperatorDomain = "operator" )
Variables ¶
This section is empty.
Functions ¶
func Start ¶
func Start(ctx context.Context, s *Sandbox) (interop.RapidContext, interop.InternalStateGetter, string)
Start pings Supervisor, and starts the Runtime API server. It allows the caller to configure: - Supervisor implementation: performs container construction & process management - Telemetry API and Logs API implementation: handling /logs and /telemetry of Runtime API - Events API implementation: handles platform log events emitted by Rapid (e.g. RuntimeDone, InitStart) - Logs Egress implementation: handling stdout/stderr logs from extension & runtime processes (TODO: remove & unify with Supervisor) - Tracer implementation: handling trace segments generate by platform (TODO: remove & unify with Events API) - InteropServer implementation: legacy interface for sending internal protocol messages, today only RuntimeReady remains (TODO: move RuntimeReady outside Core) - Feature flags:
- StandaloneMode: indicates if being called by Rapid Core's standalone HTTP frontend (TODO: remove after unifying error reporting)
- InitCachingEnabled: indicates if handlers must run Init Caching specific logic
- TelemetryAPIEnabled: indicates if /telemetry and /logs endpoint HTTP handlers must be mounted
- Contexts & Data:
- ctx is used to gracefully terminate Runtime API HTTP Server on exit
Types ¶
type Sandbox ¶
type Sandbox struct {
EnableTelemetryAPI bool
StandaloneMode bool
InteropServer interop.Server
Tracer telemetry.Tracer
LogsSubscriptionAPI telemetry.SubscriptionAPI
TelemetrySubscriptionAPI telemetry.SubscriptionAPI
LogsEgressAPI telemetry.StdLogsEgressAPI
RuntimeStdoutWriter io.Writer
RuntimeStderrWriter io.Writer
Handler string
EventsAPI interop.EventsAPI
InitCachingEnabled bool
Supervisor supvmodel.ProcessSupervisor
RuntimeFsRootPath string // path to the root of the domain within the root mnt namespace. Reqired to find extensions
RuntimeAPIHost string
RuntimeAPIPort int
}