Documentation
¶
Overview ¶
Package engine orchestrates the lifecycle, subsystem initialization, background workers, network servers, and graceful shutdown of RUSEON Core.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
Run initializes and executes all core streaming subsystems, background workers, and API servers.
Prerequisites:
- Dependency injection providers (registry.CurrentStateStore, registry.CurrentBlobStore, registry.CurrentAuthenticator, and registry.CurrentEventBus) must be registered prior to calling Run.
Lifecycle flow:
- Migrates initial YAML camera/tag definitions to the persistent StateStore (BadgerDB).
- Initializes the stream.Manager and loads active camera streams.
- Starts the optional MQTT metadata publisher worker.
- Starts the gRPC frame extractor & AI metadata ingestion server.
- Launches background periodic tasks (archive retention cleanup, billing metrics aggregation, database backup).
- Initializes the WebRTC engine (pregenerating ECDSA certificates and UDP muxing).
- Launches the primary HTTP/REST/HLS/WHEP API server (and optional pprof server).
- Blocks until a termination signal (SIGINT or SIGTERM) is received.
- Executes an ordered graceful shutdown (terminates background tasks, allows 5s for active HTTP requests, stops gRPC server, and closes all camera ingest/playback streams).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.