Class: Runtime
worker.Runtime
Core singleton representing an instance of the Rust Core SDK
Use install in order to customize the server connection options or other global process options.
Properties
logger
• Readonly logger: Logger
metricMeter
• Readonly metricMeter: MetricMeter
The metric meter associated with this runtime.
native
• Readonly native: Runtime
options
• Readonly options: CompiledRuntimeOptions
_instance
▪ Static Optional _instance: Runtime
defaultOptions
▪ Static defaultOptions: RuntimeOptions
Default options get overridden when Core is installed and are remembered in case Core is re-instantiated after being shut down
instantiator
▪ Static Optional instantiator: "install" | "instance"
Methods
flushLogs
▸ flushLogs(): void
Flush any buffered logs.
Returns
void
install
▸ install(options): Runtime
Instantiate a new Core object and set it as the singleton instance
If Core has already been instantiated with instance or this method, will throw a IllegalStateError.
Parameters
| Name | Type |
|---|---|
options | RuntimeOptions |
Returns
instance
▸ instance(): Runtime
Get or instantiate the singleton Core object
If Core has not been instantiated with install or this method, a new Core instance will be installed and configured to connect to a local server.