Documentation
¶
Overview ¶
Package services selects and constructs the runtime services provider chosen at startup by the RUNTIME_SERVICES_MODULE environment variable.
Providers live in subpackages (standalone, k8s, and future ones such as redis). Each self-registers from an init function by calling Register with its module name: only the provider whose name matches the selected module becomes active, the rest are no-ops. A binary blank-imports the provider packages it ships (mirroring how connectors are wired), then calls New to build whichever one selected itself.
Index ¶
Constants ¶
const DefaultModule = "standalone"
DefaultModule is the provider selected when RUNTIME_SERVICES_MODULE is unset: a single-process, no-dependency default.
const ModuleEnvVar = "RUNTIME_SERVICES_MODULE"
ModuleEnvVar names the environment variable selecting the runtime services provider.
Variables ¶
This section is empty.
Functions ¶
func Module ¶
func Module() string
Module returns the selected module name (RUNTIME_SERVICES_MODULE, or the default when unset), for logging.
Types ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package k8s implements the runtime services provider for a Kubernetes cluster: leader election backed by coordination/v1 Leases (so work runs on one replica) and a KV store backed by the orchestrator API (deployment-scoped, with encrypted secrets).
|
Package k8s implements the runtime services provider for a Kubernetes cluster: leader election backed by coordination/v1 Leases (so work runs on one replica) and a KV store backed by the orchestrator API (deployment-scoped, with encrypted secrets). |
|
Package standalone implements the single-process runtime services module: leader election always grants leadership (there is nothing to elect) and the KV store lives in process memory.
|
Package standalone implements the single-process runtime services module: leader election always grants leadership (there is nothing to elect) and the KV store lives in process memory. |