import { ComposedMetricsManager } from '../../composed-metrics'; import { ElasticityStrategyManager, ElasticityStrategyService } from '../../elasticity'; import { MetricsSourcesManager } from '../../metrics'; import { OrchestratorGateway } from '../../orchestrator'; import { SloControlLoop, SloEvaluator } from '../../slo'; import { PolarisTransformationServiceManager } from '../../transformation'; /** * @returns The instance of the `PolarisRuntime` singleton or `undefined` if it has not been initialized yet. */ export declare function getPolarisRuntime(): PolarisRuntime; /** * @returns The instance of the `PolarisRuntime` singleton. * @throws An error if the `PolarisRuntime` singleton has not yet been initialized. */ export declare function getPolarisRuntimeOrThrow(): PolarisRuntime; /** * Sets the `PolarisRuntime` singleton. */ export declare function initPolarisRuntime(runtime: PolarisRuntime): void; /** * Interface that must be implemented by a class that exposes a Polaris runtime. * * User `getPolarisRuntime()` to obtain an instance of the `PolarisRuntime` singleton. * * Use `initPolarisRuntime()` to set the instance of the `PolarisRuntime` singleton. */ export interface PolarisRuntime extends OrchestratorGateway { /** * The `PolarisTransformationService` that should be used for converting between orchestrator-independent Polaris objects * and orchestrator-specific plain objects, which can be serialized. */ transformer: PolarisTransformationServiceManager; /** * The `ElasticityStrategyService` that should be used for creating and configuring elasticity strategies. */ elasticityStrategyService: ElasticityStrategyService; /** * The `MetricsSourcesManager` that can be used to register new metrics sources and for obtaining existing ones. */ metricsSourcesManager: MetricsSourcesManager; /** * Creates an instance of the `SloEvaluator` specific to this runtime implementation. */ createSloEvaluator(): SloEvaluator; /** * Creates an instance of the `SloControlLoop` specific to this runtime implementation. */ createSloControlLoop(): SloControlLoop; /** * Creates an `ElasticityStrategyManager` instance. */ createElasticityStrategyManager(): ElasticityStrategyManager; /** * Creates a new `ComposedMetricsManager` for computing composed metrics in a dedicated controller. */ createComposedMetricsManager(): ComposedMetricsManager; }