import { Server, ServerCredentials, ServerOptions, StatusObject } from "@grpc/grpc-js"; interface ServingStatusListener { (servingStatus: StatusObject): void; } export interface XdsServerOptions extends ServerOptions { drainGraceTimeMs?: number; } export declare class XdsServer extends Server { private listenerResourceNameTemplate; private boundPortMap; private xdsClient; private drainGraceTimeMs; constructor(options?: XdsServerOptions); /** * Bind a port using configuration retrieved from the xDS control plane. * @param port Port to bind in the format [IP address]:[port number] (e.g. 0.0.0.0:443) * @param creds Server credentials object to bind * @param callback */ bindAsync(port: string, creds: ServerCredentials, callback: (error: Error | null, port: number) => void): void; drain(port: string, graceTimeMs: number): void; unbind(port: string): void; tryShutdown(callback: (error?: Error) => void): void; forceShutdown(): void; addServingStateListener(port: string, listener: ServingStatusListener): void; removeServingStateListener(port: string, listener: ServingStatusListener): void; } export {};