Documentation
¶
Overview ¶
Package runtime manages the lifecycle of all long-running services based on the persisted GlobalConfig. Each service is independently startable and stoppable; the Manager diffs old vs new config and applies changes surgically.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deps ¶
type Deps struct {
Ingestor *ingestor.Service
Publisher *publisher.Service
Coordinator *coordinator.Coordinator
Transcoder *transcoder.Service
StreamMgr *manager.Service
HooksSvc *hooks.Service
SessionsSvc *sessions.Service
APISrv *api.Server
Bus events.Bus
StreamRepo store.StreamRepository
GlobalConfigRepo store.GlobalConfigRepository
}
Deps holds all service references needed by the Manager. Populated by main.go from the DI injector.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager owns the lifecycle of all long-running services. It reads GlobalConfig from the store and starts/stops services accordingly.
func (*Manager) Apply ¶
Apply saves a new GlobalConfig to the store and diffs against the current config to start/stop services as needed.
func (*Manager) Bootstrap ¶
Bootstrap loads GlobalConfig from the store (seeding defaults on first boot), then starts all configured services.
func (*Manager) BootstrapWith ¶
func (m *Manager) BootstrapWith(gcfg *domain.GlobalConfig)
BootstrapWith starts all configured services using the provided GlobalConfig. Use this when main.go has already loaded/seeded the config from the store.
func (*Manager) CurrentConfig ¶
func (m *Manager) CurrentConfig() *domain.GlobalConfig
CurrentConfig returns a copy of the active GlobalConfig.