import { LoadBalancer } from "https://deno.land/x/pup@1.0.0-rc.9/lib/core/loadbalancer.ts";
Constructors
new
LoadBalancer(backends: Backend[],
strategy?: BalancingStrategy,
validationInterval?: number,
loggerCallback: () => void,
severity: string,
category: string,
text: string,
Properties
Methods
private
handleConnectionFailure(backend: InternalBackend): voidprivate
handleProxyCommunication(): Promise<void>private
initializeBackends(backends: Backend[]): InternalBackend[]private
markBackendAsDown(backend: InternalBackend): voidprivate
proxy(client: Deno.Conn, backend: InternalBackend): Promise<void>private
selectIpHashBackend(client: Deno.Conn): InternalBackend | nullprivate
selectLeastConnectionsBackend(): InternalBackend | nullprivate
selectRoundRobinBackend(): InternalBackend | nullprivate
setupValidationTimer(): numberprivate
validateBackends(): Promise<void>close(): void
selectBackend(client: Deno.Conn): InternalBackend | null
start(port: number): Promise<void>
updateBackendConnectionStatus(backend: InternalBackend, isConnected: boolean): void