consul-resolver
Version:
A load balancer for Consul services with Redis-based metrics
15 lines (14 loc) • 507 B
TypeScript
import Consul from "consul";
import Redis from "ioredis";
import { ServiceHealth } from "../types";
export declare class HealthCheckManager {
private consul;
private redis;
private cachePrefix;
private cacheTTL;
private cacheEnabled;
private debug;
constructor(consul: Consul, redis: Redis | undefined, cachePrefix: string, cacheTTL: number, cacheEnabled: boolean, debug: boolean);
private getHealthCacheKey;
getHealthChecks(service: string): Promise<ServiceHealth[]>;
}