Class: 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
readonlylogger:Logger
metricMeter
readonlymetricMeter:MetricMeter
The metric meter associated with this runtime.
metricsBuffer
readonlymetricsBuffer:MetricsBuffer|undefined
Experimental
The metrics buffer associated with this runtime, if buffered metrics are enabled.
Buffered metrics is an experimental feature. APIs may be subject to change.
native
readonlynative:Runtime
options
readonlyoptions:CompiledRuntimeOptions
_instance?
staticoptional_instance?:Runtime
defaultOptions
staticdefaultOptions:RuntimeOptions
Default options get overridden when Core is installed and are remembered in case Core is re-instantiated after being shut down
instantiator?
staticoptionalinstantiator?:"install"|"instance"
Methods
flushLogs()
flushLogs():
void
Flush any buffered logs.
Returns
void
install()
staticinstall(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
options
Returns
Runtime
instance()
staticinstance():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.
Returns
Runtime