import type { ILogger } from '@rsdk/logging'; import { InternalException } from '../../exceptions'; import type { CheckResult } from '../helpers'; import type { HealthIndicator } from '../types'; export interface PingCheckOptions { /** * URI of external resource */ url: URL; } /** * PingIndicator is meant to check access to some network * resource. * * @attention NOT IMPLEMENTED */ export abstract class PingIndicator implements HealthIndicator { private readonly url: URL; constructor( protected logger: ILogger, options: PingCheckOptions, ) { this.url = options.url; } async check(): Promise { this.logger.info('Url to be checked', { url: this.url }); /** * TODO: Implement this. How? Probably caller should * specify strategy protocol to use */ throw new InternalException('Ping check is yet to be implemented!'); } }