@mdf.js/openc2
Version:
MMS - API - Observability
34 lines • 1.48 kB
TypeScript
/**
* Copyright 2024 Mytra Control S.L. All rights reserved.
*
* Use of this source code is governed by an MIT-style license that can be found in the LICENSE file
* or at https://opensource.org/licenses/MIT.
*/
import { Health, Layer } from '@mdf.js/core';
import { Redis } from '@mdf.js/redis-provider';
import { AdapterOptions } from '../../types';
import { Adapter } from '../Adapter';
export declare abstract class RedisAdapter extends Adapter implements Layer.App.Resource {
/** Redis instance used as publisher */
protected readonly publisher: Redis.Provider;
/** Redis instance used as subscriber */
protected readonly subscriber: Redis.Provider;
/**
* Create a new OpenC2 adapter for Redis
* @param adapterOptions - Adapter configuration options
* @param redisOptions - Redis configuration options
* @param type - component type
*/
constructor(adapterOptions: AdapterOptions, type: 'producer' | 'consumer', redisOptions?: Redis.Config);
/** Adapter health status */
get status(): Health.Status;
/** Component checks */
get checks(): Health.Checks;
/** Connect the OpenC2 Adapter to the underlayer transport system */
start(): Promise<void>;
/** Connect the OpenC2 Adapter to the underlayer transport system */
stop(): Promise<void>;
/** Disconnect the OpenC2 Adapter to the underlayer transport system */
close(): Promise<void>;
}
//# sourceMappingURL=RedisAdapter.d.ts.map