1 | import { ChannelControlHelper } from './experimental';
|
2 | import { LoadBalancer, LoadBalancingConfig } from './load-balancer';
|
3 | import { SubchannelAddress } from './subchannel-address';
|
4 | export interface SuccessRateEjectionConfig {
|
5 | readonly stdev_factor: number;
|
6 | readonly enforcement_percentage: number;
|
7 | readonly minimum_hosts: number;
|
8 | readonly request_volume: number;
|
9 | }
|
10 | export interface FailurePercentageEjectionConfig {
|
11 | readonly threshold: number;
|
12 | readonly enforcement_percentage: number;
|
13 | readonly minimum_hosts: number;
|
14 | readonly request_volume: number;
|
15 | }
|
16 | export declare class OutlierDetectionLoadBalancingConfig implements LoadBalancingConfig {
|
17 | private readonly childPolicy;
|
18 | private readonly intervalMs;
|
19 | private readonly baseEjectionTimeMs;
|
20 | private readonly maxEjectionTimeMs;
|
21 | private readonly maxEjectionPercent;
|
22 | private readonly successRateEjection;
|
23 | private readonly failurePercentageEjection;
|
24 | constructor(intervalMs: number | null, baseEjectionTimeMs: number | null, maxEjectionTimeMs: number | null, maxEjectionPercent: number | null, successRateEjection: Partial<SuccessRateEjectionConfig> | null, failurePercentageEjection: Partial<FailurePercentageEjectionConfig> | null, childPolicy: LoadBalancingConfig[]);
|
25 | getLoadBalancerName(): string;
|
26 | toJsonObject(): object;
|
27 | getIntervalMs(): number;
|
28 | getBaseEjectionTimeMs(): number;
|
29 | getMaxEjectionTimeMs(): number;
|
30 | getMaxEjectionPercent(): number;
|
31 | getSuccessRateEjectionConfig(): SuccessRateEjectionConfig | null;
|
32 | getFailurePercentageEjectionConfig(): FailurePercentageEjectionConfig | null;
|
33 | getChildPolicy(): LoadBalancingConfig[];
|
34 | copyWithChildPolicy(childPolicy: LoadBalancingConfig[]): OutlierDetectionLoadBalancingConfig;
|
35 | static createFromJson(obj: any): OutlierDetectionLoadBalancingConfig;
|
36 | }
|
37 | export declare class OutlierDetectionLoadBalancer implements LoadBalancer {
|
38 | private childBalancer;
|
39 | private addressMap;
|
40 | private latestConfig;
|
41 | private ejectionTimer;
|
42 | private timerStartTime;
|
43 | constructor(channelControlHelper: ChannelControlHelper);
|
44 | private isCountingEnabled;
|
45 | private getCurrentEjectionPercent;
|
46 | private runSuccessRateCheck;
|
47 | private runFailurePercentageCheck;
|
48 | private eject;
|
49 | private uneject;
|
50 | private switchAllBuckets;
|
51 | private startTimer;
|
52 | private runChecks;
|
53 | updateAddressList(addressList: SubchannelAddress[], lbConfig: LoadBalancingConfig, attributes: {
|
54 | [key: string]: unknown;
|
55 | }): void;
|
56 | exitIdle(): void;
|
57 | resetBackoff(): void;
|
58 | destroy(): void;
|
59 | getTypeName(): string;
|
60 | }
|
61 | export declare function setup(): void;
|