il2cpp-dump-analyzer-mcp
Version:
Agentic RAG system for analyzing IL2CPP dump.cs files from Unity games
95 lines (94 loc) • 2.59 kB
TypeScript
import { SupabaseClient } from '@supabase/supabase-js';
/**
* Connection pool configuration
*/
export interface ConnectionPoolConfig {
/** Maximum number of connections in the pool */
maxConnections?: number;
/** Minimum number of connections to maintain */
minConnections?: number;
/** Connection idle timeout in milliseconds */
idleTimeoutMs?: number;
/** Connection acquisition timeout in milliseconds */
acquireTimeoutMs?: number;
/** Enable connection health checks */
enableHealthChecks?: boolean;
/** Health check interval in milliseconds */
healthCheckIntervalMs?: number;
}
/**
* Connection pool statistics
*/
export interface PoolStats {
totalConnections: number;
activeConnections: number;
idleConnections: number;
waitingRequests: number;
totalAcquired: number;
totalReleased: number;
totalCreated: number;
totalDestroyed: number;
}
/**
* Enhanced Supabase connection manager with pooling and health monitoring
*/
export declare class SupabaseConnectionManager {
private supabaseUrl;
private supabaseKey;
private static instance;
private client;
private config;
private stats;
private healthCheckInterval;
private isHealthy;
private lastHealthCheck;
private constructor();
/**
* Get singleton instance of connection manager
*/
static getInstance(supabaseUrl?: string, supabaseKey?: string, config?: ConnectionPoolConfig): SupabaseConnectionManager;
/**
* Initialize the connection manager
*/
private initialize;
/**
* Get a database client
*/
getClient(): SupabaseClient;
/**
* Release a database client (for compatibility with pooling patterns)
*/
releaseClient(): void;
/**
* Start health check monitoring
*/
private startHealthChecks;
/**
* Perform a health check on the database connection
*/
private performHealthCheck;
/**
* Get connection pool statistics
*/
getStats(): PoolStats;
/**
* Get health status
*/
getHealthStatus(): {
isHealthy: boolean;
lastHealthCheck: Date | null;
stats: PoolStats;
};
/**
* Cleanup and close connections
*/
cleanup(): Promise<void>;
/**
* Reset singleton instance (useful for testing)
*/
static reset(): void;
}
/**
* Factory function to create connection manager from environment variables
*/
export declare function createConnectionManager(config?: ConnectionPoolConfig): SupabaseConnectionManager;