From 8eff962cab608341a6f2fedc640a0e32d96f26e2 Mon Sep 17 00:00:00 2001 From: altaf-creator Date: Sun, 9 Nov 2025 11:15:19 +0800 Subject: pain --- .../@grpc/grpc-js/build/src/service-config.d.ts | 56 ++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 frontend-old/node_modules/@grpc/grpc-js/build/src/service-config.d.ts (limited to 'frontend-old/node_modules/@grpc/grpc-js/build/src/service-config.d.ts') diff --git a/frontend-old/node_modules/@grpc/grpc-js/build/src/service-config.d.ts b/frontend-old/node_modules/@grpc/grpc-js/build/src/service-config.d.ts new file mode 100644 index 0000000..4006426 --- /dev/null +++ b/frontend-old/node_modules/@grpc/grpc-js/build/src/service-config.d.ts @@ -0,0 +1,56 @@ +import { Status } from './constants'; +import { Duration } from './duration'; +import { LoadBalancingConfig } from './load-balancer'; +export interface MethodConfigName { + service?: string; + method?: string; +} +export interface RetryPolicy { + maxAttempts: number; + initialBackoff: string; + maxBackoff: string; + backoffMultiplier: number; + retryableStatusCodes: (Status | string)[]; +} +export interface HedgingPolicy { + maxAttempts: number; + hedgingDelay?: string; + nonFatalStatusCodes?: (Status | string)[]; +} +export interface MethodConfig { + name: MethodConfigName[]; + waitForReady?: boolean; + timeout?: Duration; + maxRequestBytes?: number; + maxResponseBytes?: number; + retryPolicy?: RetryPolicy; + hedgingPolicy?: HedgingPolicy; +} +export interface RetryThrottling { + maxTokens: number; + tokenRatio: number; +} +export interface ServiceConfig { + loadBalancingPolicy?: string; + loadBalancingConfig: LoadBalancingConfig[]; + methodConfig: MethodConfig[]; + retryThrottling?: RetryThrottling; +} +export interface ServiceConfigCanaryConfig { + clientLanguage?: string[]; + percentage?: number; + clientHostname?: string[]; + serviceConfig: ServiceConfig; +} +export declare function validateRetryThrottling(obj: any): RetryThrottling; +export declare function validateServiceConfig(obj: any): ServiceConfig; +/** + * Find the "grpc_config" record among the TXT records, parse its value as JSON, validate its contents, + * and select a service config with selection fields that all match this client. Most of these steps + * can fail with an error; the caller must handle any errors thrown this way. + * @param txtRecord The TXT record array that is output from a successful call to dns.resolveTxt + * @param percentage A number chosen from the range [0, 100) that is used to select which config to use + * @return The service configuration to use, given the percentage value, or null if the service config + * data has a valid format but none of the options match the current client. + */ +export declare function extractAndSelectServiceConfig(txtRecord: string[][], percentage: number): ServiceConfig | null; -- cgit v1.2.3