import { experimental, LoadBalancingConfig, ChannelOptions } from "@grpc/grpc-js"; import TypedLoadBalancingConfig = experimental.TypedLoadBalancingConfig; import LoadBalancer = experimental.LoadBalancer; import ChannelControlHelper = experimental.ChannelControlHelper; import Endpoint = experimental.Endpoint; import StatusOr = experimental.StatusOr; /** * Type of the config for an individual child in the JSON representation of * a weighted target LB policy config. */ export interface WeightedTargetRaw { weight: number; child_policy: LoadBalancingConfig[]; } /** * The JSON representation of the config for the weighted target LB policy. The * LoadBalancingConfig for a weighted target policy should have the form * { weighted_target: WeightedTargetRawConfig } */ export interface WeightedTargetRawConfig { targets: { [name: string]: WeightedTargetRaw; }; } export declare class WeightedTargetLoadBalancer implements LoadBalancer { private channelControlHelper; private WeightedChildImpl; /** * Map of target names to target children. Includes current targets and * previous targets with deactivation timers that have not yet triggered. */ private targets; /** * List of current target names. */ private targetList; private updatesPaused; private latestChildErrorMessage; constructor(channelControlHelper: ChannelControlHelper); private maybeUpdateState; private updateState; updateAddressList(addressList: StatusOr, lbConfig: TypedLoadBalancingConfig, options: ChannelOptions, resolutionNote: string): boolean; exitIdle(): void; resetBackoff(): void; destroy(): void; getTypeName(): string; } export declare function setup(): void;