@gati-framework/runtime
Version:
Gati runtime execution engine for running handler-based applications
43 lines • 1.15 kB
TypeScript
/**
* @module runtime/coordinators/consul-coordinator
* @description Consul-based lifecycle coordinator for service discovery and health management
*/
import type { LifecycleCoordinator, HealthStatus } from '../types/context.js';
/**
* Consul configuration
*/
export interface ConsulConfig {
host: string;
port: number;
serviceName: string;
serviceId: string;
servicePort: number;
healthCheckPath: string;
healthCheckInterval: string;
tags?: string[];
}
/**
* Consul-based lifecycle coordinator
*/
export declare class ConsulCoordinator implements LifecycleCoordinator {
private config;
private shutdownHandlers;
constructor(config: ConsulConfig);
/**
* Register service with Consul
*/
register(): Promise<void>;
/**
* Deregister service from Consul
*/
deregister(): Promise<void>;
/**
* Report health status to Consul
*/
reportHealth(status: HealthStatus): Promise<void>;
/**
* Listen for coordinated shutdown signals
*/
onCoordinatedShutdown(fn: () => Promise<void>): void;
}
//# sourceMappingURL=consul-coordinator.d.ts.map