@meshwatch/backend-core
Version:
Meshwatch backend core services.
24 lines (23 loc) • 1.45 kB
TypeScript
import { ExecutorCheckResult, LatencyCheckDTO, MonitoringExecutor } from '@meshwatch/types';
import { DynamoDBClient, PostgresClient } from '../../shared';
import { Pagination } from '../../shared/rest';
import BaseService, { ServiceResponse } from '../../shared/services';
import { LatencyCheckDatasource } from './latency/db';
import { IdentifiableMonitorExecutorCheck } from './types';
export declare class MonitorChecksDatasource {
private readonly latency;
private readonly client;
constructor(client?: PostgresClient);
createChecksSchema: () => Promise<import("pg").QueryResult>;
insertCheckData: <T extends ExecutorCheckResult>(data: IdentifiableMonitorExecutorCheck<T>, executorType: MonitoringExecutor) => Promise<LatencyCheckDTO>;
getLatency: () => LatencyCheckDatasource;
}
export declare const monitorChecksDatasource: MonitorChecksDatasource;
export declare class MonitorChecksService extends BaseService {
private readonly latencyCheckDatasource;
private readonly monitorDatasource;
constructor(postgresClient?: PostgresClient, dynamoClient?: DynamoDBClient);
getChecks: (userId: string, monitorId: string, pagination?: Pagination) => Promise<ServiceResponse<LatencyCheckDTO[] | import("@meshwatch/types").Boom<import("../../shared/validation/types").FormErrors<undefined>>>>;
}
declare const monitorChecksService: MonitorChecksService;
export default monitorChecksService;