UNPKG

@tehreet/conduit

Version:

LLM API gateway with intelligent routing, robust process management, and health monitoring

84 lines 2.15 kB
import { EventEmitter } from 'events'; import { ConduitConfig, HealthStatus, HealthCheckResult, RoutingDecision } from '../types'; import { RoutingContext } from '../plugins/plugin-interface'; import { ConduitRouter } from '../router/ConduitRouter'; import { PluginManager } from '../plugins/EnhancedPluginManager'; import { HealthMonitor } from '../monitoring/HealthMonitor'; /** * Enhanced ConduitServer with full programmatic API */ export declare class ConduitServer extends EventEmitter { private config; private router; private pluginManager; private healthMonitor; private legacyServer; private isStarted; private startTime; constructor(config: ConduitConfig); /** * Start the server */ start(): Promise<void>; /** * Stop the server */ stop(): Promise<void>; /** * Route a single request programmatically */ route(context: RoutingContext): Promise<RoutingDecision>; /** * Get server health status */ getHealth(): HealthStatus; /** * Update server configuration */ updateConfig(config: Partial<ConduitConfig>): Promise<void>; /** * Get current configuration */ getConfig(): ConduitConfig; /** * Check if server is running */ isRunning(): boolean; /** * Get server uptime in milliseconds */ getUptime(): number; /** * Get plugin manager instance */ getPluginManager(): PluginManager; /** * Get router instance */ getRouter(): ConduitRouter; /** * Get health monitor instance */ getHealthMonitor(): HealthMonitor; /** * Add a custom health check */ addHealthCheck(name: string, check: () => Promise<HealthCheckResult>): void; /** * Add middleware hook */ addHook(event: string, handler: any): void; /** * Handle incoming HTTP requests */ private handleRequest; /** * Set up event forwarding from components */ private setupEventForwarding; /** * Cleanup resources */ private cleanup; } //# sourceMappingURL=ConduitServer.d.ts.map