diff --git a/.gitmodules b/.gitmodules index c17c34644..7989090c6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,15 @@ [submodule "packages/grpc-tools/deps/protobuf"] path = packages/grpc-tools/deps/protobuf url = https://github.com/protocolbuffers/protobuf +[submodule "packages/grpc-js/deps/envoy-api"] + path = packages/grpc-js/deps/envoy-api + url = https://github.com/envoyproxy/data-plane-api.git +[submodule "packages/grpc-js/deps/udpa"] + path = packages/grpc-js/deps/udpa + url = https://github.com/cncf/udpa.git +[submodule "packages/grpc-js/deps/googleapis"] + path = packages/grpc-js/deps/googleapis + url = https://github.com/googleapis/googleapis.git +[submodule "packages/grpc-js/deps/protoc-gen-validate"] + path = packages/grpc-js/deps/protoc-gen-validate + url = https://github.com/envoyproxy/protoc-gen-validate.git diff --git a/packages/grpc-js/deps/envoy-api b/packages/grpc-js/deps/envoy-api new file mode 160000 index 000000000..50cef8fca --- /dev/null +++ b/packages/grpc-js/deps/envoy-api @@ -0,0 +1 @@ +Subproject commit 50cef8fcab37ba59a61068934d08a3f4c28a681f diff --git a/packages/grpc-js/deps/googleapis b/packages/grpc-js/deps/googleapis new file mode 160000 index 000000000..8c53b2cb7 --- /dev/null +++ b/packages/grpc-js/deps/googleapis @@ -0,0 +1 @@ +Subproject commit 8c53b2cb792234354c13336ac7daee61333deade diff --git a/packages/grpc-js/deps/protoc-gen-validate b/packages/grpc-js/deps/protoc-gen-validate new file mode 160000 index 000000000..0af61d9dc --- /dev/null +++ b/packages/grpc-js/deps/protoc-gen-validate @@ -0,0 +1 @@ +Subproject commit 0af61d9dc28712dc0e6f8e1a940855a2ee0cb9ed diff --git a/packages/grpc-js/deps/udpa b/packages/grpc-js/deps/udpa new file mode 160000 index 000000000..3b31d022a --- /dev/null +++ b/packages/grpc-js/deps/udpa @@ -0,0 +1 @@ +Subproject commit 3b31d022a144b334eb2224838e4d6952ab5253aa diff --git a/packages/grpc-js/package.json b/packages/grpc-js/package.json index 83b5fd0da..1f28e3240 100644 --- a/packages/grpc-js/package.json +++ b/packages/grpc-js/package.json @@ -15,7 +15,7 @@ "types": "build/src/index.d.ts", "license": "Apache-2.0", "devDependencies": { - "@grpc/proto-loader": "^0.5.0", + "@grpc/proto-loader": "^0.6.0-pre6", "@types/gulp": "^4.0.6", "@types/gulp-mocha": "0.0.32", "@types/lodash": "^4.14.108", @@ -48,11 +48,12 @@ "clean": "node -e 'require(\"rimraf\")(\"./build\", () => {})'", "compile": "tsc -p .", "format": "clang-format -i -style=\"{Language: JavaScript, BasedOnStyle: Google, ColumnLimit: 80}\" src/*.ts test/*.ts", + "generate-types": "proto-loader-gen-types --keepCase --longs String --enums String --defaults --oneofs --json --includeComments --includeDirs deps/envoy-api/ deps/udpa/ deps/googleapis/ deps/protoc-gen-validate/ -O src/generated/ --grpcLib ../index envoy/service/discovery/v2/ads.proto envoy/api/v2/listener.proto envoy/api/v2/route.proto envoy/api/v2/cluster.proto envoy/api/v2/endpoint.proto", "lint": "npm run check", "prepare": "npm run compile", "test": "gulp test", "check": "gts check src/**/*.ts", - "fix": "gts fix src/**/*.ts", + "fix": "gts fix src/*.ts", "pretest": "npm run compile", "posttest": "npm run check" }, @@ -60,8 +61,16 @@ "semver": "^6.2.0" }, "files": [ - "src/*.ts", + "src/**/*.ts", "build/src/*.{js,d.ts,js.map}", - "LICENSE" + "LICENSE", + "deps/envoy-api/envoy/api/v2/**/*.proto", + "deps/envoy-api/envoy/config/**/*.proto", + "deps/envoy-api/envoy/service/**/*.proto", + "deps/envoy-api/envoy/type/**/*.proto", + "deps/udpa/udpa/**/*.proto", + "deps/googleapis/google/api/*.proto", + "deps/googleapis/google/rpc/*.proto", + "deps/protoc-gen-validate/validate/**/*.proto" ] } diff --git a/packages/grpc-js/src/generated/ads.ts b/packages/grpc-js/src/generated/ads.ts new file mode 100644 index 000000000..a33270cc6 --- /dev/null +++ b/packages/grpc-js/src/generated/ads.ts @@ -0,0 +1,155 @@ +import * as grpc from '../index'; +import { ServiceDefinition, EnumTypeDefinition, MessageTypeDefinition } from '@grpc/proto-loader'; + +import { AggregatedDiscoveryServiceClient as _envoy_service_discovery_v2_AggregatedDiscoveryServiceClient } from './envoy/service/discovery/v2/AggregatedDiscoveryService'; + +type ConstructorArguments = Constructor extends new (...args: infer Args) => any ? Args: never; +type SubtypeConstructor = { + new(...args: ConstructorArguments): Subtype; +} + +export interface ProtoGrpcType { + envoy: { + api: { + v2: { + DeltaDiscoveryRequest: MessageTypeDefinition + DeltaDiscoveryResponse: MessageTypeDefinition + DiscoveryRequest: MessageTypeDefinition + DiscoveryResponse: MessageTypeDefinition + Resource: MessageTypeDefinition + core: { + Address: MessageTypeDefinition + AsyncDataSource: MessageTypeDefinition + BackoffStrategy: MessageTypeDefinition + BindConfig: MessageTypeDefinition + BuildVersion: MessageTypeDefinition + CidrRange: MessageTypeDefinition + ControlPlane: MessageTypeDefinition + DataSource: MessageTypeDefinition + Extension: MessageTypeDefinition + HeaderMap: MessageTypeDefinition + HeaderValue: MessageTypeDefinition + HeaderValueOption: MessageTypeDefinition + HttpUri: MessageTypeDefinition + Locality: MessageTypeDefinition + Metadata: MessageTypeDefinition + Node: MessageTypeDefinition + Pipe: MessageTypeDefinition + RemoteDataSource: MessageTypeDefinition + RequestMethod: EnumTypeDefinition + RetryPolicy: MessageTypeDefinition + RoutingPriority: EnumTypeDefinition + RuntimeDouble: MessageTypeDefinition + RuntimeFeatureFlag: MessageTypeDefinition + RuntimeFractionalPercent: MessageTypeDefinition + RuntimeUInt32: MessageTypeDefinition + SocketAddress: MessageTypeDefinition + SocketOption: MessageTypeDefinition + TcpKeepalive: MessageTypeDefinition + TrafficDirection: EnumTypeDefinition + TransportSocket: MessageTypeDefinition + } + } + } + service: { + discovery: { + v2: { + AdsDummy: MessageTypeDefinition + /** + * See https://github.com/lyft/envoy-api#apis for a description of the role of + * ADS and how it is intended to be used by a management server. ADS requests + * have the same structure as their singleton xDS counterparts, but can + * multiplex many resource types on a single stream. The type_url in the + * DiscoveryRequest/DiscoveryResponse provides sufficient information to recover + * the multiplexed singleton APIs at the Envoy instance and management server. + */ + AggregatedDiscoveryService: SubtypeConstructor & { service: ServiceDefinition } + } + } + } + type: { + FractionalPercent: MessageTypeDefinition + Percent: MessageTypeDefinition + SemanticVersion: MessageTypeDefinition + } + } + google: { + protobuf: { + Any: MessageTypeDefinition + BoolValue: MessageTypeDefinition + BytesValue: MessageTypeDefinition + DescriptorProto: MessageTypeDefinition + DoubleValue: MessageTypeDefinition + Duration: MessageTypeDefinition + EnumDescriptorProto: MessageTypeDefinition + EnumOptions: MessageTypeDefinition + EnumValueDescriptorProto: MessageTypeDefinition + EnumValueOptions: MessageTypeDefinition + FieldDescriptorProto: MessageTypeDefinition + FieldOptions: MessageTypeDefinition + FileDescriptorProto: MessageTypeDefinition + FileDescriptorSet: MessageTypeDefinition + FileOptions: MessageTypeDefinition + FloatValue: MessageTypeDefinition + GeneratedCodeInfo: MessageTypeDefinition + Int32Value: MessageTypeDefinition + Int64Value: MessageTypeDefinition + ListValue: MessageTypeDefinition + MessageOptions: MessageTypeDefinition + MethodDescriptorProto: MessageTypeDefinition + MethodOptions: MessageTypeDefinition + NullValue: EnumTypeDefinition + OneofDescriptorProto: MessageTypeDefinition + OneofOptions: MessageTypeDefinition + ServiceDescriptorProto: MessageTypeDefinition + ServiceOptions: MessageTypeDefinition + SourceCodeInfo: MessageTypeDefinition + StringValue: MessageTypeDefinition + Struct: MessageTypeDefinition + Timestamp: MessageTypeDefinition + UInt32Value: MessageTypeDefinition + UInt64Value: MessageTypeDefinition + UninterpretedOption: MessageTypeDefinition + Value: MessageTypeDefinition + } + rpc: { + Status: MessageTypeDefinition + } + } + udpa: { + annotations: { + FieldMigrateAnnotation: MessageTypeDefinition + FileMigrateAnnotation: MessageTypeDefinition + MigrateAnnotation: MessageTypeDefinition + PackageVersionStatus: EnumTypeDefinition + StatusAnnotation: MessageTypeDefinition + } + } + validate: { + AnyRules: MessageTypeDefinition + BoolRules: MessageTypeDefinition + BytesRules: MessageTypeDefinition + DoubleRules: MessageTypeDefinition + DurationRules: MessageTypeDefinition + EnumRules: MessageTypeDefinition + FieldRules: MessageTypeDefinition + Fixed32Rules: MessageTypeDefinition + Fixed64Rules: MessageTypeDefinition + FloatRules: MessageTypeDefinition + Int32Rules: MessageTypeDefinition + Int64Rules: MessageTypeDefinition + KnownRegex: EnumTypeDefinition + MapRules: MessageTypeDefinition + MessageRules: MessageTypeDefinition + RepeatedRules: MessageTypeDefinition + SFixed32Rules: MessageTypeDefinition + SFixed64Rules: MessageTypeDefinition + SInt32Rules: MessageTypeDefinition + SInt64Rules: MessageTypeDefinition + StringRules: MessageTypeDefinition + TimestampRules: MessageTypeDefinition + UInt32Rules: MessageTypeDefinition + UInt64Rules: MessageTypeDefinition + } +} + diff --git a/packages/grpc-js/src/generated/cluster.ts b/packages/grpc-js/src/generated/cluster.ts new file mode 100644 index 000000000..7d2b34a43 --- /dev/null +++ b/packages/grpc-js/src/generated/cluster.ts @@ -0,0 +1,192 @@ +import * as grpc from '../index'; +import { ServiceDefinition, EnumTypeDefinition, MessageTypeDefinition } from '@grpc/proto-loader'; + + +type ConstructorArguments = Constructor extends new (...args: infer Args) => any ? Args: never; +type SubtypeConstructor = { + new(...args: ConstructorArguments): Subtype; +} + +export interface ProtoGrpcType { + envoy: { + annotations: { + } + api: { + v2: { + Cluster: MessageTypeDefinition + ClusterLoadAssignment: MessageTypeDefinition + LoadBalancingPolicy: MessageTypeDefinition + UpstreamBindConfig: MessageTypeDefinition + UpstreamConnectionOptions: MessageTypeDefinition + auth: { + CertificateValidationContext: MessageTypeDefinition + CommonTlsContext: MessageTypeDefinition + DownstreamTlsContext: MessageTypeDefinition + GenericSecret: MessageTypeDefinition + PrivateKeyProvider: MessageTypeDefinition + SdsSecretConfig: MessageTypeDefinition + Secret: MessageTypeDefinition + TlsCertificate: MessageTypeDefinition + TlsParameters: MessageTypeDefinition + TlsSessionTicketKeys: MessageTypeDefinition + UpstreamTlsContext: MessageTypeDefinition + } + cluster: { + CircuitBreakers: MessageTypeDefinition + Filter: MessageTypeDefinition + OutlierDetection: MessageTypeDefinition + } + core: { + Address: MessageTypeDefinition + AggregatedConfigSource: MessageTypeDefinition + ApiConfigSource: MessageTypeDefinition + ApiVersion: EnumTypeDefinition + AsyncDataSource: MessageTypeDefinition + BackoffStrategy: MessageTypeDefinition + BindConfig: MessageTypeDefinition + BuildVersion: MessageTypeDefinition + CidrRange: MessageTypeDefinition + ConfigSource: MessageTypeDefinition + ControlPlane: MessageTypeDefinition + DataSource: MessageTypeDefinition + EventServiceConfig: MessageTypeDefinition + Extension: MessageTypeDefinition + GrpcProtocolOptions: MessageTypeDefinition + GrpcService: MessageTypeDefinition + HeaderMap: MessageTypeDefinition + HeaderValue: MessageTypeDefinition + HeaderValueOption: MessageTypeDefinition + HealthCheck: MessageTypeDefinition + HealthStatus: EnumTypeDefinition + Http1ProtocolOptions: MessageTypeDefinition + Http2ProtocolOptions: MessageTypeDefinition + HttpProtocolOptions: MessageTypeDefinition + HttpUri: MessageTypeDefinition + Locality: MessageTypeDefinition + Metadata: MessageTypeDefinition + Node: MessageTypeDefinition + Pipe: MessageTypeDefinition + RateLimitSettings: MessageTypeDefinition + RemoteDataSource: MessageTypeDefinition + RequestMethod: EnumTypeDefinition + RetryPolicy: MessageTypeDefinition + RoutingPriority: EnumTypeDefinition + RuntimeDouble: MessageTypeDefinition + RuntimeFeatureFlag: MessageTypeDefinition + RuntimeFractionalPercent: MessageTypeDefinition + RuntimeUInt32: MessageTypeDefinition + SelfConfigSource: MessageTypeDefinition + SocketAddress: MessageTypeDefinition + SocketOption: MessageTypeDefinition + TcpKeepalive: MessageTypeDefinition + TcpProtocolOptions: MessageTypeDefinition + TrafficDirection: EnumTypeDefinition + TransportSocket: MessageTypeDefinition + UpstreamHttpProtocolOptions: MessageTypeDefinition + } + endpoint: { + Endpoint: MessageTypeDefinition + LbEndpoint: MessageTypeDefinition + LocalityLbEndpoints: MessageTypeDefinition + } + } + } + type: { + CodecClientType: EnumTypeDefinition + DoubleRange: MessageTypeDefinition + FractionalPercent: MessageTypeDefinition + Int32Range: MessageTypeDefinition + Int64Range: MessageTypeDefinition + Percent: MessageTypeDefinition + SemanticVersion: MessageTypeDefinition + matcher: { + ListStringMatcher: MessageTypeDefinition + RegexMatchAndSubstitute: MessageTypeDefinition + RegexMatcher: MessageTypeDefinition + StringMatcher: MessageTypeDefinition + } + } + } + google: { + api: { + CustomHttpPattern: MessageTypeDefinition + Http: MessageTypeDefinition + HttpRule: MessageTypeDefinition + } + protobuf: { + Any: MessageTypeDefinition + BoolValue: MessageTypeDefinition + BytesValue: MessageTypeDefinition + DescriptorProto: MessageTypeDefinition + DoubleValue: MessageTypeDefinition + Duration: MessageTypeDefinition + Empty: MessageTypeDefinition + EnumDescriptorProto: MessageTypeDefinition + EnumOptions: MessageTypeDefinition + EnumValueDescriptorProto: MessageTypeDefinition + EnumValueOptions: MessageTypeDefinition + FieldDescriptorProto: MessageTypeDefinition + FieldOptions: MessageTypeDefinition + FileDescriptorProto: MessageTypeDefinition + FileDescriptorSet: MessageTypeDefinition + FileOptions: MessageTypeDefinition + FloatValue: MessageTypeDefinition + GeneratedCodeInfo: MessageTypeDefinition + Int32Value: MessageTypeDefinition + Int64Value: MessageTypeDefinition + ListValue: MessageTypeDefinition + MessageOptions: MessageTypeDefinition + MethodDescriptorProto: MessageTypeDefinition + MethodOptions: MessageTypeDefinition + NullValue: EnumTypeDefinition + OneofDescriptorProto: MessageTypeDefinition + OneofOptions: MessageTypeDefinition + ServiceDescriptorProto: MessageTypeDefinition + ServiceOptions: MessageTypeDefinition + SourceCodeInfo: MessageTypeDefinition + StringValue: MessageTypeDefinition + Struct: MessageTypeDefinition + Timestamp: MessageTypeDefinition + UInt32Value: MessageTypeDefinition + UInt64Value: MessageTypeDefinition + UninterpretedOption: MessageTypeDefinition + Value: MessageTypeDefinition + } + } + udpa: { + annotations: { + FieldMigrateAnnotation: MessageTypeDefinition + FileMigrateAnnotation: MessageTypeDefinition + MigrateAnnotation: MessageTypeDefinition + PackageVersionStatus: EnumTypeDefinition + StatusAnnotation: MessageTypeDefinition + } + } + validate: { + AnyRules: MessageTypeDefinition + BoolRules: MessageTypeDefinition + BytesRules: MessageTypeDefinition + DoubleRules: MessageTypeDefinition + DurationRules: MessageTypeDefinition + EnumRules: MessageTypeDefinition + FieldRules: MessageTypeDefinition + Fixed32Rules: MessageTypeDefinition + Fixed64Rules: MessageTypeDefinition + FloatRules: MessageTypeDefinition + Int32Rules: MessageTypeDefinition + Int64Rules: MessageTypeDefinition + KnownRegex: EnumTypeDefinition + MapRules: MessageTypeDefinition + MessageRules: MessageTypeDefinition + RepeatedRules: MessageTypeDefinition + SFixed32Rules: MessageTypeDefinition + SFixed64Rules: MessageTypeDefinition + SInt32Rules: MessageTypeDefinition + SInt64Rules: MessageTypeDefinition + StringRules: MessageTypeDefinition + TimestampRules: MessageTypeDefinition + UInt32Rules: MessageTypeDefinition + UInt64Rules: MessageTypeDefinition + } +} + diff --git a/packages/grpc-js/src/generated/endpoint.ts b/packages/grpc-js/src/generated/endpoint.ts new file mode 100644 index 000000000..ade62c993 --- /dev/null +++ b/packages/grpc-js/src/generated/endpoint.ts @@ -0,0 +1,158 @@ +import * as grpc from '../index'; +import { ServiceDefinition, EnumTypeDefinition, MessageTypeDefinition } from '@grpc/proto-loader'; + + +type ConstructorArguments = Constructor extends new (...args: infer Args) => any ? Args: never; +type SubtypeConstructor = { + new(...args: ConstructorArguments): Subtype; +} + +export interface ProtoGrpcType { + envoy: { + annotations: { + } + api: { + v2: { + ClusterLoadAssignment: MessageTypeDefinition + core: { + Address: MessageTypeDefinition + AsyncDataSource: MessageTypeDefinition + BackoffStrategy: MessageTypeDefinition + BindConfig: MessageTypeDefinition + BuildVersion: MessageTypeDefinition + CidrRange: MessageTypeDefinition + ControlPlane: MessageTypeDefinition + DataSource: MessageTypeDefinition + EventServiceConfig: MessageTypeDefinition + Extension: MessageTypeDefinition + GrpcService: MessageTypeDefinition + HeaderMap: MessageTypeDefinition + HeaderValue: MessageTypeDefinition + HeaderValueOption: MessageTypeDefinition + HealthCheck: MessageTypeDefinition + HealthStatus: EnumTypeDefinition + HttpUri: MessageTypeDefinition + Locality: MessageTypeDefinition + Metadata: MessageTypeDefinition + Node: MessageTypeDefinition + Pipe: MessageTypeDefinition + RemoteDataSource: MessageTypeDefinition + RequestMethod: EnumTypeDefinition + RetryPolicy: MessageTypeDefinition + RoutingPriority: EnumTypeDefinition + RuntimeDouble: MessageTypeDefinition + RuntimeFeatureFlag: MessageTypeDefinition + RuntimeFractionalPercent: MessageTypeDefinition + RuntimeUInt32: MessageTypeDefinition + SocketAddress: MessageTypeDefinition + SocketOption: MessageTypeDefinition + TcpKeepalive: MessageTypeDefinition + TrafficDirection: EnumTypeDefinition + TransportSocket: MessageTypeDefinition + } + endpoint: { + Endpoint: MessageTypeDefinition + LbEndpoint: MessageTypeDefinition + LocalityLbEndpoints: MessageTypeDefinition + } + } + } + type: { + CodecClientType: EnumTypeDefinition + DoubleRange: MessageTypeDefinition + FractionalPercent: MessageTypeDefinition + Int32Range: MessageTypeDefinition + Int64Range: MessageTypeDefinition + Percent: MessageTypeDefinition + SemanticVersion: MessageTypeDefinition + matcher: { + ListStringMatcher: MessageTypeDefinition + RegexMatchAndSubstitute: MessageTypeDefinition + RegexMatcher: MessageTypeDefinition + StringMatcher: MessageTypeDefinition + } + } + } + google: { + api: { + CustomHttpPattern: MessageTypeDefinition + Http: MessageTypeDefinition + HttpRule: MessageTypeDefinition + } + protobuf: { + Any: MessageTypeDefinition + BoolValue: MessageTypeDefinition + BytesValue: MessageTypeDefinition + DescriptorProto: MessageTypeDefinition + DoubleValue: MessageTypeDefinition + Duration: MessageTypeDefinition + Empty: MessageTypeDefinition + EnumDescriptorProto: MessageTypeDefinition + EnumOptions: MessageTypeDefinition + EnumValueDescriptorProto: MessageTypeDefinition + EnumValueOptions: MessageTypeDefinition + FieldDescriptorProto: MessageTypeDefinition + FieldOptions: MessageTypeDefinition + FileDescriptorProto: MessageTypeDefinition + FileDescriptorSet: MessageTypeDefinition + FileOptions: MessageTypeDefinition + FloatValue: MessageTypeDefinition + GeneratedCodeInfo: MessageTypeDefinition + Int32Value: MessageTypeDefinition + Int64Value: MessageTypeDefinition + ListValue: MessageTypeDefinition + MessageOptions: MessageTypeDefinition + MethodDescriptorProto: MessageTypeDefinition + MethodOptions: MessageTypeDefinition + NullValue: EnumTypeDefinition + OneofDescriptorProto: MessageTypeDefinition + OneofOptions: MessageTypeDefinition + ServiceDescriptorProto: MessageTypeDefinition + ServiceOptions: MessageTypeDefinition + SourceCodeInfo: MessageTypeDefinition + StringValue: MessageTypeDefinition + Struct: MessageTypeDefinition + Timestamp: MessageTypeDefinition + UInt32Value: MessageTypeDefinition + UInt64Value: MessageTypeDefinition + UninterpretedOption: MessageTypeDefinition + Value: MessageTypeDefinition + } + } + udpa: { + annotations: { + FieldMigrateAnnotation: MessageTypeDefinition + FileMigrateAnnotation: MessageTypeDefinition + MigrateAnnotation: MessageTypeDefinition + PackageVersionStatus: EnumTypeDefinition + StatusAnnotation: MessageTypeDefinition + } + } + validate: { + AnyRules: MessageTypeDefinition + BoolRules: MessageTypeDefinition + BytesRules: MessageTypeDefinition + DoubleRules: MessageTypeDefinition + DurationRules: MessageTypeDefinition + EnumRules: MessageTypeDefinition + FieldRules: MessageTypeDefinition + Fixed32Rules: MessageTypeDefinition + Fixed64Rules: MessageTypeDefinition + FloatRules: MessageTypeDefinition + Int32Rules: MessageTypeDefinition + Int64Rules: MessageTypeDefinition + KnownRegex: EnumTypeDefinition + MapRules: MessageTypeDefinition + MessageRules: MessageTypeDefinition + RepeatedRules: MessageTypeDefinition + SFixed32Rules: MessageTypeDefinition + SFixed64Rules: MessageTypeDefinition + SInt32Rules: MessageTypeDefinition + SInt64Rules: MessageTypeDefinition + StringRules: MessageTypeDefinition + TimestampRules: MessageTypeDefinition + UInt32Rules: MessageTypeDefinition + UInt64Rules: MessageTypeDefinition + } +} + diff --git a/packages/grpc-js/src/generated/envoy/api/v2/Cluster.ts b/packages/grpc-js/src/generated/envoy/api/v2/Cluster.ts new file mode 100644 index 000000000..4bda5ec6e --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/Cluster.ts @@ -0,0 +1,1679 @@ +// Original file: deps/envoy-api/envoy/api/v2/cluster.proto + +import { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from '../../../google/protobuf/Duration'; +import { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output as _google_protobuf_UInt32Value__Output } from '../../../google/protobuf/UInt32Value'; +import { Address as _envoy_api_v2_core_Address, Address__Output as _envoy_api_v2_core_Address__Output } from '../../../envoy/api/v2/core/Address'; +import { HealthCheck as _envoy_api_v2_core_HealthCheck, HealthCheck__Output as _envoy_api_v2_core_HealthCheck__Output } from '../../../envoy/api/v2/core/HealthCheck'; +import { CircuitBreakers as _envoy_api_v2_cluster_CircuitBreakers, CircuitBreakers__Output as _envoy_api_v2_cluster_CircuitBreakers__Output } from '../../../envoy/api/v2/cluster/CircuitBreakers'; +import { UpstreamTlsContext as _envoy_api_v2_auth_UpstreamTlsContext, UpstreamTlsContext__Output as _envoy_api_v2_auth_UpstreamTlsContext__Output } from '../../../envoy/api/v2/auth/UpstreamTlsContext'; +import { Http1ProtocolOptions as _envoy_api_v2_core_Http1ProtocolOptions, Http1ProtocolOptions__Output as _envoy_api_v2_core_Http1ProtocolOptions__Output } from '../../../envoy/api/v2/core/Http1ProtocolOptions'; +import { Http2ProtocolOptions as _envoy_api_v2_core_Http2ProtocolOptions, Http2ProtocolOptions__Output as _envoy_api_v2_core_Http2ProtocolOptions__Output } from '../../../envoy/api/v2/core/Http2ProtocolOptions'; +import { OutlierDetection as _envoy_api_v2_cluster_OutlierDetection, OutlierDetection__Output as _envoy_api_v2_cluster_OutlierDetection__Output } from '../../../envoy/api/v2/cluster/OutlierDetection'; +import { BindConfig as _envoy_api_v2_core_BindConfig, BindConfig__Output as _envoy_api_v2_core_BindConfig__Output } from '../../../envoy/api/v2/core/BindConfig'; +import { TransportSocket as _envoy_api_v2_core_TransportSocket, TransportSocket__Output as _envoy_api_v2_core_TransportSocket__Output } from '../../../envoy/api/v2/core/TransportSocket'; +import { Metadata as _envoy_api_v2_core_Metadata, Metadata__Output as _envoy_api_v2_core_Metadata__Output } from '../../../envoy/api/v2/core/Metadata'; +import { HttpProtocolOptions as _envoy_api_v2_core_HttpProtocolOptions, HttpProtocolOptions__Output as _envoy_api_v2_core_HttpProtocolOptions__Output } from '../../../envoy/api/v2/core/HttpProtocolOptions'; +import { UpstreamConnectionOptions as _envoy_api_v2_UpstreamConnectionOptions, UpstreamConnectionOptions__Output as _envoy_api_v2_UpstreamConnectionOptions__Output } from '../../../envoy/api/v2/UpstreamConnectionOptions'; +import { ClusterLoadAssignment as _envoy_api_v2_ClusterLoadAssignment, ClusterLoadAssignment__Output as _envoy_api_v2_ClusterLoadAssignment__Output } from '../../../envoy/api/v2/ClusterLoadAssignment'; +import { Struct as _google_protobuf_Struct, Struct__Output as _google_protobuf_Struct__Output } from '../../../google/protobuf/Struct'; +import { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../google/protobuf/Any'; +import { Filter as _envoy_api_v2_cluster_Filter, Filter__Output as _envoy_api_v2_cluster_Filter__Output } from '../../../envoy/api/v2/cluster/Filter'; +import { LoadBalancingPolicy as _envoy_api_v2_LoadBalancingPolicy, LoadBalancingPolicy__Output as _envoy_api_v2_LoadBalancingPolicy__Output } from '../../../envoy/api/v2/LoadBalancingPolicy'; +import { ConfigSource as _envoy_api_v2_core_ConfigSource, ConfigSource__Output as _envoy_api_v2_core_ConfigSource__Output } from '../../../envoy/api/v2/core/ConfigSource'; +import { UpstreamHttpProtocolOptions as _envoy_api_v2_core_UpstreamHttpProtocolOptions, UpstreamHttpProtocolOptions__Output as _envoy_api_v2_core_UpstreamHttpProtocolOptions__Output } from '../../../envoy/api/v2/core/UpstreamHttpProtocolOptions'; +import { UInt64Value as _google_protobuf_UInt64Value, UInt64Value__Output as _google_protobuf_UInt64Value__Output } from '../../../google/protobuf/UInt64Value'; +import { Percent as _envoy_type_Percent, Percent__Output as _envoy_type_Percent__Output } from '../../../envoy/type/Percent'; +import { Long } from '@grpc/proto-loader'; + +// Original file: deps/envoy-api/envoy/api/v2/cluster.proto + +export enum _envoy_api_v2_Cluster_ClusterProtocolSelection { + /** + * Cluster can only operate on one of the possible upstream protocols (HTTP1.1, HTTP2). + * If :ref:`http2_protocol_options ` are + * present, HTTP2 will be used, otherwise HTTP1.1 will be used. + */ + USE_CONFIGURED_PROTOCOL = 0, + /** + * Use HTTP1.1 or HTTP2, depending on which one is used on the downstream connection. + */ + USE_DOWNSTREAM_PROTOCOL = 1, +} + +/** + * Common configuration for all load balancer implementations. + * [#next-free-field: 8] + */ +export interface _envoy_api_v2_Cluster_CommonLbConfig { + /** + * Configures the :ref:`healthy panic threshold `. + * If not specified, the default is 50%. + * To disable panic mode, set to 0%. + * + * .. note:: + * The specified percent will be truncated to the nearest 1%. + */ + 'healthy_panic_threshold'?: (_envoy_type_Percent); + 'zone_aware_lb_config'?: (_envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig); + 'locality_weighted_lb_config'?: (_envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig); + /** + * If set, all health check/weight/metadata updates that happen within this duration will be + * merged and delivered in one shot when the duration expires. The start of the duration is when + * the first update happens. This is useful for big clusters, with potentially noisy deploys + * that might trigger excessive CPU usage due to a constant stream of healthcheck state changes + * or metadata updates. The first set of updates to be seen apply immediately (e.g.: a new + * cluster). Please always keep in mind that the use of sandbox technologies may change this + * behavior. + * + * If this is not set, we default to a merge window of 1000ms. To disable it, set the merge + * window to 0. + * + * Note: merging does not apply to cluster membership changes (e.g.: adds/removes); this is + * because merging those updates isn't currently safe. See + * https://github.com/envoyproxy/envoy/pull/3941. + */ + 'update_merge_window'?: (_google_protobuf_Duration); + /** + * If set to true, Envoy will not consider new hosts when computing load balancing weights until + * they have been health checked for the first time. This will have no effect unless + * active health checking is also configured. + * + * Ignoring a host means that for any load balancing calculations that adjust weights based + * on the ratio of eligible hosts and total hosts (priority spillover, locality weighting and + * panic mode) Envoy will exclude these hosts in the denominator. + * + * For example, with hosts in two priorities P0 and P1, where P0 looks like + * {healthy, unhealthy (new), unhealthy (new)} + * and where P1 looks like + * {healthy, healthy} + * all traffic will still hit P0, as 1 / (3 - 2) = 1. + * + * Enabling this will allow scaling up the number of hosts for a given cluster without entering + * panic mode or triggering priority spillover, assuming the hosts pass the first health check. + * + * If panic mode is triggered, new hosts are still eligible for traffic; they simply do not + * contribute to the calculation when deciding whether panic mode is enabled or not. + */ + 'ignore_new_hosts_until_first_hc'?: (boolean); + /** + * If set to `true`, the cluster manager will drain all existing + * connections to upstream hosts whenever hosts are added or removed from the cluster. + */ + 'close_connections_on_host_set_change'?: (boolean); + /** + * Common Configuration for all consistent hashing load balancers (MaglevLb, RingHashLb, etc.) + */ + 'consistent_hashing_lb_config'?: (_envoy_api_v2_Cluster_CommonLbConfig_ConsistentHashingLbConfig); + 'locality_config_specifier'?: "zone_aware_lb_config"|"locality_weighted_lb_config"; +} + +/** + * Common configuration for all load balancer implementations. + * [#next-free-field: 8] + */ +export interface _envoy_api_v2_Cluster_CommonLbConfig__Output { + /** + * Configures the :ref:`healthy panic threshold `. + * If not specified, the default is 50%. + * To disable panic mode, set to 0%. + * + * .. note:: + * The specified percent will be truncated to the nearest 1%. + */ + 'healthy_panic_threshold'?: (_envoy_type_Percent__Output); + 'zone_aware_lb_config'?: (_envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig__Output); + 'locality_weighted_lb_config'?: (_envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig__Output); + /** + * If set, all health check/weight/metadata updates that happen within this duration will be + * merged and delivered in one shot when the duration expires. The start of the duration is when + * the first update happens. This is useful for big clusters, with potentially noisy deploys + * that might trigger excessive CPU usage due to a constant stream of healthcheck state changes + * or metadata updates. The first set of updates to be seen apply immediately (e.g.: a new + * cluster). Please always keep in mind that the use of sandbox technologies may change this + * behavior. + * + * If this is not set, we default to a merge window of 1000ms. To disable it, set the merge + * window to 0. + * + * Note: merging does not apply to cluster membership changes (e.g.: adds/removes); this is + * because merging those updates isn't currently safe. See + * https://github.com/envoyproxy/envoy/pull/3941. + */ + 'update_merge_window'?: (_google_protobuf_Duration__Output); + /** + * If set to true, Envoy will not consider new hosts when computing load balancing weights until + * they have been health checked for the first time. This will have no effect unless + * active health checking is also configured. + * + * Ignoring a host means that for any load balancing calculations that adjust weights based + * on the ratio of eligible hosts and total hosts (priority spillover, locality weighting and + * panic mode) Envoy will exclude these hosts in the denominator. + * + * For example, with hosts in two priorities P0 and P1, where P0 looks like + * {healthy, unhealthy (new), unhealthy (new)} + * and where P1 looks like + * {healthy, healthy} + * all traffic will still hit P0, as 1 / (3 - 2) = 1. + * + * Enabling this will allow scaling up the number of hosts for a given cluster without entering + * panic mode or triggering priority spillover, assuming the hosts pass the first health check. + * + * If panic mode is triggered, new hosts are still eligible for traffic; they simply do not + * contribute to the calculation when deciding whether panic mode is enabled or not. + */ + 'ignore_new_hosts_until_first_hc': (boolean); + /** + * If set to `true`, the cluster manager will drain all existing + * connections to upstream hosts whenever hosts are added or removed from the cluster. + */ + 'close_connections_on_host_set_change': (boolean); + /** + * Common Configuration for all consistent hashing load balancers (MaglevLb, RingHashLb, etc.) + */ + 'consistent_hashing_lb_config'?: (_envoy_api_v2_Cluster_CommonLbConfig_ConsistentHashingLbConfig__Output); + 'locality_config_specifier': "zone_aware_lb_config"|"locality_weighted_lb_config"; +} + +/** + * Common Configuration for all consistent hashing load balancers (MaglevLb, RingHashLb, etc.) + */ +export interface _envoy_api_v2_Cluster_CommonLbConfig_ConsistentHashingLbConfig { + /** + * If set to `true`, the cluster will use hostname instead of the resolved + * address as the key to consistently hash to an upstream host. Only valid for StrictDNS clusters with hostnames which resolve to a single IP address. + */ + 'use_hostname_for_hashing'?: (boolean); +} + +/** + * Common Configuration for all consistent hashing load balancers (MaglevLb, RingHashLb, etc.) + */ +export interface _envoy_api_v2_Cluster_CommonLbConfig_ConsistentHashingLbConfig__Output { + /** + * If set to `true`, the cluster will use hostname instead of the resolved + * address as the key to consistently hash to an upstream host. Only valid for StrictDNS clusters with hostnames which resolve to a single IP address. + */ + 'use_hostname_for_hashing': (boolean); +} + +/** + * Extended cluster type. + */ +export interface _envoy_api_v2_Cluster_CustomClusterType { + /** + * The type of the cluster to instantiate. The name must match a supported cluster type. + */ + 'name'?: (string); + /** + * Cluster specific configuration which depends on the cluster being instantiated. + * See the supported cluster for further documentation. + */ + 'typed_config'?: (_google_protobuf_Any); +} + +/** + * Extended cluster type. + */ +export interface _envoy_api_v2_Cluster_CustomClusterType__Output { + /** + * The type of the cluster to instantiate. The name must match a supported cluster type. + */ + 'name': (string); + /** + * Cluster specific configuration which depends on the cluster being instantiated. + * See the supported cluster for further documentation. + */ + 'typed_config'?: (_google_protobuf_Any__Output); +} + +// Original file: deps/envoy-api/envoy/api/v2/cluster.proto + +/** + * Refer to :ref:`service discovery type ` + * for an explanation on each type. + */ +export enum _envoy_api_v2_Cluster_DiscoveryType { + /** + * Refer to the :ref:`static discovery type` + * for an explanation. + */ + STATIC = 0, + /** + * Refer to the :ref:`strict DNS discovery + * type` + * for an explanation. + */ + STRICT_DNS = 1, + /** + * Refer to the :ref:`logical DNS discovery + * type` + * for an explanation. + */ + LOGICAL_DNS = 2, + /** + * Refer to the :ref:`service discovery type` + * for an explanation. + */ + EDS = 3, + /** + * Refer to the :ref:`original destination discovery + * type` + * for an explanation. + */ + ORIGINAL_DST = 4, +} + +// Original file: deps/envoy-api/envoy/api/v2/cluster.proto + +/** + * When V4_ONLY is selected, the DNS resolver will only perform a lookup for + * addresses in the IPv4 family. If V6_ONLY is selected, the DNS resolver will + * only perform a lookup for addresses in the IPv6 family. If AUTO is + * specified, the DNS resolver will first perform a lookup for addresses in + * the IPv6 family and fallback to a lookup for addresses in the IPv4 family. + * For cluster types other than + * :ref:`STRICT_DNS` and + * :ref:`LOGICAL_DNS`, + * this setting is + * ignored. + */ +export enum _envoy_api_v2_Cluster_DnsLookupFamily { + AUTO = 0, + V4_ONLY = 1, + V6_ONLY = 2, +} + +/** + * Only valid when discovery type is EDS. + */ +export interface _envoy_api_v2_Cluster_EdsClusterConfig { + /** + * Configuration for the source of EDS updates for this Cluster. + */ + 'eds_config'?: (_envoy_api_v2_core_ConfigSource); + /** + * Optional alternative to cluster name to present to EDS. This does not + * have the same restrictions as cluster name, i.e. it may be arbitrary + * length. + */ + 'service_name'?: (string); +} + +/** + * Only valid when discovery type is EDS. + */ +export interface _envoy_api_v2_Cluster_EdsClusterConfig__Output { + /** + * Configuration for the source of EDS updates for this Cluster. + */ + 'eds_config'?: (_envoy_api_v2_core_ConfigSource__Output); + /** + * Optional alternative to cluster name to present to EDS. This does not + * have the same restrictions as cluster name, i.e. it may be arbitrary + * length. + */ + 'service_name': (string); +} + +// Original file: deps/envoy-api/envoy/api/v2/cluster.proto + +/** + * The hash function used to hash hosts onto the ketama ring. + */ +export enum _envoy_api_v2_Cluster_RingHashLbConfig_HashFunction { + /** + * Use `xxHash `_, this is the default hash function. + */ + XX_HASH = 0, + /** + * Use `MurmurHash2 `_, this is compatible with + * std:hash in GNU libstdc++ 3.4.20 or above. This is typically the case when compiled + * on Linux and not macOS. + */ + MURMUR_HASH_2 = 1, +} + +// Original file: deps/envoy-api/envoy/api/v2/cluster.proto + +/** + * Refer to :ref:`load balancer type ` architecture + * overview section for information on each type. + */ +export enum _envoy_api_v2_Cluster_LbPolicy { + /** + * Refer to the :ref:`round robin load balancing + * policy` + * for an explanation. + */ + ROUND_ROBIN = 0, + /** + * Refer to the :ref:`least request load balancing + * policy` + * for an explanation. + */ + LEAST_REQUEST = 1, + /** + * Refer to the :ref:`ring hash load balancing + * policy` + * for an explanation. + */ + RING_HASH = 2, + /** + * Refer to the :ref:`random load balancing + * policy` + * for an explanation. + */ + RANDOM = 3, + /** + * Refer to the :ref:`original destination load balancing + * policy` + * for an explanation. + * + * .. attention:: + * + * **This load balancing policy is deprecated**. Use CLUSTER_PROVIDED instead. + */ + ORIGINAL_DST_LB = 4, + /** + * Refer to the :ref:`Maglev load balancing policy` + * for an explanation. + */ + MAGLEV = 5, + /** + * This load balancer type must be specified if the configured cluster provides a cluster + * specific load balancer. Consult the configured cluster's documentation for whether to set + * this option or not. + */ + CLUSTER_PROVIDED = 6, + /** + * [#not-implemented-hide:] Use the new :ref:`load_balancing_policy + * ` field to determine the LB policy. + * [#next-major-version: In the v3 API, we should consider deprecating the lb_policy field + * and instead using the new load_balancing_policy field as the one and only mechanism for + * configuring this.] + */ + LOAD_BALANCING_POLICY_CONFIG = 7, +} + +/** + * Optionally divide the endpoints in this cluster into subsets defined by + * endpoint metadata and selected by route and weighted cluster metadata. + * [#next-free-field: 8] + */ +export interface _envoy_api_v2_Cluster_LbSubsetConfig { + /** + * The behavior used when no endpoint subset matches the selected route's + * metadata. The value defaults to + * :ref:`NO_FALLBACK`. + */ + 'fallback_policy'?: (_envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetFallbackPolicy | keyof typeof _envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetFallbackPolicy); + /** + * Specifies the default subset of endpoints used during fallback if + * fallback_policy is + * :ref:`DEFAULT_SUBSET`. + * Each field in default_subset is + * compared to the matching LbEndpoint.Metadata under the *envoy.lb* + * namespace. It is valid for no hosts to match, in which case the behavior + * is the same as a fallback_policy of + * :ref:`NO_FALLBACK`. + */ + 'default_subset'?: (_google_protobuf_Struct); + /** + * For each entry, LbEndpoint.Metadata's + * *envoy.lb* namespace is traversed and a subset is created for each unique + * combination of key and value. For example: + * + * .. code-block:: json + * + * { "subset_selectors": [ + * { "keys": [ "version" ] }, + * { "keys": [ "stage", "hardware_type" ] } + * ]} + * + * A subset is matched when the metadata from the selected route and + * weighted cluster contains the same keys and values as the subset's + * metadata. The same host may appear in multiple subsets. + */ + 'subset_selectors'?: (_envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector)[]; + /** + * If true, routing to subsets will take into account the localities and locality weights of the + * endpoints when making the routing decision. + * + * There are some potential pitfalls associated with enabling this feature, as the resulting + * traffic split after applying both a subset match and locality weights might be undesirable. + * + * Consider for example a situation in which you have 50/50 split across two localities X/Y + * which have 100 hosts each without subsetting. If the subset LB results in X having only 1 + * host selected but Y having 100, then a lot more load is being dumped on the single host in X + * than originally anticipated in the load balancing assignment delivered via EDS. + */ + 'locality_weight_aware'?: (boolean); + /** + * When used with locality_weight_aware, scales the weight of each locality by the ratio + * of hosts in the subset vs hosts in the original subset. This aims to even out the load + * going to an individual locality if said locality is disproportionately affected by the + * subset predicate. + */ + 'scale_locality_weight'?: (boolean); + /** + * If true, when a fallback policy is configured and its corresponding subset fails to find + * a host this will cause any host to be selected instead. + * + * This is useful when using the default subset as the fallback policy, given the default + * subset might become empty. With this option enabled, if that happens the LB will attempt + * to select a host from the entire cluster. + */ + 'panic_mode_any'?: (boolean); + /** + * If true, metadata specified for a metadata key will be matched against the corresponding + * endpoint metadata if the endpoint metadata matches the value exactly OR it is a list value + * and any of the elements in the list matches the criteria. + */ + 'list_as_any'?: (boolean); +} + +/** + * Optionally divide the endpoints in this cluster into subsets defined by + * endpoint metadata and selected by route and weighted cluster metadata. + * [#next-free-field: 8] + */ +export interface _envoy_api_v2_Cluster_LbSubsetConfig__Output { + /** + * The behavior used when no endpoint subset matches the selected route's + * metadata. The value defaults to + * :ref:`NO_FALLBACK`. + */ + 'fallback_policy': (keyof typeof _envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetFallbackPolicy); + /** + * Specifies the default subset of endpoints used during fallback if + * fallback_policy is + * :ref:`DEFAULT_SUBSET`. + * Each field in default_subset is + * compared to the matching LbEndpoint.Metadata under the *envoy.lb* + * namespace. It is valid for no hosts to match, in which case the behavior + * is the same as a fallback_policy of + * :ref:`NO_FALLBACK`. + */ + 'default_subset'?: (_google_protobuf_Struct__Output); + /** + * For each entry, LbEndpoint.Metadata's + * *envoy.lb* namespace is traversed and a subset is created for each unique + * combination of key and value. For example: + * + * .. code-block:: json + * + * { "subset_selectors": [ + * { "keys": [ "version" ] }, + * { "keys": [ "stage", "hardware_type" ] } + * ]} + * + * A subset is matched when the metadata from the selected route and + * weighted cluster contains the same keys and values as the subset's + * metadata. The same host may appear in multiple subsets. + */ + 'subset_selectors': (_envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector__Output)[]; + /** + * If true, routing to subsets will take into account the localities and locality weights of the + * endpoints when making the routing decision. + * + * There are some potential pitfalls associated with enabling this feature, as the resulting + * traffic split after applying both a subset match and locality weights might be undesirable. + * + * Consider for example a situation in which you have 50/50 split across two localities X/Y + * which have 100 hosts each without subsetting. If the subset LB results in X having only 1 + * host selected but Y having 100, then a lot more load is being dumped on the single host in X + * than originally anticipated in the load balancing assignment delivered via EDS. + */ + 'locality_weight_aware': (boolean); + /** + * When used with locality_weight_aware, scales the weight of each locality by the ratio + * of hosts in the subset vs hosts in the original subset. This aims to even out the load + * going to an individual locality if said locality is disproportionately affected by the + * subset predicate. + */ + 'scale_locality_weight': (boolean); + /** + * If true, when a fallback policy is configured and its corresponding subset fails to find + * a host this will cause any host to be selected instead. + * + * This is useful when using the default subset as the fallback policy, given the default + * subset might become empty. With this option enabled, if that happens the LB will attempt + * to select a host from the entire cluster. + */ + 'panic_mode_any': (boolean); + /** + * If true, metadata specified for a metadata key will be matched against the corresponding + * endpoint metadata if the endpoint metadata matches the value exactly OR it is a list value + * and any of the elements in the list matches the criteria. + */ + 'list_as_any': (boolean); +} + +// Original file: deps/envoy-api/envoy/api/v2/cluster.proto + +/** + * If NO_FALLBACK is selected, a result + * equivalent to no healthy hosts is reported. If ANY_ENDPOINT is selected, + * any cluster endpoint may be returned (subject to policy, health checks, + * etc). If DEFAULT_SUBSET is selected, load balancing is performed over the + * endpoints matching the values from the default_subset field. + */ +export enum _envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetFallbackPolicy { + NO_FALLBACK = 0, + ANY_ENDPOINT = 1, + DEFAULT_SUBSET = 2, +} + +/** + * Specifications for subsets. + */ +export interface _envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector { + /** + * List of keys to match with the weighted cluster metadata. + */ + 'keys'?: (string)[]; + /** + * The behavior used when no endpoint subset matches the selected route's + * metadata. + */ + 'fallback_policy'?: (_envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy | keyof typeof _envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy); + /** + * Subset of + * :ref:`keys` used by + * :ref:`KEYS_SUBSET` + * fallback policy. + * It has to be a non empty list if KEYS_SUBSET fallback policy is selected. + * For any other fallback policy the parameter is not used and should not be set. + * Only values also present in + * :ref:`keys` are allowed, but + * `fallback_keys_subset` cannot be equal to `keys`. + */ + 'fallback_keys_subset'?: (string)[]; +} + +/** + * Specifications for subsets. + */ +export interface _envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector__Output { + /** + * List of keys to match with the weighted cluster metadata. + */ + 'keys': (string)[]; + /** + * The behavior used when no endpoint subset matches the selected route's + * metadata. + */ + 'fallback_policy': (keyof typeof _envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy); + /** + * Subset of + * :ref:`keys` used by + * :ref:`KEYS_SUBSET` + * fallback policy. + * It has to be a non empty list if KEYS_SUBSET fallback policy is selected. + * For any other fallback policy the parameter is not used and should not be set. + * Only values also present in + * :ref:`keys` are allowed, but + * `fallback_keys_subset` cannot be equal to `keys`. + */ + 'fallback_keys_subset': (string)[]; +} + +// Original file: deps/envoy-api/envoy/api/v2/cluster.proto + +/** + * Allows to override top level fallback policy per selector. + */ +export enum _envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy { + /** + * If NOT_DEFINED top level config fallback policy is used instead. + */ + NOT_DEFINED = 0, + /** + * If NO_FALLBACK is selected, a result equivalent to no healthy hosts is reported. + */ + NO_FALLBACK = 1, + /** + * If ANY_ENDPOINT is selected, any cluster endpoint may be returned + * (subject to policy, health checks, etc). + */ + ANY_ENDPOINT = 2, + /** + * If DEFAULT_SUBSET is selected, load balancing is performed over the + * endpoints matching the values from the default_subset field. + */ + DEFAULT_SUBSET = 3, + /** + * If KEYS_SUBSET is selected, subset selector matching is performed again with metadata + * keys reduced to + * :ref:`fallback_keys_subset`. + * It allows for a fallback to a different, less specific selector if some of the keys of + * the selector are considered optional. + */ + KEYS_SUBSET = 4, +} + +/** + * Specific configuration for the LeastRequest load balancing policy. + */ +export interface _envoy_api_v2_Cluster_LeastRequestLbConfig { + /** + * The number of random healthy hosts from which the host with the fewest active requests will + * be chosen. Defaults to 2 so that we perform two-choice selection if the field is not set. + */ + 'choice_count'?: (_google_protobuf_UInt32Value); +} + +/** + * Specific configuration for the LeastRequest load balancing policy. + */ +export interface _envoy_api_v2_Cluster_LeastRequestLbConfig__Output { + /** + * The number of random healthy hosts from which the host with the fewest active requests will + * be chosen. Defaults to 2 so that we perform two-choice selection if the field is not set. + */ + 'choice_count'?: (_google_protobuf_UInt32Value__Output); +} + +/** + * Configuration for :ref:`locality weighted load balancing + * ` + */ +export interface _envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig { +} + +/** + * Configuration for :ref:`locality weighted load balancing + * ` + */ +export interface _envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig__Output { +} + +/** + * Specific configuration for the + * :ref:`Original Destination ` + * load balancing policy. + */ +export interface _envoy_api_v2_Cluster_OriginalDstLbConfig { + /** + * When true, :ref:`x-envoy-original-dst-host + * ` can be used to override destination + * address. + * + * .. attention:: + * + * This header isn't sanitized by default, so enabling this feature allows HTTP clients to + * route traffic to arbitrary hosts and/or ports, which may have serious security + * consequences. + */ + 'use_http_header'?: (boolean); +} + +/** + * Specific configuration for the + * :ref:`Original Destination ` + * load balancing policy. + */ +export interface _envoy_api_v2_Cluster_OriginalDstLbConfig__Output { + /** + * When true, :ref:`x-envoy-original-dst-host + * ` can be used to override destination + * address. + * + * .. attention:: + * + * This header isn't sanitized by default, so enabling this feature allows HTTP clients to + * route traffic to arbitrary hosts and/or ports, which may have serious security + * consequences. + */ + 'use_http_header': (boolean); +} + +export interface _envoy_api_v2_Cluster_RefreshRate { + /** + * Specifies the base interval between refreshes. This parameter is required and must be greater + * than zero and less than + * :ref:`max_interval `. + */ + 'base_interval'?: (_google_protobuf_Duration); + /** + * Specifies the maximum interval between refreshes. This parameter is optional, but must be + * greater than or equal to the + * :ref:`base_interval ` if set. The default + * is 10 times the :ref:`base_interval `. + */ + 'max_interval'?: (_google_protobuf_Duration); +} + +export interface _envoy_api_v2_Cluster_RefreshRate__Output { + /** + * Specifies the base interval between refreshes. This parameter is required and must be greater + * than zero and less than + * :ref:`max_interval `. + */ + 'base_interval'?: (_google_protobuf_Duration__Output); + /** + * Specifies the maximum interval between refreshes. This parameter is optional, but must be + * greater than or equal to the + * :ref:`base_interval ` if set. The default + * is 10 times the :ref:`base_interval `. + */ + 'max_interval'?: (_google_protobuf_Duration__Output); +} + +/** + * Specific configuration for the :ref:`RingHash` + * load balancing policy. + */ +export interface _envoy_api_v2_Cluster_RingHashLbConfig { + /** + * Minimum hash ring size. The larger the ring is (that is, the more hashes there are for each + * provided host) the better the request distribution will reflect the desired weights. Defaults + * to 1024 entries, and limited to 8M entries. See also + * :ref:`maximum_ring_size`. + */ + 'minimum_ring_size'?: (_google_protobuf_UInt64Value); + /** + * The hash function used to hash hosts onto the ketama ring. The value defaults to + * :ref:`XX_HASH`. + */ + 'hash_function'?: (_envoy_api_v2_Cluster_RingHashLbConfig_HashFunction | keyof typeof _envoy_api_v2_Cluster_RingHashLbConfig_HashFunction); + /** + * Maximum hash ring size. Defaults to 8M entries, and limited to 8M entries, but can be lowered + * to further constrain resource use. See also + * :ref:`minimum_ring_size`. + */ + 'maximum_ring_size'?: (_google_protobuf_UInt64Value); +} + +/** + * Specific configuration for the :ref:`RingHash` + * load balancing policy. + */ +export interface _envoy_api_v2_Cluster_RingHashLbConfig__Output { + /** + * Minimum hash ring size. The larger the ring is (that is, the more hashes there are for each + * provided host) the better the request distribution will reflect the desired weights. Defaults + * to 1024 entries, and limited to 8M entries. See also + * :ref:`maximum_ring_size`. + */ + 'minimum_ring_size'?: (_google_protobuf_UInt64Value__Output); + /** + * The hash function used to hash hosts onto the ketama ring. The value defaults to + * :ref:`XX_HASH`. + */ + 'hash_function': (keyof typeof _envoy_api_v2_Cluster_RingHashLbConfig_HashFunction); + /** + * Maximum hash ring size. Defaults to 8M entries, and limited to 8M entries, but can be lowered + * to further constrain resource use. See also + * :ref:`minimum_ring_size`. + */ + 'maximum_ring_size'?: (_google_protobuf_UInt64Value__Output); +} + +/** + * TransportSocketMatch specifies what transport socket config will be used + * when the match conditions are satisfied. + */ +export interface _envoy_api_v2_Cluster_TransportSocketMatch { + /** + * The name of the match, used in stats generation. + */ + 'name'?: (string); + /** + * Optional endpoint metadata match criteria. + * The connection to the endpoint with metadata matching what is set in this field + * will use the transport socket configuration specified here. + * The endpoint's metadata entry in *envoy.transport_socket_match* is used to match + * against the values specified in this field. + */ + 'match'?: (_google_protobuf_Struct); + /** + * The configuration of the transport socket. + */ + 'transport_socket'?: (_envoy_api_v2_core_TransportSocket); +} + +/** + * TransportSocketMatch specifies what transport socket config will be used + * when the match conditions are satisfied. + */ +export interface _envoy_api_v2_Cluster_TransportSocketMatch__Output { + /** + * The name of the match, used in stats generation. + */ + 'name': (string); + /** + * Optional endpoint metadata match criteria. + * The connection to the endpoint with metadata matching what is set in this field + * will use the transport socket configuration specified here. + * The endpoint's metadata entry in *envoy.transport_socket_match* is used to match + * against the values specified in this field. + */ + 'match'?: (_google_protobuf_Struct__Output); + /** + * The configuration of the transport socket. + */ + 'transport_socket'?: (_envoy_api_v2_core_TransportSocket__Output); +} + +/** + * Configuration for :ref:`zone aware routing + * `. + */ +export interface _envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig { + /** + * Configures percentage of requests that will be considered for zone aware routing + * if zone aware routing is configured. If not specified, the default is 100%. + * * :ref:`runtime values `. + * * :ref:`Zone aware routing support `. + */ + 'routing_enabled'?: (_envoy_type_Percent); + /** + * Configures minimum upstream cluster size required for zone aware routing + * If upstream cluster size is less than specified, zone aware routing is not performed + * even if zone aware routing is configured. If not specified, the default is 6. + * * :ref:`runtime values `. + * * :ref:`Zone aware routing support `. + */ + 'min_cluster_size'?: (_google_protobuf_UInt64Value); + /** + * If set to true, Envoy will not consider any hosts when the cluster is in :ref:`panic + * mode`. Instead, the cluster will fail all + * requests as if all hosts are unhealthy. This can help avoid potentially overwhelming a + * failing service. + */ + 'fail_traffic_on_panic'?: (boolean); +} + +/** + * Configuration for :ref:`zone aware routing + * `. + */ +export interface _envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig__Output { + /** + * Configures percentage of requests that will be considered for zone aware routing + * if zone aware routing is configured. If not specified, the default is 100%. + * * :ref:`runtime values `. + * * :ref:`Zone aware routing support `. + */ + 'routing_enabled'?: (_envoy_type_Percent__Output); + /** + * Configures minimum upstream cluster size required for zone aware routing + * If upstream cluster size is less than specified, zone aware routing is not performed + * even if zone aware routing is configured. If not specified, the default is 6. + * * :ref:`runtime values `. + * * :ref:`Zone aware routing support `. + */ + 'min_cluster_size'?: (_google_protobuf_UInt64Value__Output); + /** + * If set to true, Envoy will not consider any hosts when the cluster is in :ref:`panic + * mode`. Instead, the cluster will fail all + * requests as if all hosts are unhealthy. This can help avoid potentially overwhelming a + * failing service. + */ + 'fail_traffic_on_panic': (boolean); +} + +/** + * Configuration for a single upstream cluster. + * [#next-free-field: 48] + */ +export interface Cluster { + /** + * Supplies the name of the cluster which must be unique across all clusters. + * The cluster name is used when emitting + * :ref:`statistics ` if :ref:`alt_stat_name + * ` is not provided. + * Any ``:`` in the cluster name will be converted to ``_`` when emitting statistics. + */ + 'name'?: (string); + /** + * The :ref:`service discovery type ` + * to use for resolving the cluster. + */ + 'type'?: (_envoy_api_v2_Cluster_DiscoveryType | keyof typeof _envoy_api_v2_Cluster_DiscoveryType); + /** + * Configuration to use for EDS updates for the Cluster. + */ + 'eds_cluster_config'?: (_envoy_api_v2_Cluster_EdsClusterConfig); + /** + * The timeout for new network connections to hosts in the cluster. + */ + 'connect_timeout'?: (_google_protobuf_Duration); + /** + * Soft limit on size of the cluster’s connections read and write buffers. If + * unspecified, an implementation defined default is applied (1MiB). + */ + 'per_connection_buffer_limit_bytes'?: (_google_protobuf_UInt32Value); + /** + * The :ref:`load balancer type ` to use + * when picking a host in the cluster. + */ + 'lb_policy'?: (_envoy_api_v2_Cluster_LbPolicy | keyof typeof _envoy_api_v2_Cluster_LbPolicy); + /** + * If the service discovery type is + * :ref:`STATIC`, + * :ref:`STRICT_DNS` + * or :ref:`LOGICAL_DNS`, + * then hosts is required. + * + * .. attention:: + * + * **This field is deprecated**. Set the + * :ref:`load_assignment` field instead. + */ + 'hosts'?: (_envoy_api_v2_core_Address)[]; + /** + * Optional :ref:`active health checking ` + * configuration for the cluster. If no + * configuration is specified no health checking will be done and all cluster + * members will be considered healthy at all times. + */ + 'health_checks'?: (_envoy_api_v2_core_HealthCheck)[]; + /** + * Optional maximum requests for a single upstream connection. This parameter + * is respected by both the HTTP/1.1 and HTTP/2 connection pool + * implementations. If not specified, there is no limit. Setting this + * parameter to 1 will effectively disable keep alive. + */ + 'max_requests_per_connection'?: (_google_protobuf_UInt32Value); + /** + * Optional :ref:`circuit breaking ` for the cluster. + */ + 'circuit_breakers'?: (_envoy_api_v2_cluster_CircuitBreakers); + /** + * The TLS configuration for connections to the upstream cluster. + * + * .. attention:: + * + * **This field is deprecated**. Use `transport_socket` with name `tls` instead. If both are + * set, `transport_socket` takes priority. + */ + 'tls_context'?: (_envoy_api_v2_auth_UpstreamTlsContext); + /** + * Additional options when handling HTTP1 requests. + */ + 'http_protocol_options'?: (_envoy_api_v2_core_Http1ProtocolOptions); + /** + * Even if default HTTP2 protocol options are desired, this field must be + * set so that Envoy will assume that the upstream supports HTTP/2 when + * making new HTTP connection pool connections. Currently, Envoy only + * supports prior knowledge for upstream connections. Even if TLS is used + * with ALPN, `http2_protocol_options` must be specified. As an aside this allows HTTP/2 + * connections to happen over plain text. + */ + 'http2_protocol_options'?: (_envoy_api_v2_core_Http2ProtocolOptions); + /** + * If the DNS refresh rate is specified and the cluster type is either + * :ref:`STRICT_DNS`, + * or :ref:`LOGICAL_DNS`, + * this value is used as the cluster’s DNS refresh + * rate. The value configured must be at least 1ms. If this setting is not specified, the + * value defaults to 5000ms. For cluster types other than + * :ref:`STRICT_DNS` + * and :ref:`LOGICAL_DNS` + * this setting is ignored. + */ + 'dns_refresh_rate'?: (_google_protobuf_Duration); + /** + * The DNS IP address resolution policy. If this setting is not specified, the + * value defaults to + * :ref:`AUTO`. + */ + 'dns_lookup_family'?: (_envoy_api_v2_Cluster_DnsLookupFamily | keyof typeof _envoy_api_v2_Cluster_DnsLookupFamily); + /** + * If DNS resolvers are specified and the cluster type is either + * :ref:`STRICT_DNS`, + * or :ref:`LOGICAL_DNS`, + * this value is used to specify the cluster’s dns resolvers. + * If this setting is not specified, the value defaults to the default + * resolver, which uses /etc/resolv.conf for configuration. For cluster types + * other than + * :ref:`STRICT_DNS` + * and :ref:`LOGICAL_DNS` + * this setting is ignored. + */ + 'dns_resolvers'?: (_envoy_api_v2_core_Address)[]; + /** + * If specified, outlier detection will be enabled for this upstream cluster. + * Each of the configuration values can be overridden via + * :ref:`runtime values `. + */ + 'outlier_detection'?: (_envoy_api_v2_cluster_OutlierDetection); + /** + * The interval for removing stale hosts from a cluster type + * :ref:`ORIGINAL_DST`. + * Hosts are considered stale if they have not been used + * as upstream destinations during this interval. New hosts are added + * to original destination clusters on demand as new connections are + * redirected to Envoy, causing the number of hosts in the cluster to + * grow over time. Hosts that are not stale (they are actively used as + * destinations) are kept in the cluster, which allows connections to + * them remain open, saving the latency that would otherwise be spent + * on opening new connections. If this setting is not specified, the + * value defaults to 5000ms. For cluster types other than + * :ref:`ORIGINAL_DST` + * this setting is ignored. + */ + 'cleanup_interval'?: (_google_protobuf_Duration); + /** + * Optional configuration used to bind newly established upstream connections. + * This overrides any bind_config specified in the bootstrap proto. + * If the address and port are empty, no bind will be performed. + */ + 'upstream_bind_config'?: (_envoy_api_v2_core_BindConfig); + /** + * Configuration for load balancing subsetting. + */ + 'lb_subset_config'?: (_envoy_api_v2_Cluster_LbSubsetConfig); + /** + * Optional configuration for the Ring Hash load balancing policy. + */ + 'ring_hash_lb_config'?: (_envoy_api_v2_Cluster_RingHashLbConfig); + /** + * Optional custom transport socket implementation to use for upstream connections. + * To setup TLS, set a transport socket with name `tls` and + * :ref:`UpstreamTlsContexts ` in the `typed_config`. + * If no transport socket configuration is specified, new connections + * will be set up with plaintext. + */ + 'transport_socket'?: (_envoy_api_v2_core_TransportSocket); + /** + * The Metadata field can be used to provide additional information about the + * cluster. It can be used for stats, logging, and varying filter behavior. + * Fields should use reverse DNS notation to denote which entity within Envoy + * will need the information. For instance, if the metadata is intended for + * the Router filter, the filter name should be specified as *envoy.filters.http.router*. + */ + 'metadata'?: (_envoy_api_v2_core_Metadata); + /** + * Determines how Envoy selects the protocol used to speak to upstream hosts. + */ + 'protocol_selection'?: (_envoy_api_v2_Cluster_ClusterProtocolSelection | keyof typeof _envoy_api_v2_Cluster_ClusterProtocolSelection); + /** + * Common configuration for all load balancer implementations. + */ + 'common_lb_config'?: (_envoy_api_v2_Cluster_CommonLbConfig); + /** + * An optional alternative to the cluster name to be used while emitting stats. + * Any ``:`` in the name will be converted to ``_`` when emitting statistics. This should not be + * confused with :ref:`Router Filter Header + * `. + */ + 'alt_stat_name'?: (string); + /** + * Additional options when handling HTTP requests upstream. These options will be applicable to + * both HTTP1 and HTTP2 requests. + */ + 'common_http_protocol_options'?: (_envoy_api_v2_core_HttpProtocolOptions); + /** + * Optional options for upstream connections. + */ + 'upstream_connection_options'?: (_envoy_api_v2_UpstreamConnectionOptions); + /** + * If an upstream host becomes unhealthy (as determined by the configured health checks + * or outlier detection), immediately close all connections to the failed host. + * + * .. note:: + * + * This is currently only supported for connections created by tcp_proxy. + * + * .. note:: + * + * The current implementation of this feature closes all connections immediately when + * the unhealthy status is detected. If there are a large number of connections open + * to an upstream host that becomes unhealthy, Envoy may spend a substantial amount of + * time exclusively closing these connections, and not processing any other traffic. + */ + 'close_connections_on_host_health_failure'?: (boolean); + /** + * If set to true, Envoy will ignore the health value of a host when processing its removal + * from service discovery. This means that if active health checking is used, Envoy will *not* + * wait for the endpoint to go unhealthy before removing it. + */ + 'drain_connections_on_host_removal'?: (boolean); + /** + * Setting this is required for specifying members of + * :ref:`STATIC`, + * :ref:`STRICT_DNS` + * or :ref:`LOGICAL_DNS` clusters. + * This field supersedes the *hosts* field in the v2 API. + * + * .. attention:: + * + * Setting this allows non-EDS cluster types to contain embedded EDS equivalent + * :ref:`endpoint assignments`. + */ + 'load_assignment'?: (_envoy_api_v2_ClusterLoadAssignment); + /** + * Optional configuration for the Original Destination load balancing policy. + */ + 'original_dst_lb_config'?: (_envoy_api_v2_Cluster_OriginalDstLbConfig); + /** + * The extension_protocol_options field is used to provide extension-specific protocol options + * for upstream connections. The key should match the extension filter name, such as + * "envoy.filters.network.thrift_proxy". See the extension's documentation for details on + * specific options. + */ + 'extension_protocol_options'?: ({[key: string]: _google_protobuf_Struct}); + /** + * The extension_protocol_options field is used to provide extension-specific protocol options + * for upstream connections. The key should match the extension filter name, such as + * "envoy.filters.network.thrift_proxy". See the extension's documentation for details on + * specific options. + */ + 'typed_extension_protocol_options'?: ({[key: string]: _google_protobuf_Any}); + /** + * Optional configuration for the LeastRequest load balancing policy. + */ + 'least_request_lb_config'?: (_envoy_api_v2_Cluster_LeastRequestLbConfig); + /** + * The custom cluster type. + */ + 'cluster_type'?: (_envoy_api_v2_Cluster_CustomClusterType); + /** + * Optional configuration for setting cluster's DNS refresh rate. If the value is set to true, + * cluster's DNS refresh rate will be set to resource record's TTL which comes from DNS + * resolution. + */ + 'respect_dns_ttl'?: (boolean); + /** + * An (optional) network filter chain, listed in the order the filters should be applied. + * The chain will be applied to all outgoing connections that Envoy makes to the upstream + * servers of this cluster. + */ + 'filters'?: (_envoy_api_v2_cluster_Filter)[]; + /** + * [#not-implemented-hide:] New mechanism for LB policy configuration. Used only if the + * :ref:`lb_policy` field has the value + * :ref:`LOAD_BALANCING_POLICY_CONFIG`. + */ + 'load_balancing_policy'?: (_envoy_api_v2_LoadBalancingPolicy); + /** + * [#not-implemented-hide:] + * If present, tells the client where to send load reports via LRS. If not present, the + * client will fall back to a client-side default, which may be either (a) don't send any + * load reports or (b) send load reports for all clusters to a single default server + * (which may be configured in the bootstrap file). + * + * Note that if multiple clusters point to the same LRS server, the client may choose to + * create a separate stream for each cluster or it may choose to coalesce the data for + * multiple clusters onto a single stream. Either way, the client must make sure to send + * the data for any given cluster on no more than one stream. + * + * [#next-major-version: In the v3 API, we should consider restructuring this somehow, + * maybe by allowing LRS to go on the ADS stream, or maybe by moving some of the negotiation + * from the LRS stream here.] + */ + 'lrs_server'?: (_envoy_api_v2_core_ConfigSource); + /** + * Configuration to use different transport sockets for different endpoints. + * The entry of *envoy.transport_socket_match* in the + * :ref:`LbEndpoint.Metadata ` + * is used to match against the transport sockets as they appear in the list. The first + * :ref:`match ` is used. + * For example, with the following match + * + * .. code-block:: yaml + * + * transport_socket_matches: + * - name: "enableMTLS" + * match: + * acceptMTLS: true + * transport_socket: + * name: envoy.transport_sockets.tls + * config: { ... } # tls socket configuration + * - name: "defaultToPlaintext" + * match: {} + * transport_socket: + * name: envoy.transport_sockets.raw_buffer + * + * Connections to the endpoints whose metadata value under *envoy.transport_socket_match* + * having "acceptMTLS"/"true" key/value pair use the "enableMTLS" socket configuration. + * + * If a :ref:`socket match ` with empty match + * criteria is provided, that always match any endpoint. For example, the "defaultToPlaintext" + * socket match in case above. + * + * If an endpoint metadata's value under *envoy.transport_socket_match* does not match any + * *TransportSocketMatch*, socket configuration fallbacks to use the *tls_context* or + * *transport_socket* specified in this cluster. + * + * This field allows gradual and flexible transport socket configuration changes. + * + * The metadata of endpoints in EDS can indicate transport socket capabilities. For example, + * an endpoint's metadata can have two key value pairs as "acceptMTLS": "true", + * "acceptPlaintext": "true". While some other endpoints, only accepting plaintext traffic + * has "acceptPlaintext": "true" metadata information. + * + * Then the xDS server can configure the CDS to a client, Envoy A, to send mutual TLS + * traffic for endpoints with "acceptMTLS": "true", by adding a corresponding + * *TransportSocketMatch* in this field. Other client Envoys receive CDS without + * *transport_socket_match* set, and still send plain text traffic to the same cluster. + * + * [#comment:TODO(incfly): add a detailed architecture doc on intended usage.] + */ + 'transport_socket_matches'?: (_envoy_api_v2_Cluster_TransportSocketMatch)[]; + /** + * If the DNS failure refresh rate is specified and the cluster type is either + * :ref:`STRICT_DNS`, + * or :ref:`LOGICAL_DNS`, + * this is used as the cluster’s DNS refresh rate when requests are failing. If this setting is + * not specified, the failure refresh rate defaults to the DNS refresh rate. For cluster types + * other than :ref:`STRICT_DNS` and + * :ref:`LOGICAL_DNS` this setting is + * ignored. + */ + 'dns_failure_refresh_rate'?: (_envoy_api_v2_Cluster_RefreshRate); + /** + * [#next-major-version: Reconcile DNS options in a single message.] + * Always use TCP queries instead of UDP queries for DNS lookups. + */ + 'use_tcp_for_dns_lookups'?: (boolean); + /** + * HTTP protocol options that are applied only to upstream HTTP connections. + * These options apply to all HTTP versions. + */ + 'upstream_http_protocol_options'?: (_envoy_api_v2_core_UpstreamHttpProtocolOptions); + /** + * If track_timeout_budgets is true, the :ref:`timeout budget histograms + * ` will be published for each + * request. These show what percentage of a request's per try and global timeout was used. A value + * of 0 would indicate that none of the timeout was used or that the timeout was infinite. A value + * of 100 would indicate that the request took the entirety of the timeout given to it. + */ + 'track_timeout_budgets'?: (boolean); + 'cluster_discovery_type'?: "type"|"cluster_type"; + /** + * Optional configuration for the load balancing algorithm selected by + * LbPolicy. Currently only + * :ref:`RING_HASH` and + * :ref:`LEAST_REQUEST` + * has additional configuration options. + * Specifying ring_hash_lb_config or least_request_lb_config without setting the corresponding + * LbPolicy will generate an error at runtime. + */ + 'lb_config'?: "ring_hash_lb_config"|"original_dst_lb_config"|"least_request_lb_config"; +} + +/** + * Configuration for a single upstream cluster. + * [#next-free-field: 48] + */ +export interface Cluster__Output { + /** + * Supplies the name of the cluster which must be unique across all clusters. + * The cluster name is used when emitting + * :ref:`statistics ` if :ref:`alt_stat_name + * ` is not provided. + * Any ``:`` in the cluster name will be converted to ``_`` when emitting statistics. + */ + 'name': (string); + /** + * The :ref:`service discovery type ` + * to use for resolving the cluster. + */ + 'type'?: (keyof typeof _envoy_api_v2_Cluster_DiscoveryType); + /** + * Configuration to use for EDS updates for the Cluster. + */ + 'eds_cluster_config'?: (_envoy_api_v2_Cluster_EdsClusterConfig__Output); + /** + * The timeout for new network connections to hosts in the cluster. + */ + 'connect_timeout'?: (_google_protobuf_Duration__Output); + /** + * Soft limit on size of the cluster’s connections read and write buffers. If + * unspecified, an implementation defined default is applied (1MiB). + */ + 'per_connection_buffer_limit_bytes'?: (_google_protobuf_UInt32Value__Output); + /** + * The :ref:`load balancer type ` to use + * when picking a host in the cluster. + */ + 'lb_policy': (keyof typeof _envoy_api_v2_Cluster_LbPolicy); + /** + * If the service discovery type is + * :ref:`STATIC`, + * :ref:`STRICT_DNS` + * or :ref:`LOGICAL_DNS`, + * then hosts is required. + * + * .. attention:: + * + * **This field is deprecated**. Set the + * :ref:`load_assignment` field instead. + */ + 'hosts': (_envoy_api_v2_core_Address__Output)[]; + /** + * Optional :ref:`active health checking ` + * configuration for the cluster. If no + * configuration is specified no health checking will be done and all cluster + * members will be considered healthy at all times. + */ + 'health_checks': (_envoy_api_v2_core_HealthCheck__Output)[]; + /** + * Optional maximum requests for a single upstream connection. This parameter + * is respected by both the HTTP/1.1 and HTTP/2 connection pool + * implementations. If not specified, there is no limit. Setting this + * parameter to 1 will effectively disable keep alive. + */ + 'max_requests_per_connection'?: (_google_protobuf_UInt32Value__Output); + /** + * Optional :ref:`circuit breaking ` for the cluster. + */ + 'circuit_breakers'?: (_envoy_api_v2_cluster_CircuitBreakers__Output); + /** + * The TLS configuration for connections to the upstream cluster. + * + * .. attention:: + * + * **This field is deprecated**. Use `transport_socket` with name `tls` instead. If both are + * set, `transport_socket` takes priority. + */ + 'tls_context'?: (_envoy_api_v2_auth_UpstreamTlsContext__Output); + /** + * Additional options when handling HTTP1 requests. + */ + 'http_protocol_options'?: (_envoy_api_v2_core_Http1ProtocolOptions__Output); + /** + * Even if default HTTP2 protocol options are desired, this field must be + * set so that Envoy will assume that the upstream supports HTTP/2 when + * making new HTTP connection pool connections. Currently, Envoy only + * supports prior knowledge for upstream connections. Even if TLS is used + * with ALPN, `http2_protocol_options` must be specified. As an aside this allows HTTP/2 + * connections to happen over plain text. + */ + 'http2_protocol_options'?: (_envoy_api_v2_core_Http2ProtocolOptions__Output); + /** + * If the DNS refresh rate is specified and the cluster type is either + * :ref:`STRICT_DNS`, + * or :ref:`LOGICAL_DNS`, + * this value is used as the cluster’s DNS refresh + * rate. The value configured must be at least 1ms. If this setting is not specified, the + * value defaults to 5000ms. For cluster types other than + * :ref:`STRICT_DNS` + * and :ref:`LOGICAL_DNS` + * this setting is ignored. + */ + 'dns_refresh_rate'?: (_google_protobuf_Duration__Output); + /** + * The DNS IP address resolution policy. If this setting is not specified, the + * value defaults to + * :ref:`AUTO`. + */ + 'dns_lookup_family': (keyof typeof _envoy_api_v2_Cluster_DnsLookupFamily); + /** + * If DNS resolvers are specified and the cluster type is either + * :ref:`STRICT_DNS`, + * or :ref:`LOGICAL_DNS`, + * this value is used to specify the cluster’s dns resolvers. + * If this setting is not specified, the value defaults to the default + * resolver, which uses /etc/resolv.conf for configuration. For cluster types + * other than + * :ref:`STRICT_DNS` + * and :ref:`LOGICAL_DNS` + * this setting is ignored. + */ + 'dns_resolvers': (_envoy_api_v2_core_Address__Output)[]; + /** + * If specified, outlier detection will be enabled for this upstream cluster. + * Each of the configuration values can be overridden via + * :ref:`runtime values `. + */ + 'outlier_detection'?: (_envoy_api_v2_cluster_OutlierDetection__Output); + /** + * The interval for removing stale hosts from a cluster type + * :ref:`ORIGINAL_DST`. + * Hosts are considered stale if they have not been used + * as upstream destinations during this interval. New hosts are added + * to original destination clusters on demand as new connections are + * redirected to Envoy, causing the number of hosts in the cluster to + * grow over time. Hosts that are not stale (they are actively used as + * destinations) are kept in the cluster, which allows connections to + * them remain open, saving the latency that would otherwise be spent + * on opening new connections. If this setting is not specified, the + * value defaults to 5000ms. For cluster types other than + * :ref:`ORIGINAL_DST` + * this setting is ignored. + */ + 'cleanup_interval'?: (_google_protobuf_Duration__Output); + /** + * Optional configuration used to bind newly established upstream connections. + * This overrides any bind_config specified in the bootstrap proto. + * If the address and port are empty, no bind will be performed. + */ + 'upstream_bind_config'?: (_envoy_api_v2_core_BindConfig__Output); + /** + * Configuration for load balancing subsetting. + */ + 'lb_subset_config'?: (_envoy_api_v2_Cluster_LbSubsetConfig__Output); + /** + * Optional configuration for the Ring Hash load balancing policy. + */ + 'ring_hash_lb_config'?: (_envoy_api_v2_Cluster_RingHashLbConfig__Output); + /** + * Optional custom transport socket implementation to use for upstream connections. + * To setup TLS, set a transport socket with name `tls` and + * :ref:`UpstreamTlsContexts ` in the `typed_config`. + * If no transport socket configuration is specified, new connections + * will be set up with plaintext. + */ + 'transport_socket'?: (_envoy_api_v2_core_TransportSocket__Output); + /** + * The Metadata field can be used to provide additional information about the + * cluster. It can be used for stats, logging, and varying filter behavior. + * Fields should use reverse DNS notation to denote which entity within Envoy + * will need the information. For instance, if the metadata is intended for + * the Router filter, the filter name should be specified as *envoy.filters.http.router*. + */ + 'metadata'?: (_envoy_api_v2_core_Metadata__Output); + /** + * Determines how Envoy selects the protocol used to speak to upstream hosts. + */ + 'protocol_selection': (keyof typeof _envoy_api_v2_Cluster_ClusterProtocolSelection); + /** + * Common configuration for all load balancer implementations. + */ + 'common_lb_config'?: (_envoy_api_v2_Cluster_CommonLbConfig__Output); + /** + * An optional alternative to the cluster name to be used while emitting stats. + * Any ``:`` in the name will be converted to ``_`` when emitting statistics. This should not be + * confused with :ref:`Router Filter Header + * `. + */ + 'alt_stat_name': (string); + /** + * Additional options when handling HTTP requests upstream. These options will be applicable to + * both HTTP1 and HTTP2 requests. + */ + 'common_http_protocol_options'?: (_envoy_api_v2_core_HttpProtocolOptions__Output); + /** + * Optional options for upstream connections. + */ + 'upstream_connection_options'?: (_envoy_api_v2_UpstreamConnectionOptions__Output); + /** + * If an upstream host becomes unhealthy (as determined by the configured health checks + * or outlier detection), immediately close all connections to the failed host. + * + * .. note:: + * + * This is currently only supported for connections created by tcp_proxy. + * + * .. note:: + * + * The current implementation of this feature closes all connections immediately when + * the unhealthy status is detected. If there are a large number of connections open + * to an upstream host that becomes unhealthy, Envoy may spend a substantial amount of + * time exclusively closing these connections, and not processing any other traffic. + */ + 'close_connections_on_host_health_failure': (boolean); + /** + * If set to true, Envoy will ignore the health value of a host when processing its removal + * from service discovery. This means that if active health checking is used, Envoy will *not* + * wait for the endpoint to go unhealthy before removing it. + */ + 'drain_connections_on_host_removal': (boolean); + /** + * Setting this is required for specifying members of + * :ref:`STATIC`, + * :ref:`STRICT_DNS` + * or :ref:`LOGICAL_DNS` clusters. + * This field supersedes the *hosts* field in the v2 API. + * + * .. attention:: + * + * Setting this allows non-EDS cluster types to contain embedded EDS equivalent + * :ref:`endpoint assignments`. + */ + 'load_assignment'?: (_envoy_api_v2_ClusterLoadAssignment__Output); + /** + * Optional configuration for the Original Destination load balancing policy. + */ + 'original_dst_lb_config'?: (_envoy_api_v2_Cluster_OriginalDstLbConfig__Output); + /** + * The extension_protocol_options field is used to provide extension-specific protocol options + * for upstream connections. The key should match the extension filter name, such as + * "envoy.filters.network.thrift_proxy". See the extension's documentation for details on + * specific options. + */ + 'extension_protocol_options'?: ({[key: string]: _google_protobuf_Struct__Output}); + /** + * The extension_protocol_options field is used to provide extension-specific protocol options + * for upstream connections. The key should match the extension filter name, such as + * "envoy.filters.network.thrift_proxy". See the extension's documentation for details on + * specific options. + */ + 'typed_extension_protocol_options'?: ({[key: string]: _google_protobuf_Any__Output}); + /** + * Optional configuration for the LeastRequest load balancing policy. + */ + 'least_request_lb_config'?: (_envoy_api_v2_Cluster_LeastRequestLbConfig__Output); + /** + * The custom cluster type. + */ + 'cluster_type'?: (_envoy_api_v2_Cluster_CustomClusterType__Output); + /** + * Optional configuration for setting cluster's DNS refresh rate. If the value is set to true, + * cluster's DNS refresh rate will be set to resource record's TTL which comes from DNS + * resolution. + */ + 'respect_dns_ttl': (boolean); + /** + * An (optional) network filter chain, listed in the order the filters should be applied. + * The chain will be applied to all outgoing connections that Envoy makes to the upstream + * servers of this cluster. + */ + 'filters': (_envoy_api_v2_cluster_Filter__Output)[]; + /** + * [#not-implemented-hide:] New mechanism for LB policy configuration. Used only if the + * :ref:`lb_policy` field has the value + * :ref:`LOAD_BALANCING_POLICY_CONFIG`. + */ + 'load_balancing_policy'?: (_envoy_api_v2_LoadBalancingPolicy__Output); + /** + * [#not-implemented-hide:] + * If present, tells the client where to send load reports via LRS. If not present, the + * client will fall back to a client-side default, which may be either (a) don't send any + * load reports or (b) send load reports for all clusters to a single default server + * (which may be configured in the bootstrap file). + * + * Note that if multiple clusters point to the same LRS server, the client may choose to + * create a separate stream for each cluster or it may choose to coalesce the data for + * multiple clusters onto a single stream. Either way, the client must make sure to send + * the data for any given cluster on no more than one stream. + * + * [#next-major-version: In the v3 API, we should consider restructuring this somehow, + * maybe by allowing LRS to go on the ADS stream, or maybe by moving some of the negotiation + * from the LRS stream here.] + */ + 'lrs_server'?: (_envoy_api_v2_core_ConfigSource__Output); + /** + * Configuration to use different transport sockets for different endpoints. + * The entry of *envoy.transport_socket_match* in the + * :ref:`LbEndpoint.Metadata ` + * is used to match against the transport sockets as they appear in the list. The first + * :ref:`match ` is used. + * For example, with the following match + * + * .. code-block:: yaml + * + * transport_socket_matches: + * - name: "enableMTLS" + * match: + * acceptMTLS: true + * transport_socket: + * name: envoy.transport_sockets.tls + * config: { ... } # tls socket configuration + * - name: "defaultToPlaintext" + * match: {} + * transport_socket: + * name: envoy.transport_sockets.raw_buffer + * + * Connections to the endpoints whose metadata value under *envoy.transport_socket_match* + * having "acceptMTLS"/"true" key/value pair use the "enableMTLS" socket configuration. + * + * If a :ref:`socket match ` with empty match + * criteria is provided, that always match any endpoint. For example, the "defaultToPlaintext" + * socket match in case above. + * + * If an endpoint metadata's value under *envoy.transport_socket_match* does not match any + * *TransportSocketMatch*, socket configuration fallbacks to use the *tls_context* or + * *transport_socket* specified in this cluster. + * + * This field allows gradual and flexible transport socket configuration changes. + * + * The metadata of endpoints in EDS can indicate transport socket capabilities. For example, + * an endpoint's metadata can have two key value pairs as "acceptMTLS": "true", + * "acceptPlaintext": "true". While some other endpoints, only accepting plaintext traffic + * has "acceptPlaintext": "true" metadata information. + * + * Then the xDS server can configure the CDS to a client, Envoy A, to send mutual TLS + * traffic for endpoints with "acceptMTLS": "true", by adding a corresponding + * *TransportSocketMatch* in this field. Other client Envoys receive CDS without + * *transport_socket_match* set, and still send plain text traffic to the same cluster. + * + * [#comment:TODO(incfly): add a detailed architecture doc on intended usage.] + */ + 'transport_socket_matches': (_envoy_api_v2_Cluster_TransportSocketMatch__Output)[]; + /** + * If the DNS failure refresh rate is specified and the cluster type is either + * :ref:`STRICT_DNS`, + * or :ref:`LOGICAL_DNS`, + * this is used as the cluster’s DNS refresh rate when requests are failing. If this setting is + * not specified, the failure refresh rate defaults to the DNS refresh rate. For cluster types + * other than :ref:`STRICT_DNS` and + * :ref:`LOGICAL_DNS` this setting is + * ignored. + */ + 'dns_failure_refresh_rate'?: (_envoy_api_v2_Cluster_RefreshRate__Output); + /** + * [#next-major-version: Reconcile DNS options in a single message.] + * Always use TCP queries instead of UDP queries for DNS lookups. + */ + 'use_tcp_for_dns_lookups': (boolean); + /** + * HTTP protocol options that are applied only to upstream HTTP connections. + * These options apply to all HTTP versions. + */ + 'upstream_http_protocol_options'?: (_envoy_api_v2_core_UpstreamHttpProtocolOptions__Output); + /** + * If track_timeout_budgets is true, the :ref:`timeout budget histograms + * ` will be published for each + * request. These show what percentage of a request's per try and global timeout was used. A value + * of 0 would indicate that none of the timeout was used or that the timeout was infinite. A value + * of 100 would indicate that the request took the entirety of the timeout given to it. + */ + 'track_timeout_budgets': (boolean); + 'cluster_discovery_type': "type"|"cluster_type"; + /** + * Optional configuration for the load balancing algorithm selected by + * LbPolicy. Currently only + * :ref:`RING_HASH` and + * :ref:`LEAST_REQUEST` + * has additional configuration options. + * Specifying ring_hash_lb_config or least_request_lb_config without setting the corresponding + * LbPolicy will generate an error at runtime. + */ + 'lb_config': "ring_hash_lb_config"|"original_dst_lb_config"|"least_request_lb_config"; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/ClusterLoadAssignment.ts b/packages/grpc-js/src/generated/envoy/api/v2/ClusterLoadAssignment.ts new file mode 100644 index 000000000..bb5ac327d --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/ClusterLoadAssignment.ts @@ -0,0 +1,235 @@ +// Original file: deps/envoy-api/envoy/api/v2/endpoint.proto + +import { LocalityLbEndpoints as _envoy_api_v2_endpoint_LocalityLbEndpoints, LocalityLbEndpoints__Output as _envoy_api_v2_endpoint_LocalityLbEndpoints__Output } from '../../../envoy/api/v2/endpoint/LocalityLbEndpoints'; +import { Endpoint as _envoy_api_v2_endpoint_Endpoint, Endpoint__Output as _envoy_api_v2_endpoint_Endpoint__Output } from '../../../envoy/api/v2/endpoint/Endpoint'; +import { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output as _google_protobuf_UInt32Value__Output } from '../../../google/protobuf/UInt32Value'; +import { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from '../../../google/protobuf/Duration'; +import { FractionalPercent as _envoy_type_FractionalPercent, FractionalPercent__Output as _envoy_type_FractionalPercent__Output } from '../../../envoy/type/FractionalPercent'; + +/** + * [#not-implemented-hide:] + */ +export interface _envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload { + /** + * Identifier for the policy specifying the drop. + */ + 'category'?: (string); + /** + * Percentage of traffic that should be dropped for the category. + */ + 'drop_percentage'?: (_envoy_type_FractionalPercent); +} + +/** + * [#not-implemented-hide:] + */ +export interface _envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload__Output { + /** + * Identifier for the policy specifying the drop. + */ + 'category': (string); + /** + * Percentage of traffic that should be dropped for the category. + */ + 'drop_percentage'?: (_envoy_type_FractionalPercent__Output); +} + +/** + * Load balancing policy settings. + * [#next-free-field: 6] + */ +export interface _envoy_api_v2_ClusterLoadAssignment_Policy { + /** + * Action to trim the overall incoming traffic to protect the upstream + * hosts. This action allows protection in case the hosts are unable to + * recover from an outage, or unable to autoscale or unable to handle + * incoming traffic volume for any reason. + * + * At the client each category is applied one after the other to generate + * the 'actual' drop percentage on all outgoing traffic. For example: + * + * .. code-block:: json + * + * { "drop_overloads": [ + * { "category": "throttle", "drop_percentage": 60 } + * { "category": "lb", "drop_percentage": 50 } + * ]} + * + * The actual drop percentages applied to the traffic at the clients will be + * "throttle"_drop = 60% + * "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%. + * actual_outgoing_load = 20% // remaining after applying all categories. + * [#not-implemented-hide:] + */ + 'drop_overloads'?: (_envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload)[]; + /** + * Priority levels and localities are considered overprovisioned with this + * factor (in percentage). This means that we don't consider a priority + * level or locality unhealthy until the percentage of healthy hosts + * multiplied by the overprovisioning factor drops below 100. + * With the default value 140(1.4), Envoy doesn't consider a priority level + * or a locality unhealthy until their percentage of healthy hosts drops + * below 72%. For example: + * + * .. code-block:: json + * + * { "overprovisioning_factor": 100 } + * + * Read more at :ref:`priority levels ` and + * :ref:`localities `. + */ + 'overprovisioning_factor'?: (_google_protobuf_UInt32Value); + /** + * The max time until which the endpoints from this assignment can be used. + * If no new assignments are received before this time expires the endpoints + * are considered stale and should be marked unhealthy. + * Defaults to 0 which means endpoints never go stale. + */ + 'endpoint_stale_after'?: (_google_protobuf_Duration); + /** + * The flag to disable overprovisioning. If it is set to true, + * :ref:`overprovisioning factor + * ` will be ignored + * and Envoy will not perform graceful failover between priority levels or + * localities as endpoints become unhealthy. Otherwise Envoy will perform + * graceful failover as :ref:`overprovisioning factor + * ` suggests. + * [#not-implemented-hide:] + */ + 'disable_overprovisioning'?: (boolean); +} + +/** + * Load balancing policy settings. + * [#next-free-field: 6] + */ +export interface _envoy_api_v2_ClusterLoadAssignment_Policy__Output { + /** + * Action to trim the overall incoming traffic to protect the upstream + * hosts. This action allows protection in case the hosts are unable to + * recover from an outage, or unable to autoscale or unable to handle + * incoming traffic volume for any reason. + * + * At the client each category is applied one after the other to generate + * the 'actual' drop percentage on all outgoing traffic. For example: + * + * .. code-block:: json + * + * { "drop_overloads": [ + * { "category": "throttle", "drop_percentage": 60 } + * { "category": "lb", "drop_percentage": 50 } + * ]} + * + * The actual drop percentages applied to the traffic at the clients will be + * "throttle"_drop = 60% + * "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%. + * actual_outgoing_load = 20% // remaining after applying all categories. + * [#not-implemented-hide:] + */ + 'drop_overloads': (_envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload__Output)[]; + /** + * Priority levels and localities are considered overprovisioned with this + * factor (in percentage). This means that we don't consider a priority + * level or locality unhealthy until the percentage of healthy hosts + * multiplied by the overprovisioning factor drops below 100. + * With the default value 140(1.4), Envoy doesn't consider a priority level + * or a locality unhealthy until their percentage of healthy hosts drops + * below 72%. For example: + * + * .. code-block:: json + * + * { "overprovisioning_factor": 100 } + * + * Read more at :ref:`priority levels ` and + * :ref:`localities `. + */ + 'overprovisioning_factor'?: (_google_protobuf_UInt32Value__Output); + /** + * The max time until which the endpoints from this assignment can be used. + * If no new assignments are received before this time expires the endpoints + * are considered stale and should be marked unhealthy. + * Defaults to 0 which means endpoints never go stale. + */ + 'endpoint_stale_after'?: (_google_protobuf_Duration__Output); + /** + * The flag to disable overprovisioning. If it is set to true, + * :ref:`overprovisioning factor + * ` will be ignored + * and Envoy will not perform graceful failover between priority levels or + * localities as endpoints become unhealthy. Otherwise Envoy will perform + * graceful failover as :ref:`overprovisioning factor + * ` suggests. + * [#not-implemented-hide:] + */ + 'disable_overprovisioning': (boolean); +} + +/** + * Each route from RDS will map to a single cluster or traffic split across + * clusters using weights expressed in the RDS WeightedCluster. + * + * With EDS, each cluster is treated independently from a LB perspective, with + * LB taking place between the Localities within a cluster and at a finer + * granularity between the hosts within a locality. The percentage of traffic + * for each endpoint is determined by both its load_balancing_weight, and the + * load_balancing_weight of its locality. First, a locality will be selected, + * then an endpoint within that locality will be chose based on its weight. + * [#next-free-field: 6] + */ +export interface ClusterLoadAssignment { + /** + * Name of the cluster. This will be the :ref:`service_name + * ` value if specified + * in the cluster :ref:`EdsClusterConfig + * `. + */ + 'cluster_name'?: (string); + /** + * List of endpoints to load balance to. + */ + 'endpoints'?: (_envoy_api_v2_endpoint_LocalityLbEndpoints)[]; + /** + * Load balancing policy settings. + */ + 'policy'?: (_envoy_api_v2_ClusterLoadAssignment_Policy); + /** + * Map of named endpoints that can be referenced in LocalityLbEndpoints. + * [#not-implemented-hide:] + */ + 'named_endpoints'?: ({[key: string]: _envoy_api_v2_endpoint_Endpoint}); +} + +/** + * Each route from RDS will map to a single cluster or traffic split across + * clusters using weights expressed in the RDS WeightedCluster. + * + * With EDS, each cluster is treated independently from a LB perspective, with + * LB taking place between the Localities within a cluster and at a finer + * granularity between the hosts within a locality. The percentage of traffic + * for each endpoint is determined by both its load_balancing_weight, and the + * load_balancing_weight of its locality. First, a locality will be selected, + * then an endpoint within that locality will be chose based on its weight. + * [#next-free-field: 6] + */ +export interface ClusterLoadAssignment__Output { + /** + * Name of the cluster. This will be the :ref:`service_name + * ` value if specified + * in the cluster :ref:`EdsClusterConfig + * `. + */ + 'cluster_name': (string); + /** + * List of endpoints to load balance to. + */ + 'endpoints': (_envoy_api_v2_endpoint_LocalityLbEndpoints__Output)[]; + /** + * Load balancing policy settings. + */ + 'policy'?: (_envoy_api_v2_ClusterLoadAssignment_Policy__Output); + /** + * Map of named endpoints that can be referenced in LocalityLbEndpoints. + * [#not-implemented-hide:] + */ + 'named_endpoints'?: ({[key: string]: _envoy_api_v2_endpoint_Endpoint__Output}); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/DeltaDiscoveryRequest.ts b/packages/grpc-js/src/generated/envoy/api/v2/DeltaDiscoveryRequest.ts new file mode 100644 index 000000000..4791e30b3 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/DeltaDiscoveryRequest.ts @@ -0,0 +1,202 @@ +// Original file: deps/envoy-api/envoy/api/v2/discovery.proto + +import { Node as _envoy_api_v2_core_Node, Node__Output as _envoy_api_v2_core_Node__Output } from '../../../envoy/api/v2/core/Node'; +import { Status as _google_rpc_Status, Status__Output as _google_rpc_Status__Output } from '../../../google/rpc/Status'; + +/** + * DeltaDiscoveryRequest and DeltaDiscoveryResponse are used in a new gRPC + * endpoint for Delta xDS. + * + * With Delta xDS, the DeltaDiscoveryResponses do not need to include a full + * snapshot of the tracked resources. Instead, DeltaDiscoveryResponses are a + * diff to the state of a xDS client. + * In Delta XDS there are per-resource versions, which allow tracking state at + * the resource granularity. + * An xDS Delta session is always in the context of a gRPC bidirectional + * stream. This allows the xDS server to keep track of the state of xDS clients + * connected to it. + * + * In Delta xDS the nonce field is required and used to pair + * DeltaDiscoveryResponse to a DeltaDiscoveryRequest ACK or NACK. + * Optionally, a response message level system_version_info is present for + * debugging purposes only. + * + * DeltaDiscoveryRequest plays two independent roles. Any DeltaDiscoveryRequest + * can be either or both of: [1] informing the server of what resources the + * client has gained/lost interest in (using resource_names_subscribe and + * resource_names_unsubscribe), or [2] (N)ACKing an earlier resource update from + * the server (using response_nonce, with presence of error_detail making it a NACK). + * Additionally, the first message (for a given type_url) of a reconnected gRPC stream + * has a third role: informing the server of the resources (and their versions) + * that the client already possesses, using the initial_resource_versions field. + * + * As with state-of-the-world, when multiple resource types are multiplexed (ADS), + * all requests/acknowledgments/updates are logically walled off by type_url: + * a Cluster ACK exists in a completely separate world from a prior Route NACK. + * In particular, initial_resource_versions being sent at the "start" of every + * gRPC stream actually entails a message for each type_url, each with its own + * initial_resource_versions. + * [#next-free-field: 8] + */ +export interface DeltaDiscoveryRequest { + /** + * The node making the request. + */ + 'node'?: (_envoy_api_v2_core_Node); + /** + * Type of the resource that is being requested, e.g. + * "type.googleapis.com/envoy.api.v2.ClusterLoadAssignment". + */ + 'type_url'?: (string); + /** + * DeltaDiscoveryRequests allow the client to add or remove individual + * resources to the set of tracked resources in the context of a stream. + * All resource names in the resource_names_subscribe list are added to the + * set of tracked resources and all resource names in the resource_names_unsubscribe + * list are removed from the set of tracked resources. + * + * *Unlike* state-of-the-world xDS, an empty resource_names_subscribe or + * resource_names_unsubscribe list simply means that no resources are to be + * added or removed to the resource list. + * *Like* state-of-the-world xDS, the server must send updates for all tracked + * resources, but can also send updates for resources the client has not subscribed to. + * + * NOTE: the server must respond with all resources listed in resource_names_subscribe, + * even if it believes the client has the most recent version of them. The reason: + * the client may have dropped them, but then regained interest before it had a chance + * to send the unsubscribe message. See DeltaSubscriptionStateTest.RemoveThenAdd. + * + * These two fields can be set in any DeltaDiscoveryRequest, including ACKs + * and initial_resource_versions. + * + * A list of Resource names to add to the list of tracked resources. + */ + 'resource_names_subscribe'?: (string)[]; + /** + * A list of Resource names to remove from the list of tracked resources. + */ + 'resource_names_unsubscribe'?: (string)[]; + /** + * Informs the server of the versions of the resources the xDS client knows of, to enable the + * client to continue the same logical xDS session even in the face of gRPC stream reconnection. + * It will not be populated: [1] in the very first stream of a session, since the client will + * not yet have any resources, [2] in any message after the first in a stream (for a given + * type_url), since the server will already be correctly tracking the client's state. + * (In ADS, the first message *of each type_url* of a reconnected stream populates this map.) + * The map's keys are names of xDS resources known to the xDS client. + * The map's values are opaque resource versions. + */ + 'initial_resource_versions'?: ({[key: string]: string}); + /** + * When the DeltaDiscoveryRequest is a ACK or NACK message in response + * to a previous DeltaDiscoveryResponse, the response_nonce must be the + * nonce in the DeltaDiscoveryResponse. + * Otherwise (unlike in DiscoveryRequest) response_nonce must be omitted. + */ + 'response_nonce'?: (string); + /** + * This is populated when the previous :ref:`DiscoveryResponse ` + * failed to update configuration. The *message* field in *error_details* + * provides the Envoy internal exception related to the failure. + */ + 'error_detail'?: (_google_rpc_Status); +} + +/** + * DeltaDiscoveryRequest and DeltaDiscoveryResponse are used in a new gRPC + * endpoint for Delta xDS. + * + * With Delta xDS, the DeltaDiscoveryResponses do not need to include a full + * snapshot of the tracked resources. Instead, DeltaDiscoveryResponses are a + * diff to the state of a xDS client. + * In Delta XDS there are per-resource versions, which allow tracking state at + * the resource granularity. + * An xDS Delta session is always in the context of a gRPC bidirectional + * stream. This allows the xDS server to keep track of the state of xDS clients + * connected to it. + * + * In Delta xDS the nonce field is required and used to pair + * DeltaDiscoveryResponse to a DeltaDiscoveryRequest ACK or NACK. + * Optionally, a response message level system_version_info is present for + * debugging purposes only. + * + * DeltaDiscoveryRequest plays two independent roles. Any DeltaDiscoveryRequest + * can be either or both of: [1] informing the server of what resources the + * client has gained/lost interest in (using resource_names_subscribe and + * resource_names_unsubscribe), or [2] (N)ACKing an earlier resource update from + * the server (using response_nonce, with presence of error_detail making it a NACK). + * Additionally, the first message (for a given type_url) of a reconnected gRPC stream + * has a third role: informing the server of the resources (and their versions) + * that the client already possesses, using the initial_resource_versions field. + * + * As with state-of-the-world, when multiple resource types are multiplexed (ADS), + * all requests/acknowledgments/updates are logically walled off by type_url: + * a Cluster ACK exists in a completely separate world from a prior Route NACK. + * In particular, initial_resource_versions being sent at the "start" of every + * gRPC stream actually entails a message for each type_url, each with its own + * initial_resource_versions. + * [#next-free-field: 8] + */ +export interface DeltaDiscoveryRequest__Output { + /** + * The node making the request. + */ + 'node'?: (_envoy_api_v2_core_Node__Output); + /** + * Type of the resource that is being requested, e.g. + * "type.googleapis.com/envoy.api.v2.ClusterLoadAssignment". + */ + 'type_url': (string); + /** + * DeltaDiscoveryRequests allow the client to add or remove individual + * resources to the set of tracked resources in the context of a stream. + * All resource names in the resource_names_subscribe list are added to the + * set of tracked resources and all resource names in the resource_names_unsubscribe + * list are removed from the set of tracked resources. + * + * *Unlike* state-of-the-world xDS, an empty resource_names_subscribe or + * resource_names_unsubscribe list simply means that no resources are to be + * added or removed to the resource list. + * *Like* state-of-the-world xDS, the server must send updates for all tracked + * resources, but can also send updates for resources the client has not subscribed to. + * + * NOTE: the server must respond with all resources listed in resource_names_subscribe, + * even if it believes the client has the most recent version of them. The reason: + * the client may have dropped them, but then regained interest before it had a chance + * to send the unsubscribe message. See DeltaSubscriptionStateTest.RemoveThenAdd. + * + * These two fields can be set in any DeltaDiscoveryRequest, including ACKs + * and initial_resource_versions. + * + * A list of Resource names to add to the list of tracked resources. + */ + 'resource_names_subscribe': (string)[]; + /** + * A list of Resource names to remove from the list of tracked resources. + */ + 'resource_names_unsubscribe': (string)[]; + /** + * Informs the server of the versions of the resources the xDS client knows of, to enable the + * client to continue the same logical xDS session even in the face of gRPC stream reconnection. + * It will not be populated: [1] in the very first stream of a session, since the client will + * not yet have any resources, [2] in any message after the first in a stream (for a given + * type_url), since the server will already be correctly tracking the client's state. + * (In ADS, the first message *of each type_url* of a reconnected stream populates this map.) + * The map's keys are names of xDS resources known to the xDS client. + * The map's values are opaque resource versions. + */ + 'initial_resource_versions': ({[key: string]: string}); + /** + * When the DeltaDiscoveryRequest is a ACK or NACK message in response + * to a previous DeltaDiscoveryResponse, the response_nonce must be the + * nonce in the DeltaDiscoveryResponse. + * Otherwise (unlike in DiscoveryRequest) response_nonce must be omitted. + */ + 'response_nonce': (string); + /** + * This is populated when the previous :ref:`DiscoveryResponse ` + * failed to update configuration. The *message* field in *error_details* + * provides the Envoy internal exception related to the failure. + */ + 'error_detail'?: (_google_rpc_Status__Output); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/DeltaDiscoveryResponse.ts b/packages/grpc-js/src/generated/envoy/api/v2/DeltaDiscoveryResponse.ts new file mode 100644 index 000000000..8af4b4eb5 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/DeltaDiscoveryResponse.ts @@ -0,0 +1,63 @@ +// Original file: deps/envoy-api/envoy/api/v2/discovery.proto + +import { Resource as _envoy_api_v2_Resource, Resource__Output as _envoy_api_v2_Resource__Output } from '../../../envoy/api/v2/Resource'; + +/** + * [#next-free-field: 7] + */ +export interface DeltaDiscoveryResponse { + /** + * The version of the response data (used for debugging). + */ + 'system_version_info'?: (string); + /** + * The response resources. These are typed resources, whose types must match + * the type_url field. + */ + 'resources'?: (_envoy_api_v2_Resource)[]; + /** + * Type URL for resources. Identifies the xDS API when muxing over ADS. + * Must be consistent with the type_url in the Any within 'resources' if 'resources' is non-empty. + */ + 'type_url'?: (string); + /** + * The nonce provides a way for DeltaDiscoveryRequests to uniquely + * reference a DeltaDiscoveryResponse when (N)ACKing. The nonce is required. + */ + 'nonce'?: (string); + /** + * Resources names of resources that have be deleted and to be removed from the xDS Client. + * Removed resources for missing resources can be ignored. + */ + 'removed_resources'?: (string)[]; +} + +/** + * [#next-free-field: 7] + */ +export interface DeltaDiscoveryResponse__Output { + /** + * The version of the response data (used for debugging). + */ + 'system_version_info': (string); + /** + * The response resources. These are typed resources, whose types must match + * the type_url field. + */ + 'resources': (_envoy_api_v2_Resource__Output)[]; + /** + * Type URL for resources. Identifies the xDS API when muxing over ADS. + * Must be consistent with the type_url in the Any within 'resources' if 'resources' is non-empty. + */ + 'type_url': (string); + /** + * The nonce provides a way for DeltaDiscoveryRequests to uniquely + * reference a DeltaDiscoveryResponse when (N)ACKing. The nonce is required. + */ + 'nonce': (string); + /** + * Resources names of resources that have be deleted and to be removed from the xDS Client. + * Removed resources for missing resources can be ignored. + */ + 'removed_resources': (string)[]; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/DiscoveryRequest.ts b/packages/grpc-js/src/generated/envoy/api/v2/DiscoveryRequest.ts new file mode 100644 index 000000000..ee24e74fa --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/DiscoveryRequest.ts @@ -0,0 +1,110 @@ +// Original file: deps/envoy-api/envoy/api/v2/discovery.proto + +import { Node as _envoy_api_v2_core_Node, Node__Output as _envoy_api_v2_core_Node__Output } from '../../../envoy/api/v2/core/Node'; +import { Status as _google_rpc_Status, Status__Output as _google_rpc_Status__Output } from '../../../google/rpc/Status'; + +/** + * A DiscoveryRequest requests a set of versioned resources of the same type for + * a given Envoy node on some API. + * [#next-free-field: 7] + */ +export interface DiscoveryRequest { + /** + * The version_info provided in the request messages will be the version_info + * received with the most recent successfully processed response or empty on + * the first request. It is expected that no new request is sent after a + * response is received until the Envoy instance is ready to ACK/NACK the new + * configuration. ACK/NACK takes place by returning the new API config version + * as applied or the previous API config version respectively. Each type_url + * (see below) has an independent version associated with it. + */ + 'version_info'?: (string); + /** + * The node making the request. + */ + 'node'?: (_envoy_api_v2_core_Node); + /** + * List of resources to subscribe to, e.g. list of cluster names or a route + * configuration name. If this is empty, all resources for the API are + * returned. LDS/CDS may have empty resource_names, which will cause all + * resources for the Envoy instance to be returned. The LDS and CDS responses + * will then imply a number of resources that need to be fetched via EDS/RDS, + * which will be explicitly enumerated in resource_names. + */ + 'resource_names'?: (string)[]; + /** + * Type of the resource that is being requested, e.g. + * "type.googleapis.com/envoy.api.v2.ClusterLoadAssignment". This is implicit + * in requests made via singleton xDS APIs such as CDS, LDS, etc. but is + * required for ADS. + */ + 'type_url'?: (string); + /** + * nonce corresponding to DiscoveryResponse being ACK/NACKed. See above + * discussion on version_info and the DiscoveryResponse nonce comment. This + * may be empty only if 1) this is a non-persistent-stream xDS such as HTTP, + * or 2) the client has not yet accepted an update in this xDS stream (unlike + * delta, where it is populated only for new explicit ACKs). + */ + 'response_nonce'?: (string); + /** + * This is populated when the previous :ref:`DiscoveryResponse ` + * failed to update configuration. The *message* field in *error_details* provides the Envoy + * internal exception related to the failure. It is only intended for consumption during manual + * debugging, the string provided is not guaranteed to be stable across Envoy versions. + */ + 'error_detail'?: (_google_rpc_Status); +} + +/** + * A DiscoveryRequest requests a set of versioned resources of the same type for + * a given Envoy node on some API. + * [#next-free-field: 7] + */ +export interface DiscoveryRequest__Output { + /** + * The version_info provided in the request messages will be the version_info + * received with the most recent successfully processed response or empty on + * the first request. It is expected that no new request is sent after a + * response is received until the Envoy instance is ready to ACK/NACK the new + * configuration. ACK/NACK takes place by returning the new API config version + * as applied or the previous API config version respectively. Each type_url + * (see below) has an independent version associated with it. + */ + 'version_info': (string); + /** + * The node making the request. + */ + 'node'?: (_envoy_api_v2_core_Node__Output); + /** + * List of resources to subscribe to, e.g. list of cluster names or a route + * configuration name. If this is empty, all resources for the API are + * returned. LDS/CDS may have empty resource_names, which will cause all + * resources for the Envoy instance to be returned. The LDS and CDS responses + * will then imply a number of resources that need to be fetched via EDS/RDS, + * which will be explicitly enumerated in resource_names. + */ + 'resource_names': (string)[]; + /** + * Type of the resource that is being requested, e.g. + * "type.googleapis.com/envoy.api.v2.ClusterLoadAssignment". This is implicit + * in requests made via singleton xDS APIs such as CDS, LDS, etc. but is + * required for ADS. + */ + 'type_url': (string); + /** + * nonce corresponding to DiscoveryResponse being ACK/NACKed. See above + * discussion on version_info and the DiscoveryResponse nonce comment. This + * may be empty only if 1) this is a non-persistent-stream xDS such as HTTP, + * or 2) the client has not yet accepted an update in this xDS stream (unlike + * delta, where it is populated only for new explicit ACKs). + */ + 'response_nonce': (string); + /** + * This is populated when the previous :ref:`DiscoveryResponse ` + * failed to update configuration. The *message* field in *error_details* provides the Envoy + * internal exception related to the failure. It is only intended for consumption during manual + * debugging, the string provided is not guaranteed to be stable across Envoy versions. + */ + 'error_detail'?: (_google_rpc_Status__Output); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/DiscoveryResponse.ts b/packages/grpc-js/src/generated/envoy/api/v2/DiscoveryResponse.ts new file mode 100644 index 000000000..8eb7d42c0 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/DiscoveryResponse.ts @@ -0,0 +1,108 @@ +// Original file: deps/envoy-api/envoy/api/v2/discovery.proto + +import { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../google/protobuf/Any'; +import { ControlPlane as _envoy_api_v2_core_ControlPlane, ControlPlane__Output as _envoy_api_v2_core_ControlPlane__Output } from '../../../envoy/api/v2/core/ControlPlane'; + +/** + * [#next-free-field: 7] + */ +export interface DiscoveryResponse { + /** + * The version of the response data. + */ + 'version_info'?: (string); + /** + * The response resources. These resources are typed and depend on the API being called. + */ + 'resources'?: (_google_protobuf_Any)[]; + /** + * [#not-implemented-hide:] + * Canary is used to support two Envoy command line flags: + * + * * --terminate-on-canary-transition-failure. When set, Envoy is able to + * terminate if it detects that configuration is stuck at canary. Consider + * this example sequence of updates: + * - Management server applies a canary config successfully. + * - Management server rolls back to a production config. + * - Envoy rejects the new production config. + * Since there is no sensible way to continue receiving configuration + * updates, Envoy will then terminate and apply production config from a + * clean slate. + * * --dry-run-canary. When set, a canary response will never be applied, only + * validated via a dry run. + */ + 'canary'?: (boolean); + /** + * Type URL for resources. Identifies the xDS API when muxing over ADS. + * Must be consistent with the type_url in the 'resources' repeated Any (if non-empty). + */ + 'type_url'?: (string); + /** + * For gRPC based subscriptions, the nonce provides a way to explicitly ack a + * specific DiscoveryResponse in a following DiscoveryRequest. Additional + * messages may have been sent by Envoy to the management server for the + * previous version on the stream prior to this DiscoveryResponse, that were + * unprocessed at response send time. The nonce allows the management server + * to ignore any further DiscoveryRequests for the previous version until a + * DiscoveryRequest bearing the nonce. The nonce is optional and is not + * required for non-stream based xDS implementations. + */ + 'nonce'?: (string); + /** + * [#not-implemented-hide:] + * The control plane instance that sent the response. + */ + 'control_plane'?: (_envoy_api_v2_core_ControlPlane); +} + +/** + * [#next-free-field: 7] + */ +export interface DiscoveryResponse__Output { + /** + * The version of the response data. + */ + 'version_info': (string); + /** + * The response resources. These resources are typed and depend on the API being called. + */ + 'resources': (_google_protobuf_Any__Output)[]; + /** + * [#not-implemented-hide:] + * Canary is used to support two Envoy command line flags: + * + * * --terminate-on-canary-transition-failure. When set, Envoy is able to + * terminate if it detects that configuration is stuck at canary. Consider + * this example sequence of updates: + * - Management server applies a canary config successfully. + * - Management server rolls back to a production config. + * - Envoy rejects the new production config. + * Since there is no sensible way to continue receiving configuration + * updates, Envoy will then terminate and apply production config from a + * clean slate. + * * --dry-run-canary. When set, a canary response will never be applied, only + * validated via a dry run. + */ + 'canary': (boolean); + /** + * Type URL for resources. Identifies the xDS API when muxing over ADS. + * Must be consistent with the type_url in the 'resources' repeated Any (if non-empty). + */ + 'type_url': (string); + /** + * For gRPC based subscriptions, the nonce provides a way to explicitly ack a + * specific DiscoveryResponse in a following DiscoveryRequest. Additional + * messages may have been sent by Envoy to the management server for the + * previous version on the stream prior to this DiscoveryResponse, that were + * unprocessed at response send time. The nonce allows the management server + * to ignore any further DiscoveryRequests for the previous version until a + * DiscoveryRequest bearing the nonce. The nonce is optional and is not + * required for non-stream based xDS implementations. + */ + 'nonce': (string); + /** + * [#not-implemented-hide:] + * The control plane instance that sent the response. + */ + 'control_plane'?: (_envoy_api_v2_core_ControlPlane__Output); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/Listener.ts b/packages/grpc-js/src/generated/envoy/api/v2/Listener.ts new file mode 100644 index 000000000..73bfb6ec6 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/Listener.ts @@ -0,0 +1,504 @@ +// Original file: deps/envoy-api/envoy/api/v2/listener.proto + +import { Address as _envoy_api_v2_core_Address, Address__Output as _envoy_api_v2_core_Address__Output } from '../../../envoy/api/v2/core/Address'; +import { FilterChain as _envoy_api_v2_listener_FilterChain, FilterChain__Output as _envoy_api_v2_listener_FilterChain__Output } from '../../../envoy/api/v2/listener/FilterChain'; +import { BoolValue as _google_protobuf_BoolValue, BoolValue__Output as _google_protobuf_BoolValue__Output } from '../../../google/protobuf/BoolValue'; +import { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output as _google_protobuf_UInt32Value__Output } from '../../../google/protobuf/UInt32Value'; +import { Metadata as _envoy_api_v2_core_Metadata, Metadata__Output as _envoy_api_v2_core_Metadata__Output } from '../../../envoy/api/v2/core/Metadata'; +import { ListenerFilter as _envoy_api_v2_listener_ListenerFilter, ListenerFilter__Output as _envoy_api_v2_listener_ListenerFilter__Output } from '../../../envoy/api/v2/listener/ListenerFilter'; +import { SocketOption as _envoy_api_v2_core_SocketOption, SocketOption__Output as _envoy_api_v2_core_SocketOption__Output } from '../../../envoy/api/v2/core/SocketOption'; +import { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from '../../../google/protobuf/Duration'; +import { TrafficDirection as _envoy_api_v2_core_TrafficDirection } from '../../../envoy/api/v2/core/TrafficDirection'; +import { UdpListenerConfig as _envoy_api_v2_listener_UdpListenerConfig, UdpListenerConfig__Output as _envoy_api_v2_listener_UdpListenerConfig__Output } from '../../../envoy/api/v2/listener/UdpListenerConfig'; +import { ApiListener as _envoy_config_listener_v2_ApiListener, ApiListener__Output as _envoy_config_listener_v2_ApiListener__Output } from '../../../envoy/config/listener/v2/ApiListener'; +import { AccessLog as _envoy_config_filter_accesslog_v2_AccessLog, AccessLog__Output as _envoy_config_filter_accesslog_v2_AccessLog__Output } from '../../../envoy/config/filter/accesslog/v2/AccessLog'; + +/** + * Configuration for listener connection balancing. + */ +export interface _envoy_api_v2_Listener_ConnectionBalanceConfig { + /** + * If specified, the listener will use the exact connection balancer. + */ + 'exact_balance'?: (_envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance); + 'balance_type'?: "exact_balance"; +} + +/** + * Configuration for listener connection balancing. + */ +export interface _envoy_api_v2_Listener_ConnectionBalanceConfig__Output { + /** + * If specified, the listener will use the exact connection balancer. + */ + 'exact_balance'?: (_envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance__Output); + 'balance_type': "exact_balance"; +} + +/** + * [#not-implemented-hide:] + */ +export interface _envoy_api_v2_Listener_DeprecatedV1 { + /** + * Whether the listener should bind to the port. A listener that doesn't + * bind can only receive connections redirected from other listeners that + * set use_original_dst parameter to true. Default is true. + * + * This is deprecated in v2, all Listeners will bind to their port. An + * additional filter chain must be created for every original destination + * port this listener may redirect to in v2, with the original port + * specified in the FilterChainMatch destination_port field. + * + * [#comment:TODO(PiotrSikora): Remove this once verified that we no longer need it.] + */ + 'bind_to_port'?: (_google_protobuf_BoolValue); +} + +/** + * [#not-implemented-hide:] + */ +export interface _envoy_api_v2_Listener_DeprecatedV1__Output { + /** + * Whether the listener should bind to the port. A listener that doesn't + * bind can only receive connections redirected from other listeners that + * set use_original_dst parameter to true. Default is true. + * + * This is deprecated in v2, all Listeners will bind to their port. An + * additional filter chain must be created for every original destination + * port this listener may redirect to in v2, with the original port + * specified in the FilterChainMatch destination_port field. + * + * [#comment:TODO(PiotrSikora): Remove this once verified that we no longer need it.] + */ + 'bind_to_port'?: (_google_protobuf_BoolValue__Output); +} + +// Original file: deps/envoy-api/envoy/api/v2/listener.proto + +export enum _envoy_api_v2_Listener_DrainType { + /** + * Drain in response to calling /healthcheck/fail admin endpoint (along with the health check + * filter), listener removal/modification, and hot restart. + */ + DEFAULT = 0, + /** + * Drain in response to listener removal/modification and hot restart. This setting does not + * include /healthcheck/fail. This setting may be desirable if Envoy is hosting both ingress + * and egress listeners. + */ + MODIFY_ONLY = 1, +} + +/** + * A connection balancer implementation that does exact balancing. This means that a lock is + * held during balancing so that connection counts are nearly exactly balanced between worker + * threads. This is "nearly" exact in the sense that a connection might close in parallel thus + * making the counts incorrect, but this should be rectified on the next accept. This balancer + * sacrifices accept throughput for accuracy and should be used when there are a small number of + * connections that rarely cycle (e.g., service mesh gRPC egress). + */ +export interface _envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance { +} + +/** + * A connection balancer implementation that does exact balancing. This means that a lock is + * held during balancing so that connection counts are nearly exactly balanced between worker + * threads. This is "nearly" exact in the sense that a connection might close in parallel thus + * making the counts incorrect, but this should be rectified on the next accept. This balancer + * sacrifices accept throughput for accuracy and should be used when there are a small number of + * connections that rarely cycle (e.g., service mesh gRPC egress). + */ +export interface _envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance__Output { +} + +/** + * [#next-free-field: 23] + */ +export interface Listener { + /** + * The unique name by which this listener is known. If no name is provided, + * Envoy will allocate an internal UUID for the listener. If the listener is to be dynamically + * updated or removed via :ref:`LDS ` a unique name must be provided. + */ + 'name'?: (string); + /** + * The address that the listener should listen on. In general, the address must be unique, though + * that is governed by the bind rules of the OS. E.g., multiple listeners can listen on port 0 on + * Linux as the actual port will be allocated by the OS. + */ + 'address'?: (_envoy_api_v2_core_Address); + /** + * A list of filter chains to consider for this listener. The + * :ref:`FilterChain ` with the most specific + * :ref:`FilterChainMatch ` criteria is used on a + * connection. + * + * Example using SNI for filter chain selection can be found in the + * :ref:`FAQ entry `. + */ + 'filter_chains'?: (_envoy_api_v2_listener_FilterChain)[]; + /** + * If a connection is redirected using *iptables*, the port on which the proxy + * receives it might be different from the original destination address. When this flag is set to + * true, the listener hands off redirected connections to the listener associated with the + * original destination address. If there is no listener associated with the original destination + * address, the connection is handled by the listener that receives it. Defaults to false. + * + * .. attention:: + * + * This field is deprecated. Use :ref:`an original_dst ` + * :ref:`listener filter ` instead. + * + * Note that hand off to another listener is *NOT* performed without this flag. Once + * :ref:`FilterChainMatch ` is implemented this flag + * will be removed, as filter chain matching can be used to select a filter chain based on the + * restored destination address. + */ + 'use_original_dst'?: (_google_protobuf_BoolValue); + /** + * Soft limit on size of the listener’s new connection read and write buffers. + * If unspecified, an implementation defined default is applied (1MiB). + */ + 'per_connection_buffer_limit_bytes'?: (_google_protobuf_UInt32Value); + /** + * Listener metadata. + */ + 'metadata'?: (_envoy_api_v2_core_Metadata); + /** + * [#not-implemented-hide:] + */ + 'deprecated_v1'?: (_envoy_api_v2_Listener_DeprecatedV1); + /** + * The type of draining to perform at a listener-wide level. + */ + 'drain_type'?: (_envoy_api_v2_Listener_DrainType | keyof typeof _envoy_api_v2_Listener_DrainType); + /** + * Listener filters have the opportunity to manipulate and augment the connection metadata that + * is used in connection filter chain matching, for example. These filters are run before any in + * :ref:`filter_chains `. Order matters as the + * filters are processed sequentially right after a socket has been accepted by the listener, and + * before a connection is created. + * UDP Listener filters can be specified when the protocol in the listener socket address in + * :ref:`protocol ` is :ref:`UDP + * `. + * UDP listeners currently support a single filter. + */ + 'listener_filters'?: (_envoy_api_v2_listener_ListenerFilter)[]; + /** + * Whether the listener should be set as a transparent socket. + * When this flag is set to true, connections can be redirected to the listener using an + * *iptables* *TPROXY* target, in which case the original source and destination addresses and + * ports are preserved on accepted connections. This flag should be used in combination with + * :ref:`an original_dst ` :ref:`listener filter + * ` to mark the connections' local addresses as + * "restored." This can be used to hand off each redirected connection to another listener + * associated with the connection's destination address. Direct connections to the socket without + * using *TPROXY* cannot be distinguished from connections redirected using *TPROXY* and are + * therefore treated as if they were redirected. + * When this flag is set to false, the listener's socket is explicitly reset as non-transparent. + * Setting this flag requires Envoy to run with the *CAP_NET_ADMIN* capability. + * When this flag is not set (default), the socket is not modified, i.e. the transparent option + * is neither set nor reset. + */ + 'transparent'?: (_google_protobuf_BoolValue); + /** + * Whether the listener should set the *IP_FREEBIND* socket option. When this + * flag is set to true, listeners can be bound to an IP address that is not + * configured on the system running Envoy. When this flag is set to false, the + * option *IP_FREEBIND* is disabled on the socket. When this flag is not set + * (default), the socket is not modified, i.e. the option is neither enabled + * nor disabled. + */ + 'freebind'?: (_google_protobuf_BoolValue); + /** + * Whether the listener should accept TCP Fast Open (TFO) connections. + * When this flag is set to a value greater than 0, the option TCP_FASTOPEN is enabled on + * the socket, with a queue length of the specified size + * (see `details in RFC7413 `_). + * When this flag is set to 0, the option TCP_FASTOPEN is disabled on the socket. + * When this flag is not set (default), the socket is not modified, + * i.e. the option is neither enabled nor disabled. + * + * On Linux, the net.ipv4.tcp_fastopen kernel parameter must include flag 0x2 to enable + * TCP_FASTOPEN. + * See `ip-sysctl.txt `_. + * + * On macOS, only values of 0, 1, and unset are valid; other values may result in an error. + * To set the queue length on macOS, set the net.inet.tcp.fastopen_backlog kernel parameter. + */ + 'tcp_fast_open_queue_length'?: (_google_protobuf_UInt32Value); + /** + * Additional socket options that may not be present in Envoy source code or + * precompiled binaries. + */ + 'socket_options'?: (_envoy_api_v2_core_SocketOption)[]; + /** + * The timeout to wait for all listener filters to complete operation. If the timeout is reached, + * the accepted socket is closed without a connection being created unless + * `continue_on_listener_filters_timeout` is set to true. Specify 0 to disable the + * timeout. If not specified, a default timeout of 15s is used. + */ + 'listener_filters_timeout'?: (_google_protobuf_Duration); + /** + * Specifies the intended direction of the traffic relative to the local Envoy. + */ + 'traffic_direction'?: (_envoy_api_v2_core_TrafficDirection | keyof typeof _envoy_api_v2_core_TrafficDirection); + /** + * Whether a connection should be created when listener filters timeout. Default is false. + * + * .. attention:: + * + * Some listener filters, such as :ref:`Proxy Protocol filter + * `, should not be used with this option. It will cause + * unexpected behavior when a connection is created. + */ + 'continue_on_listener_filters_timeout'?: (boolean); + /** + * If the protocol in the listener socket address in :ref:`protocol + * ` is :ref:`UDP + * `, this field specifies the actual udp + * listener to create, i.e. :ref:`udp_listener_name + * ` = "raw_udp_listener" for + * creating a packet-oriented UDP listener. If not present, treat it as "raw_udp_listener". + */ + 'udp_listener_config'?: (_envoy_api_v2_listener_UdpListenerConfig); + /** + * Used to represent an API listener, which is used in non-proxy clients. The type of API + * exposed to the non-proxy application depends on the type of API listener. + * When this field is set, no other field except for :ref:`name` + * should be set. + * + * .. note:: + * + * Currently only one ApiListener can be installed; and it can only be done via bootstrap config, + * not LDS. + * + * [#next-major-version: In the v3 API, instead of this messy approach where the socket + * listener fields are directly in the top-level Listener message and the API listener types + * are in the ApiListener message, the socket listener messages should be in their own message, + * and the top-level Listener should essentially be a oneof that selects between the + * socket listener and the various types of API listener. That way, a given Listener message + * can structurally only contain the fields of the relevant type.] + */ + 'api_listener'?: (_envoy_config_listener_v2_ApiListener); + /** + * The listener's connection balancer configuration, currently only applicable to TCP listeners. + * If no configuration is specified, Envoy will not attempt to balance active connections between + * worker threads. + */ + 'connection_balance_config'?: (_envoy_api_v2_Listener_ConnectionBalanceConfig); + /** + * When this flag is set to true, listeners set the *SO_REUSEPORT* socket option and + * create one socket for each worker thread. This makes inbound connections + * distribute among worker threads roughly evenly in cases where there are a high number + * of connections. When this flag is set to false, all worker threads share one socket. + * + * Before Linux v4.19-rc1, new TCP connections may be rejected during hot restart + * (see `3rd paragraph in 'soreuseport' commit message + * `_). + * This issue was fixed by `tcp: Avoid TCP syncookie rejected by SO_REUSEPORT socket + * `_. + */ + 'reuse_port'?: (boolean); + /** + * Configuration for :ref:`access logs ` + * emitted by this listener. + */ + 'access_log'?: (_envoy_config_filter_accesslog_v2_AccessLog)[]; +} + +/** + * [#next-free-field: 23] + */ +export interface Listener__Output { + /** + * The unique name by which this listener is known. If no name is provided, + * Envoy will allocate an internal UUID for the listener. If the listener is to be dynamically + * updated or removed via :ref:`LDS ` a unique name must be provided. + */ + 'name': (string); + /** + * The address that the listener should listen on. In general, the address must be unique, though + * that is governed by the bind rules of the OS. E.g., multiple listeners can listen on port 0 on + * Linux as the actual port will be allocated by the OS. + */ + 'address'?: (_envoy_api_v2_core_Address__Output); + /** + * A list of filter chains to consider for this listener. The + * :ref:`FilterChain ` with the most specific + * :ref:`FilterChainMatch ` criteria is used on a + * connection. + * + * Example using SNI for filter chain selection can be found in the + * :ref:`FAQ entry `. + */ + 'filter_chains': (_envoy_api_v2_listener_FilterChain__Output)[]; + /** + * If a connection is redirected using *iptables*, the port on which the proxy + * receives it might be different from the original destination address. When this flag is set to + * true, the listener hands off redirected connections to the listener associated with the + * original destination address. If there is no listener associated with the original destination + * address, the connection is handled by the listener that receives it. Defaults to false. + * + * .. attention:: + * + * This field is deprecated. Use :ref:`an original_dst ` + * :ref:`listener filter ` instead. + * + * Note that hand off to another listener is *NOT* performed without this flag. Once + * :ref:`FilterChainMatch ` is implemented this flag + * will be removed, as filter chain matching can be used to select a filter chain based on the + * restored destination address. + */ + 'use_original_dst'?: (_google_protobuf_BoolValue__Output); + /** + * Soft limit on size of the listener’s new connection read and write buffers. + * If unspecified, an implementation defined default is applied (1MiB). + */ + 'per_connection_buffer_limit_bytes'?: (_google_protobuf_UInt32Value__Output); + /** + * Listener metadata. + */ + 'metadata'?: (_envoy_api_v2_core_Metadata__Output); + /** + * [#not-implemented-hide:] + */ + 'deprecated_v1'?: (_envoy_api_v2_Listener_DeprecatedV1__Output); + /** + * The type of draining to perform at a listener-wide level. + */ + 'drain_type': (keyof typeof _envoy_api_v2_Listener_DrainType); + /** + * Listener filters have the opportunity to manipulate and augment the connection metadata that + * is used in connection filter chain matching, for example. These filters are run before any in + * :ref:`filter_chains `. Order matters as the + * filters are processed sequentially right after a socket has been accepted by the listener, and + * before a connection is created. + * UDP Listener filters can be specified when the protocol in the listener socket address in + * :ref:`protocol ` is :ref:`UDP + * `. + * UDP listeners currently support a single filter. + */ + 'listener_filters': (_envoy_api_v2_listener_ListenerFilter__Output)[]; + /** + * Whether the listener should be set as a transparent socket. + * When this flag is set to true, connections can be redirected to the listener using an + * *iptables* *TPROXY* target, in which case the original source and destination addresses and + * ports are preserved on accepted connections. This flag should be used in combination with + * :ref:`an original_dst ` :ref:`listener filter + * ` to mark the connections' local addresses as + * "restored." This can be used to hand off each redirected connection to another listener + * associated with the connection's destination address. Direct connections to the socket without + * using *TPROXY* cannot be distinguished from connections redirected using *TPROXY* and are + * therefore treated as if they were redirected. + * When this flag is set to false, the listener's socket is explicitly reset as non-transparent. + * Setting this flag requires Envoy to run with the *CAP_NET_ADMIN* capability. + * When this flag is not set (default), the socket is not modified, i.e. the transparent option + * is neither set nor reset. + */ + 'transparent'?: (_google_protobuf_BoolValue__Output); + /** + * Whether the listener should set the *IP_FREEBIND* socket option. When this + * flag is set to true, listeners can be bound to an IP address that is not + * configured on the system running Envoy. When this flag is set to false, the + * option *IP_FREEBIND* is disabled on the socket. When this flag is not set + * (default), the socket is not modified, i.e. the option is neither enabled + * nor disabled. + */ + 'freebind'?: (_google_protobuf_BoolValue__Output); + /** + * Whether the listener should accept TCP Fast Open (TFO) connections. + * When this flag is set to a value greater than 0, the option TCP_FASTOPEN is enabled on + * the socket, with a queue length of the specified size + * (see `details in RFC7413 `_). + * When this flag is set to 0, the option TCP_FASTOPEN is disabled on the socket. + * When this flag is not set (default), the socket is not modified, + * i.e. the option is neither enabled nor disabled. + * + * On Linux, the net.ipv4.tcp_fastopen kernel parameter must include flag 0x2 to enable + * TCP_FASTOPEN. + * See `ip-sysctl.txt `_. + * + * On macOS, only values of 0, 1, and unset are valid; other values may result in an error. + * To set the queue length on macOS, set the net.inet.tcp.fastopen_backlog kernel parameter. + */ + 'tcp_fast_open_queue_length'?: (_google_protobuf_UInt32Value__Output); + /** + * Additional socket options that may not be present in Envoy source code or + * precompiled binaries. + */ + 'socket_options': (_envoy_api_v2_core_SocketOption__Output)[]; + /** + * The timeout to wait for all listener filters to complete operation. If the timeout is reached, + * the accepted socket is closed without a connection being created unless + * `continue_on_listener_filters_timeout` is set to true. Specify 0 to disable the + * timeout. If not specified, a default timeout of 15s is used. + */ + 'listener_filters_timeout'?: (_google_protobuf_Duration__Output); + /** + * Specifies the intended direction of the traffic relative to the local Envoy. + */ + 'traffic_direction': (keyof typeof _envoy_api_v2_core_TrafficDirection); + /** + * Whether a connection should be created when listener filters timeout. Default is false. + * + * .. attention:: + * + * Some listener filters, such as :ref:`Proxy Protocol filter + * `, should not be used with this option. It will cause + * unexpected behavior when a connection is created. + */ + 'continue_on_listener_filters_timeout': (boolean); + /** + * If the protocol in the listener socket address in :ref:`protocol + * ` is :ref:`UDP + * `, this field specifies the actual udp + * listener to create, i.e. :ref:`udp_listener_name + * ` = "raw_udp_listener" for + * creating a packet-oriented UDP listener. If not present, treat it as "raw_udp_listener". + */ + 'udp_listener_config'?: (_envoy_api_v2_listener_UdpListenerConfig__Output); + /** + * Used to represent an API listener, which is used in non-proxy clients. The type of API + * exposed to the non-proxy application depends on the type of API listener. + * When this field is set, no other field except for :ref:`name` + * should be set. + * + * .. note:: + * + * Currently only one ApiListener can be installed; and it can only be done via bootstrap config, + * not LDS. + * + * [#next-major-version: In the v3 API, instead of this messy approach where the socket + * listener fields are directly in the top-level Listener message and the API listener types + * are in the ApiListener message, the socket listener messages should be in their own message, + * and the top-level Listener should essentially be a oneof that selects between the + * socket listener and the various types of API listener. That way, a given Listener message + * can structurally only contain the fields of the relevant type.] + */ + 'api_listener'?: (_envoy_config_listener_v2_ApiListener__Output); + /** + * The listener's connection balancer configuration, currently only applicable to TCP listeners. + * If no configuration is specified, Envoy will not attempt to balance active connections between + * worker threads. + */ + 'connection_balance_config'?: (_envoy_api_v2_Listener_ConnectionBalanceConfig__Output); + /** + * When this flag is set to true, listeners set the *SO_REUSEPORT* socket option and + * create one socket for each worker thread. This makes inbound connections + * distribute among worker threads roughly evenly in cases where there are a high number + * of connections. When this flag is set to false, all worker threads share one socket. + * + * Before Linux v4.19-rc1, new TCP connections may be rejected during hot restart + * (see `3rd paragraph in 'soreuseport' commit message + * `_). + * This issue was fixed by `tcp: Avoid TCP syncookie rejected by SO_REUSEPORT socket + * `_. + */ + 'reuse_port': (boolean); + /** + * Configuration for :ref:`access logs ` + * emitted by this listener. + */ + 'access_log': (_envoy_config_filter_accesslog_v2_AccessLog__Output)[]; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/LoadBalancingPolicy.ts b/packages/grpc-js/src/generated/envoy/api/v2/LoadBalancingPolicy.ts new file mode 100644 index 000000000..03c33c853 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/LoadBalancingPolicy.ts @@ -0,0 +1,90 @@ +// Original file: deps/envoy-api/envoy/api/v2/cluster.proto + +import { Struct as _google_protobuf_Struct, Struct__Output as _google_protobuf_Struct__Output } from '../../../google/protobuf/Struct'; +import { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../google/protobuf/Any'; + +export interface _envoy_api_v2_LoadBalancingPolicy_Policy { + /** + * Required. The name of the LB policy. + */ + 'name'?: (string); + /** + * Optional config for the LB policy. + * No more than one of these two fields may be populated. + */ + 'config'?: (_google_protobuf_Struct); + 'typed_config'?: (_google_protobuf_Any); +} + +export interface _envoy_api_v2_LoadBalancingPolicy_Policy__Output { + /** + * Required. The name of the LB policy. + */ + 'name': (string); + /** + * Optional config for the LB policy. + * No more than one of these two fields may be populated. + */ + 'config'?: (_google_protobuf_Struct__Output); + 'typed_config'?: (_google_protobuf_Any__Output); +} + +/** + * [#not-implemented-hide:] Extensible load balancing policy configuration. + * + * Every LB policy defined via this mechanism will be identified via a unique name using reverse + * DNS notation. If the policy needs configuration parameters, it must define a message for its + * own configuration, which will be stored in the config field. The name of the policy will tell + * clients which type of message they should expect to see in the config field. + * + * Note that there are cases where it is useful to be able to independently select LB policies + * for choosing a locality and for choosing an endpoint within that locality. For example, a + * given deployment may always use the same policy to choose the locality, but for choosing the + * endpoint within the locality, some clusters may use weighted-round-robin, while others may + * use some sort of session-based balancing. + * + * This can be accomplished via hierarchical LB policies, where the parent LB policy creates a + * child LB policy for each locality. For each request, the parent chooses the locality and then + * delegates to the child policy for that locality to choose the endpoint within the locality. + * + * To facilitate this, the config message for the top-level LB policy may include a field of + * type LoadBalancingPolicy that specifies the child policy. + */ +export interface LoadBalancingPolicy { + /** + * Each client will iterate over the list in order and stop at the first policy that it + * supports. This provides a mechanism for starting to use new LB policies that are not yet + * supported by all clients. + */ + 'policies'?: (_envoy_api_v2_LoadBalancingPolicy_Policy)[]; +} + +/** + * [#not-implemented-hide:] Extensible load balancing policy configuration. + * + * Every LB policy defined via this mechanism will be identified via a unique name using reverse + * DNS notation. If the policy needs configuration parameters, it must define a message for its + * own configuration, which will be stored in the config field. The name of the policy will tell + * clients which type of message they should expect to see in the config field. + * + * Note that there are cases where it is useful to be able to independently select LB policies + * for choosing a locality and for choosing an endpoint within that locality. For example, a + * given deployment may always use the same policy to choose the locality, but for choosing the + * endpoint within the locality, some clusters may use weighted-round-robin, while others may + * use some sort of session-based balancing. + * + * This can be accomplished via hierarchical LB policies, where the parent LB policy creates a + * child LB policy for each locality. For each request, the parent chooses the locality and then + * delegates to the child policy for that locality to choose the endpoint within the locality. + * + * To facilitate this, the config message for the top-level LB policy may include a field of + * type LoadBalancingPolicy that specifies the child policy. + */ +export interface LoadBalancingPolicy__Output { + /** + * Each client will iterate over the list in order and stop at the first policy that it + * supports. This provides a mechanism for starting to use new LB policies that are not yet + * supported by all clients. + */ + 'policies': (_envoy_api_v2_LoadBalancingPolicy_Policy__Output)[]; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/Resource.ts b/packages/grpc-js/src/generated/envoy/api/v2/Resource.ts new file mode 100644 index 000000000..88c511cb1 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/Resource.ts @@ -0,0 +1,43 @@ +// Original file: deps/envoy-api/envoy/api/v2/discovery.proto + +import { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../google/protobuf/Any'; + +export interface Resource { + /** + * The resource level version. It allows xDS to track the state of individual + * resources. + */ + 'version'?: (string); + /** + * The resource being tracked. + */ + 'resource'?: (_google_protobuf_Any); + /** + * The resource's name, to distinguish it from others of the same type of resource. + */ + 'name'?: (string); + /** + * The aliases are a list of other names that this resource can go by. + */ + 'aliases'?: (string)[]; +} + +export interface Resource__Output { + /** + * The resource level version. It allows xDS to track the state of individual + * resources. + */ + 'version': (string); + /** + * The resource being tracked. + */ + 'resource'?: (_google_protobuf_Any__Output); + /** + * The resource's name, to distinguish it from others of the same type of resource. + */ + 'name': (string); + /** + * The aliases are a list of other names that this resource can go by. + */ + 'aliases': (string)[]; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/RouteConfiguration.ts b/packages/grpc-js/src/generated/envoy/api/v2/RouteConfiguration.ts new file mode 100644 index 000000000..495950ff6 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/RouteConfiguration.ts @@ -0,0 +1,186 @@ +// Original file: deps/envoy-api/envoy/api/v2/route.proto + +import { VirtualHost as _envoy_api_v2_route_VirtualHost, VirtualHost__Output as _envoy_api_v2_route_VirtualHost__Output } from '../../../envoy/api/v2/route/VirtualHost'; +import { HeaderValueOption as _envoy_api_v2_core_HeaderValueOption, HeaderValueOption__Output as _envoy_api_v2_core_HeaderValueOption__Output } from '../../../envoy/api/v2/core/HeaderValueOption'; +import { BoolValue as _google_protobuf_BoolValue, BoolValue__Output as _google_protobuf_BoolValue__Output } from '../../../google/protobuf/BoolValue'; +import { Vhds as _envoy_api_v2_Vhds, Vhds__Output as _envoy_api_v2_Vhds__Output } from '../../../envoy/api/v2/Vhds'; + +/** + * [#next-free-field: 11] + */ +export interface RouteConfiguration { + /** + * The name of the route configuration. For example, it might match + * :ref:`route_config_name + * ` in + * :ref:`envoy_api_msg_config.filter.network.http_connection_manager.v2.Rds`. + */ + 'name'?: (string); + /** + * An array of virtual hosts that make up the route table. + */ + 'virtual_hosts'?: (_envoy_api_v2_route_VirtualHost)[]; + /** + * Optionally specifies a list of HTTP headers that the connection manager + * will consider to be internal only. If they are found on external requests they will be cleaned + * prior to filter invocation. See :ref:`config_http_conn_man_headers_x-envoy-internal` for more + * information. + */ + 'internal_only_headers'?: (string)[]; + /** + * Specifies a list of HTTP headers that should be added to each response that + * the connection manager encodes. Headers specified at this level are applied + * after headers from any enclosed :ref:`envoy_api_msg_route.VirtualHost` or + * :ref:`envoy_api_msg_route.RouteAction`. For more information, including details on + * header value syntax, see the documentation on :ref:`custom request headers + * `. + */ + 'response_headers_to_add'?: (_envoy_api_v2_core_HeaderValueOption)[]; + /** + * Specifies a list of HTTP headers that should be removed from each response + * that the connection manager encodes. + */ + 'response_headers_to_remove'?: (string)[]; + /** + * Specifies a list of HTTP headers that should be added to each request + * routed by the HTTP connection manager. Headers specified at this level are + * applied after headers from any enclosed :ref:`envoy_api_msg_route.VirtualHost` or + * :ref:`envoy_api_msg_route.RouteAction`. For more information, including details on + * header value syntax, see the documentation on :ref:`custom request headers + * `. + */ + 'request_headers_to_add'?: (_envoy_api_v2_core_HeaderValueOption)[]; + /** + * An optional boolean that specifies whether the clusters that the route + * table refers to will be validated by the cluster manager. If set to true + * and a route refers to a non-existent cluster, the route table will not + * load. If set to false and a route refers to a non-existent cluster, the + * route table will load and the router filter will return a 404 if the route + * is selected at runtime. This setting defaults to true if the route table + * is statically defined via the :ref:`route_config + * ` + * option. This setting default to false if the route table is loaded dynamically via the + * :ref:`rds + * ` + * option. Users may wish to override the default behavior in certain cases (for example when + * using CDS with a static route table). + */ + 'validate_clusters'?: (_google_protobuf_BoolValue); + /** + * Specifies a list of HTTP headers that should be removed from each request + * routed by the HTTP connection manager. + */ + 'request_headers_to_remove'?: (string)[]; + /** + * An array of virtual hosts will be dynamically loaded via the VHDS API. + * Both *virtual_hosts* and *vhds* fields will be used when present. *virtual_hosts* can be used + * for a base routing table or for infrequently changing virtual hosts. *vhds* is used for + * on-demand discovery of virtual hosts. The contents of these two fields will be merged to + * generate a routing table for a given RouteConfiguration, with *vhds* derived configuration + * taking precedence. + */ + 'vhds'?: (_envoy_api_v2_Vhds); + /** + * By default, headers that should be added/removed are evaluated from most to least specific: + * + * * route level + * * virtual host level + * * connection manager level + * + * To allow setting overrides at the route or virtual host level, this order can be reversed + * by setting this option to true. Defaults to false. + * + * [#next-major-version: In the v3 API, this will default to true.] + */ + 'most_specific_header_mutations_wins'?: (boolean); +} + +/** + * [#next-free-field: 11] + */ +export interface RouteConfiguration__Output { + /** + * The name of the route configuration. For example, it might match + * :ref:`route_config_name + * ` in + * :ref:`envoy_api_msg_config.filter.network.http_connection_manager.v2.Rds`. + */ + 'name': (string); + /** + * An array of virtual hosts that make up the route table. + */ + 'virtual_hosts': (_envoy_api_v2_route_VirtualHost__Output)[]; + /** + * Optionally specifies a list of HTTP headers that the connection manager + * will consider to be internal only. If they are found on external requests they will be cleaned + * prior to filter invocation. See :ref:`config_http_conn_man_headers_x-envoy-internal` for more + * information. + */ + 'internal_only_headers': (string)[]; + /** + * Specifies a list of HTTP headers that should be added to each response that + * the connection manager encodes. Headers specified at this level are applied + * after headers from any enclosed :ref:`envoy_api_msg_route.VirtualHost` or + * :ref:`envoy_api_msg_route.RouteAction`. For more information, including details on + * header value syntax, see the documentation on :ref:`custom request headers + * `. + */ + 'response_headers_to_add': (_envoy_api_v2_core_HeaderValueOption__Output)[]; + /** + * Specifies a list of HTTP headers that should be removed from each response + * that the connection manager encodes. + */ + 'response_headers_to_remove': (string)[]; + /** + * Specifies a list of HTTP headers that should be added to each request + * routed by the HTTP connection manager. Headers specified at this level are + * applied after headers from any enclosed :ref:`envoy_api_msg_route.VirtualHost` or + * :ref:`envoy_api_msg_route.RouteAction`. For more information, including details on + * header value syntax, see the documentation on :ref:`custom request headers + * `. + */ + 'request_headers_to_add': (_envoy_api_v2_core_HeaderValueOption__Output)[]; + /** + * An optional boolean that specifies whether the clusters that the route + * table refers to will be validated by the cluster manager. If set to true + * and a route refers to a non-existent cluster, the route table will not + * load. If set to false and a route refers to a non-existent cluster, the + * route table will load and the router filter will return a 404 if the route + * is selected at runtime. This setting defaults to true if the route table + * is statically defined via the :ref:`route_config + * ` + * option. This setting default to false if the route table is loaded dynamically via the + * :ref:`rds + * ` + * option. Users may wish to override the default behavior in certain cases (for example when + * using CDS with a static route table). + */ + 'validate_clusters'?: (_google_protobuf_BoolValue__Output); + /** + * Specifies a list of HTTP headers that should be removed from each request + * routed by the HTTP connection manager. + */ + 'request_headers_to_remove': (string)[]; + /** + * An array of virtual hosts will be dynamically loaded via the VHDS API. + * Both *virtual_hosts* and *vhds* fields will be used when present. *virtual_hosts* can be used + * for a base routing table or for infrequently changing virtual hosts. *vhds* is used for + * on-demand discovery of virtual hosts. The contents of these two fields will be merged to + * generate a routing table for a given RouteConfiguration, with *vhds* derived configuration + * taking precedence. + */ + 'vhds'?: (_envoy_api_v2_Vhds__Output); + /** + * By default, headers that should be added/removed are evaluated from most to least specific: + * + * * route level + * * virtual host level + * * connection manager level + * + * To allow setting overrides at the route or virtual host level, this order can be reversed + * by setting this option to true. Defaults to false. + * + * [#next-major-version: In the v3 API, this will default to true.] + */ + 'most_specific_header_mutations_wins': (boolean); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/UpstreamBindConfig.ts b/packages/grpc-js/src/generated/envoy/api/v2/UpstreamBindConfig.ts new file mode 100644 index 000000000..d90e9ad91 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/UpstreamBindConfig.ts @@ -0,0 +1,25 @@ +// Original file: deps/envoy-api/envoy/api/v2/cluster.proto + +import { Address as _envoy_api_v2_core_Address, Address__Output as _envoy_api_v2_core_Address__Output } from '../../../envoy/api/v2/core/Address'; + +/** + * An extensible structure containing the address Envoy should bind to when + * establishing upstream connections. + */ +export interface UpstreamBindConfig { + /** + * The address Envoy should bind to when establishing upstream connections. + */ + 'source_address'?: (_envoy_api_v2_core_Address); +} + +/** + * An extensible structure containing the address Envoy should bind to when + * establishing upstream connections. + */ +export interface UpstreamBindConfig__Output { + /** + * The address Envoy should bind to when establishing upstream connections. + */ + 'source_address'?: (_envoy_api_v2_core_Address__Output); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/UpstreamConnectionOptions.ts b/packages/grpc-js/src/generated/envoy/api/v2/UpstreamConnectionOptions.ts new file mode 100644 index 000000000..6a4244741 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/UpstreamConnectionOptions.ts @@ -0,0 +1,17 @@ +// Original file: deps/envoy-api/envoy/api/v2/cluster.proto + +import { TcpKeepalive as _envoy_api_v2_core_TcpKeepalive, TcpKeepalive__Output as _envoy_api_v2_core_TcpKeepalive__Output } from '../../../envoy/api/v2/core/TcpKeepalive'; + +export interface UpstreamConnectionOptions { + /** + * If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives. + */ + 'tcp_keepalive'?: (_envoy_api_v2_core_TcpKeepalive); +} + +export interface UpstreamConnectionOptions__Output { + /** + * If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives. + */ + 'tcp_keepalive'?: (_envoy_api_v2_core_TcpKeepalive__Output); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/Vhds.ts b/packages/grpc-js/src/generated/envoy/api/v2/Vhds.ts new file mode 100644 index 000000000..a89f2276b --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/Vhds.ts @@ -0,0 +1,17 @@ +// Original file: deps/envoy-api/envoy/api/v2/route.proto + +import { ConfigSource as _envoy_api_v2_core_ConfigSource, ConfigSource__Output as _envoy_api_v2_core_ConfigSource__Output } from '../../../envoy/api/v2/core/ConfigSource'; + +export interface Vhds { + /** + * Configuration source specifier for VHDS. + */ + 'config_source'?: (_envoy_api_v2_core_ConfigSource); +} + +export interface Vhds__Output { + /** + * Configuration source specifier for VHDS. + */ + 'config_source'?: (_envoy_api_v2_core_ConfigSource__Output); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/auth/CertificateValidationContext.ts b/packages/grpc-js/src/generated/envoy/api/v2/auth/CertificateValidationContext.ts new file mode 100644 index 000000000..fe8637fd3 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/auth/CertificateValidationContext.ts @@ -0,0 +1,315 @@ +// Original file: deps/envoy-api/envoy/api/v2/auth/common.proto + +import { DataSource as _envoy_api_v2_core_DataSource, DataSource__Output as _envoy_api_v2_core_DataSource__Output } from '../../../../envoy/api/v2/core/DataSource'; +import { BoolValue as _google_protobuf_BoolValue, BoolValue__Output as _google_protobuf_BoolValue__Output } from '../../../../google/protobuf/BoolValue'; +import { StringMatcher as _envoy_type_matcher_StringMatcher, StringMatcher__Output as _envoy_type_matcher_StringMatcher__Output } from '../../../../envoy/type/matcher/StringMatcher'; + +// Original file: deps/envoy-api/envoy/api/v2/auth/common.proto + +/** + * Peer certificate verification mode. + */ +export enum _envoy_api_v2_auth_CertificateValidationContext_TrustChainVerification { + /** + * Perform default certificate verification (e.g., against CA / verification lists) + */ + VERIFY_TRUST_CHAIN = 0, + /** + * Connections where the certificate fails verification will be permitted. + * For HTTP connections, the result of certificate verification can be used in route matching. ( + * see :ref:`validated ` ). + */ + ACCEPT_UNTRUSTED = 1, +} + +/** + * [#next-free-field: 11] + */ +export interface CertificateValidationContext { + /** + * TLS certificate data containing certificate authority certificates to use in verifying + * a presented peer certificate (e.g. server certificate for clusters or client certificate + * for listeners). If not specified and a peer certificate is presented it will not be + * verified. By default, a client certificate is optional, unless one of the additional + * options (:ref:`require_client_certificate + * `, + * :ref:`verify_certificate_spki + * `, + * :ref:`verify_certificate_hash + * `, or + * :ref:`match_subject_alt_names + * `) is also + * specified. + * + * It can optionally contain certificate revocation lists, in which case Envoy will verify + * that the presented peer certificate has not been revoked by one of the included CRLs. + * + * See :ref:`the TLS overview ` for a list of common + * system CA locations. + */ + 'trusted_ca'?: (_envoy_api_v2_core_DataSource); + /** + * An optional list of hex-encoded SHA-256 hashes. If specified, Envoy will verify that + * the SHA-256 of the DER-encoded presented certificate matches one of the specified values. + * + * A hex-encoded SHA-256 of the certificate can be generated with the following command: + * + * .. code-block:: bash + * + * $ openssl x509 -in path/to/client.crt -outform DER | openssl dgst -sha256 | cut -d" " -f2 + * df6ff72fe9116521268f6f2dd4966f51df479883fe7037b39f75916ac3049d1a + * + * A long hex-encoded and colon-separated SHA-256 (a.k.a. "fingerprint") of the certificate + * can be generated with the following command: + * + * .. code-block:: bash + * + * $ openssl x509 -in path/to/client.crt -noout -fingerprint -sha256 | cut -d"=" -f2 + * DF:6F:F7:2F:E9:11:65:21:26:8F:6F:2D:D4:96:6F:51:DF:47:98:83:FE:70:37:B3:9F:75:91:6A:C3:04:9D:1A + * + * Both of those formats are acceptable. + * + * When both: + * :ref:`verify_certificate_hash + * ` and + * :ref:`verify_certificate_spki + * ` are specified, + * a hash matching value from either of the lists will result in the certificate being accepted. + */ + 'verify_certificate_hash'?: (string)[]; + /** + * An optional list of base64-encoded SHA-256 hashes. If specified, Envoy will verify that the + * SHA-256 of the DER-encoded Subject Public Key Information (SPKI) of the presented certificate + * matches one of the specified values. + * + * A base64-encoded SHA-256 of the Subject Public Key Information (SPKI) of the certificate + * can be generated with the following command: + * + * .. code-block:: bash + * + * $ openssl x509 -in path/to/client.crt -noout -pubkey + * | openssl pkey -pubin -outform DER + * | openssl dgst -sha256 -binary + * | openssl enc -base64 + * NvqYIYSbgK2vCJpQhObf77vv+bQWtc5ek5RIOwPiC9A= + * + * This is the format used in HTTP Public Key Pinning. + * + * When both: + * :ref:`verify_certificate_hash + * ` and + * :ref:`verify_certificate_spki + * ` are specified, + * a hash matching value from either of the lists will result in the certificate being accepted. + * + * .. attention:: + * + * This option is preferred over :ref:`verify_certificate_hash + * `, + * because SPKI is tied to a private key, so it doesn't change when the certificate + * is renewed using the same private key. + */ + 'verify_certificate_spki'?: (string)[]; + /** + * An optional list of Subject Alternative Names. If specified, Envoy will verify that the + * Subject Alternative Name of the presented certificate matches one of the specified values. + * + * .. attention:: + * + * Subject Alternative Names are easily spoofable and verifying only them is insecure, + * therefore this option must be used together with :ref:`trusted_ca + * `. + */ + 'verify_subject_alt_name'?: (string)[]; + /** + * [#not-implemented-hide:] Must present a signed time-stamped OCSP response. + */ + 'require_ocsp_staple'?: (_google_protobuf_BoolValue); + /** + * [#not-implemented-hide:] Must present signed certificate time-stamp. + */ + 'require_signed_certificate_timestamp'?: (_google_protobuf_BoolValue); + /** + * An optional `certificate revocation list + * `_ + * (in PEM format). If specified, Envoy will verify that the presented peer + * certificate has not been revoked by this CRL. If this DataSource contains + * multiple CRLs, all of them will be used. + */ + 'crl'?: (_envoy_api_v2_core_DataSource); + /** + * If specified, Envoy will not reject expired certificates. + */ + 'allow_expired_certificate'?: (boolean); + /** + * An optional list of Subject Alternative name matchers. Envoy will verify that the + * Subject Alternative Name of the presented certificate matches one of the specified matches. + * + * When a certificate has wildcard DNS SAN entries, to match a specific client, it should be + * configured with exact match type in the :ref:`string matcher `. + * For example if the certificate has "\*.example.com" as DNS SAN entry, to allow only "api.example.com", + * it should be configured as shown below. + * + * .. code-block:: yaml + * + * match_subject_alt_names: + * exact: "api.example.com" + * + * .. attention:: + * + * Subject Alternative Names are easily spoofable and verifying only them is insecure, + * therefore this option must be used together with :ref:`trusted_ca + * `. + */ + 'match_subject_alt_names'?: (_envoy_type_matcher_StringMatcher)[]; + /** + * Certificate trust chain verification mode. + */ + 'trust_chain_verification'?: (_envoy_api_v2_auth_CertificateValidationContext_TrustChainVerification | keyof typeof _envoy_api_v2_auth_CertificateValidationContext_TrustChainVerification); +} + +/** + * [#next-free-field: 11] + */ +export interface CertificateValidationContext__Output { + /** + * TLS certificate data containing certificate authority certificates to use in verifying + * a presented peer certificate (e.g. server certificate for clusters or client certificate + * for listeners). If not specified and a peer certificate is presented it will not be + * verified. By default, a client certificate is optional, unless one of the additional + * options (:ref:`require_client_certificate + * `, + * :ref:`verify_certificate_spki + * `, + * :ref:`verify_certificate_hash + * `, or + * :ref:`match_subject_alt_names + * `) is also + * specified. + * + * It can optionally contain certificate revocation lists, in which case Envoy will verify + * that the presented peer certificate has not been revoked by one of the included CRLs. + * + * See :ref:`the TLS overview ` for a list of common + * system CA locations. + */ + 'trusted_ca'?: (_envoy_api_v2_core_DataSource__Output); + /** + * An optional list of hex-encoded SHA-256 hashes. If specified, Envoy will verify that + * the SHA-256 of the DER-encoded presented certificate matches one of the specified values. + * + * A hex-encoded SHA-256 of the certificate can be generated with the following command: + * + * .. code-block:: bash + * + * $ openssl x509 -in path/to/client.crt -outform DER | openssl dgst -sha256 | cut -d" " -f2 + * df6ff72fe9116521268f6f2dd4966f51df479883fe7037b39f75916ac3049d1a + * + * A long hex-encoded and colon-separated SHA-256 (a.k.a. "fingerprint") of the certificate + * can be generated with the following command: + * + * .. code-block:: bash + * + * $ openssl x509 -in path/to/client.crt -noout -fingerprint -sha256 | cut -d"=" -f2 + * DF:6F:F7:2F:E9:11:65:21:26:8F:6F:2D:D4:96:6F:51:DF:47:98:83:FE:70:37:B3:9F:75:91:6A:C3:04:9D:1A + * + * Both of those formats are acceptable. + * + * When both: + * :ref:`verify_certificate_hash + * ` and + * :ref:`verify_certificate_spki + * ` are specified, + * a hash matching value from either of the lists will result in the certificate being accepted. + */ + 'verify_certificate_hash': (string)[]; + /** + * An optional list of base64-encoded SHA-256 hashes. If specified, Envoy will verify that the + * SHA-256 of the DER-encoded Subject Public Key Information (SPKI) of the presented certificate + * matches one of the specified values. + * + * A base64-encoded SHA-256 of the Subject Public Key Information (SPKI) of the certificate + * can be generated with the following command: + * + * .. code-block:: bash + * + * $ openssl x509 -in path/to/client.crt -noout -pubkey + * | openssl pkey -pubin -outform DER + * | openssl dgst -sha256 -binary + * | openssl enc -base64 + * NvqYIYSbgK2vCJpQhObf77vv+bQWtc5ek5RIOwPiC9A= + * + * This is the format used in HTTP Public Key Pinning. + * + * When both: + * :ref:`verify_certificate_hash + * ` and + * :ref:`verify_certificate_spki + * ` are specified, + * a hash matching value from either of the lists will result in the certificate being accepted. + * + * .. attention:: + * + * This option is preferred over :ref:`verify_certificate_hash + * `, + * because SPKI is tied to a private key, so it doesn't change when the certificate + * is renewed using the same private key. + */ + 'verify_certificate_spki': (string)[]; + /** + * An optional list of Subject Alternative Names. If specified, Envoy will verify that the + * Subject Alternative Name of the presented certificate matches one of the specified values. + * + * .. attention:: + * + * Subject Alternative Names are easily spoofable and verifying only them is insecure, + * therefore this option must be used together with :ref:`trusted_ca + * `. + */ + 'verify_subject_alt_name': (string)[]; + /** + * [#not-implemented-hide:] Must present a signed time-stamped OCSP response. + */ + 'require_ocsp_staple'?: (_google_protobuf_BoolValue__Output); + /** + * [#not-implemented-hide:] Must present signed certificate time-stamp. + */ + 'require_signed_certificate_timestamp'?: (_google_protobuf_BoolValue__Output); + /** + * An optional `certificate revocation list + * `_ + * (in PEM format). If specified, Envoy will verify that the presented peer + * certificate has not been revoked by this CRL. If this DataSource contains + * multiple CRLs, all of them will be used. + */ + 'crl'?: (_envoy_api_v2_core_DataSource__Output); + /** + * If specified, Envoy will not reject expired certificates. + */ + 'allow_expired_certificate': (boolean); + /** + * An optional list of Subject Alternative name matchers. Envoy will verify that the + * Subject Alternative Name of the presented certificate matches one of the specified matches. + * + * When a certificate has wildcard DNS SAN entries, to match a specific client, it should be + * configured with exact match type in the :ref:`string matcher `. + * For example if the certificate has "\*.example.com" as DNS SAN entry, to allow only "api.example.com", + * it should be configured as shown below. + * + * .. code-block:: yaml + * + * match_subject_alt_names: + * exact: "api.example.com" + * + * .. attention:: + * + * Subject Alternative Names are easily spoofable and verifying only them is insecure, + * therefore this option must be used together with :ref:`trusted_ca + * `. + */ + 'match_subject_alt_names': (_envoy_type_matcher_StringMatcher__Output)[]; + /** + * Certificate trust chain verification mode. + */ + 'trust_chain_verification': (keyof typeof _envoy_api_v2_auth_CertificateValidationContext_TrustChainVerification); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/auth/CommonTlsContext.ts b/packages/grpc-js/src/generated/envoy/api/v2/auth/CommonTlsContext.ts new file mode 100644 index 000000000..a57288fa5 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/auth/CommonTlsContext.ts @@ -0,0 +1,140 @@ +// Original file: deps/envoy-api/envoy/api/v2/auth/tls.proto + +import { TlsParameters as _envoy_api_v2_auth_TlsParameters, TlsParameters__Output as _envoy_api_v2_auth_TlsParameters__Output } from '../../../../envoy/api/v2/auth/TlsParameters'; +import { TlsCertificate as _envoy_api_v2_auth_TlsCertificate, TlsCertificate__Output as _envoy_api_v2_auth_TlsCertificate__Output } from '../../../../envoy/api/v2/auth/TlsCertificate'; +import { CertificateValidationContext as _envoy_api_v2_auth_CertificateValidationContext, CertificateValidationContext__Output as _envoy_api_v2_auth_CertificateValidationContext__Output } from '../../../../envoy/api/v2/auth/CertificateValidationContext'; +import { SdsSecretConfig as _envoy_api_v2_auth_SdsSecretConfig, SdsSecretConfig__Output as _envoy_api_v2_auth_SdsSecretConfig__Output } from '../../../../envoy/api/v2/auth/SdsSecretConfig'; + +export interface _envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext { + /** + * How to validate peer certificates. + */ + 'default_validation_context'?: (_envoy_api_v2_auth_CertificateValidationContext); + /** + * Config for fetching validation context via SDS API. + */ + 'validation_context_sds_secret_config'?: (_envoy_api_v2_auth_SdsSecretConfig); +} + +export interface _envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext__Output { + /** + * How to validate peer certificates. + */ + 'default_validation_context'?: (_envoy_api_v2_auth_CertificateValidationContext__Output); + /** + * Config for fetching validation context via SDS API. + */ + 'validation_context_sds_secret_config'?: (_envoy_api_v2_auth_SdsSecretConfig__Output); +} + +/** + * TLS context shared by both client and server TLS contexts. + * [#next-free-field: 9] + */ +export interface CommonTlsContext { + /** + * TLS protocol versions, cipher suites etc. + */ + 'tls_params'?: (_envoy_api_v2_auth_TlsParameters); + /** + * :ref:`Multiple TLS certificates ` can be associated with the + * same context to allow both RSA and ECDSA certificates. + * + * Only a single TLS certificate is supported in client contexts. In server contexts, the first + * RSA certificate is used for clients that only support RSA and the first ECDSA certificate is + * used for clients that support ECDSA. + */ + 'tls_certificates'?: (_envoy_api_v2_auth_TlsCertificate)[]; + /** + * How to validate peer certificates. + */ + 'validation_context'?: (_envoy_api_v2_auth_CertificateValidationContext); + /** + * Supplies the list of ALPN protocols that the listener should expose. In + * practice this is likely to be set to one of two values (see the + * :ref:`codec_type + * ` + * parameter in the HTTP connection manager for more information): + * + * * "h2,http/1.1" If the listener is going to support both HTTP/2 and HTTP/1.1. + * * "http/1.1" If the listener is only going to support HTTP/1.1. + * + * There is no default for this parameter. If empty, Envoy will not expose ALPN. + */ + 'alpn_protocols'?: (string)[]; + /** + * Configs for fetching TLS certificates via SDS API. + */ + 'tls_certificate_sds_secret_configs'?: (_envoy_api_v2_auth_SdsSecretConfig)[]; + /** + * Config for fetching validation context via SDS API. + */ + 'validation_context_sds_secret_config'?: (_envoy_api_v2_auth_SdsSecretConfig); + /** + * Combined certificate validation context holds a default CertificateValidationContext + * and SDS config. When SDS server returns dynamic CertificateValidationContext, both dynamic + * and default CertificateValidationContext are merged into a new CertificateValidationContext + * for validation. This merge is done by Message::MergeFrom(), so dynamic + * CertificateValidationContext overwrites singular fields in default + * CertificateValidationContext, and concatenates repeated fields to default + * CertificateValidationContext, and logical OR is applied to boolean fields. + */ + 'combined_validation_context'?: (_envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext); + 'validation_context_type'?: "validation_context"|"validation_context_sds_secret_config"|"combined_validation_context"; +} + +/** + * TLS context shared by both client and server TLS contexts. + * [#next-free-field: 9] + */ +export interface CommonTlsContext__Output { + /** + * TLS protocol versions, cipher suites etc. + */ + 'tls_params'?: (_envoy_api_v2_auth_TlsParameters__Output); + /** + * :ref:`Multiple TLS certificates ` can be associated with the + * same context to allow both RSA and ECDSA certificates. + * + * Only a single TLS certificate is supported in client contexts. In server contexts, the first + * RSA certificate is used for clients that only support RSA and the first ECDSA certificate is + * used for clients that support ECDSA. + */ + 'tls_certificates': (_envoy_api_v2_auth_TlsCertificate__Output)[]; + /** + * How to validate peer certificates. + */ + 'validation_context'?: (_envoy_api_v2_auth_CertificateValidationContext__Output); + /** + * Supplies the list of ALPN protocols that the listener should expose. In + * practice this is likely to be set to one of two values (see the + * :ref:`codec_type + * ` + * parameter in the HTTP connection manager for more information): + * + * * "h2,http/1.1" If the listener is going to support both HTTP/2 and HTTP/1.1. + * * "http/1.1" If the listener is only going to support HTTP/1.1. + * + * There is no default for this parameter. If empty, Envoy will not expose ALPN. + */ + 'alpn_protocols': (string)[]; + /** + * Configs for fetching TLS certificates via SDS API. + */ + 'tls_certificate_sds_secret_configs': (_envoy_api_v2_auth_SdsSecretConfig__Output)[]; + /** + * Config for fetching validation context via SDS API. + */ + 'validation_context_sds_secret_config'?: (_envoy_api_v2_auth_SdsSecretConfig__Output); + /** + * Combined certificate validation context holds a default CertificateValidationContext + * and SDS config. When SDS server returns dynamic CertificateValidationContext, both dynamic + * and default CertificateValidationContext are merged into a new CertificateValidationContext + * for validation. This merge is done by Message::MergeFrom(), so dynamic + * CertificateValidationContext overwrites singular fields in default + * CertificateValidationContext, and concatenates repeated fields to default + * CertificateValidationContext, and logical OR is applied to boolean fields. + */ + 'combined_validation_context'?: (_envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext__Output); + 'validation_context_type': "validation_context"|"validation_context_sds_secret_config"|"combined_validation_context"; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/auth/DownstreamTlsContext.ts b/packages/grpc-js/src/generated/envoy/api/v2/auth/DownstreamTlsContext.ts new file mode 100644 index 000000000..c63b2a719 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/auth/DownstreamTlsContext.ts @@ -0,0 +1,101 @@ +// Original file: deps/envoy-api/envoy/api/v2/auth/tls.proto + +import { CommonTlsContext as _envoy_api_v2_auth_CommonTlsContext, CommonTlsContext__Output as _envoy_api_v2_auth_CommonTlsContext__Output } from '../../../../envoy/api/v2/auth/CommonTlsContext'; +import { BoolValue as _google_protobuf_BoolValue, BoolValue__Output as _google_protobuf_BoolValue__Output } from '../../../../google/protobuf/BoolValue'; +import { TlsSessionTicketKeys as _envoy_api_v2_auth_TlsSessionTicketKeys, TlsSessionTicketKeys__Output as _envoy_api_v2_auth_TlsSessionTicketKeys__Output } from '../../../../envoy/api/v2/auth/TlsSessionTicketKeys'; +import { SdsSecretConfig as _envoy_api_v2_auth_SdsSecretConfig, SdsSecretConfig__Output as _envoy_api_v2_auth_SdsSecretConfig__Output } from '../../../../envoy/api/v2/auth/SdsSecretConfig'; +import { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from '../../../../google/protobuf/Duration'; + +/** + * [#next-free-field: 8] + */ +export interface DownstreamTlsContext { + /** + * Common TLS context settings. + */ + 'common_tls_context'?: (_envoy_api_v2_auth_CommonTlsContext); + /** + * If specified, Envoy will reject connections without a valid client + * certificate. + */ + 'require_client_certificate'?: (_google_protobuf_BoolValue); + /** + * If specified, Envoy will reject connections without a valid and matching SNI. + * [#not-implemented-hide:] + */ + 'require_sni'?: (_google_protobuf_BoolValue); + /** + * TLS session ticket key settings. + */ + 'session_ticket_keys'?: (_envoy_api_v2_auth_TlsSessionTicketKeys); + /** + * Config for fetching TLS session ticket keys via SDS API. + */ + 'session_ticket_keys_sds_secret_config'?: (_envoy_api_v2_auth_SdsSecretConfig); + /** + * If specified, session_timeout will change maximum lifetime (in seconds) of TLS session + * Currently this value is used as a hint to `TLS session ticket lifetime (for TLSv1.2) + * ` + * only seconds could be specified (fractional seconds are going to be ignored). + */ + 'session_timeout'?: (_google_protobuf_Duration); + /** + * Config for controlling stateless TLS session resumption: setting this to true will cause the TLS + * server to not issue TLS session tickets for the purposes of stateless TLS session resumption. + * If set to false, the TLS server will issue TLS session tickets and encrypt/decrypt them using + * the keys specified through either :ref:`session_ticket_keys ` + * or :ref:`session_ticket_keys_sds_secret_config `. + * If this config is set to false and no keys are explicitly configured, the TLS server will issue + * TLS session tickets and encrypt/decrypt them using an internally-generated and managed key, with the + * implication that sessions cannot be resumed across hot restarts or on different hosts. + */ + 'disable_stateless_session_resumption'?: (boolean); + 'session_ticket_keys_type'?: "session_ticket_keys"|"session_ticket_keys_sds_secret_config"|"disable_stateless_session_resumption"; +} + +/** + * [#next-free-field: 8] + */ +export interface DownstreamTlsContext__Output { + /** + * Common TLS context settings. + */ + 'common_tls_context'?: (_envoy_api_v2_auth_CommonTlsContext__Output); + /** + * If specified, Envoy will reject connections without a valid client + * certificate. + */ + 'require_client_certificate'?: (_google_protobuf_BoolValue__Output); + /** + * If specified, Envoy will reject connections without a valid and matching SNI. + * [#not-implemented-hide:] + */ + 'require_sni'?: (_google_protobuf_BoolValue__Output); + /** + * TLS session ticket key settings. + */ + 'session_ticket_keys'?: (_envoy_api_v2_auth_TlsSessionTicketKeys__Output); + /** + * Config for fetching TLS session ticket keys via SDS API. + */ + 'session_ticket_keys_sds_secret_config'?: (_envoy_api_v2_auth_SdsSecretConfig__Output); + /** + * If specified, session_timeout will change maximum lifetime (in seconds) of TLS session + * Currently this value is used as a hint to `TLS session ticket lifetime (for TLSv1.2) + * ` + * only seconds could be specified (fractional seconds are going to be ignored). + */ + 'session_timeout'?: (_google_protobuf_Duration__Output); + /** + * Config for controlling stateless TLS session resumption: setting this to true will cause the TLS + * server to not issue TLS session tickets for the purposes of stateless TLS session resumption. + * If set to false, the TLS server will issue TLS session tickets and encrypt/decrypt them using + * the keys specified through either :ref:`session_ticket_keys ` + * or :ref:`session_ticket_keys_sds_secret_config `. + * If this config is set to false and no keys are explicitly configured, the TLS server will issue + * TLS session tickets and encrypt/decrypt them using an internally-generated and managed key, with the + * implication that sessions cannot be resumed across hot restarts or on different hosts. + */ + 'disable_stateless_session_resumption'?: (boolean); + 'session_ticket_keys_type': "session_ticket_keys"|"session_ticket_keys_sds_secret_config"|"disable_stateless_session_resumption"; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/auth/GenericSecret.ts b/packages/grpc-js/src/generated/envoy/api/v2/auth/GenericSecret.ts new file mode 100644 index 000000000..fc57bebb1 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/auth/GenericSecret.ts @@ -0,0 +1,17 @@ +// Original file: deps/envoy-api/envoy/api/v2/auth/secret.proto + +import { DataSource as _envoy_api_v2_core_DataSource, DataSource__Output as _envoy_api_v2_core_DataSource__Output } from '../../../../envoy/api/v2/core/DataSource'; + +export interface GenericSecret { + /** + * Secret of generic type and is available to filters. + */ + 'secret'?: (_envoy_api_v2_core_DataSource); +} + +export interface GenericSecret__Output { + /** + * Secret of generic type and is available to filters. + */ + 'secret'?: (_envoy_api_v2_core_DataSource__Output); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/auth/PrivateKeyProvider.ts b/packages/grpc-js/src/generated/envoy/api/v2/auth/PrivateKeyProvider.ts new file mode 100644 index 000000000..3726e5434 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/auth/PrivateKeyProvider.ts @@ -0,0 +1,42 @@ +// Original file: deps/envoy-api/envoy/api/v2/auth/common.proto + +import { Struct as _google_protobuf_Struct, Struct__Output as _google_protobuf_Struct__Output } from '../../../../google/protobuf/Struct'; +import { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../../google/protobuf/Any'; + +/** + * BoringSSL private key method configuration. The private key methods are used for external + * (potentially asynchronous) signing and decryption operations. Some use cases for private key + * methods would be TPM support and TLS acceleration. + */ +export interface PrivateKeyProvider { + /** + * Private key method provider name. The name must match a + * supported private key method provider type. + */ + 'provider_name'?: (string); + 'config'?: (_google_protobuf_Struct); + 'typed_config'?: (_google_protobuf_Any); + /** + * Private key method provider specific configuration. + */ + 'config_type'?: "config"|"typed_config"; +} + +/** + * BoringSSL private key method configuration. The private key methods are used for external + * (potentially asynchronous) signing and decryption operations. Some use cases for private key + * methods would be TPM support and TLS acceleration. + */ +export interface PrivateKeyProvider__Output { + /** + * Private key method provider name. The name must match a + * supported private key method provider type. + */ + 'provider_name': (string); + 'config'?: (_google_protobuf_Struct__Output); + 'typed_config'?: (_google_protobuf_Any__Output); + /** + * Private key method provider specific configuration. + */ + 'config_type': "config"|"typed_config"; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/auth/SdsSecretConfig.ts b/packages/grpc-js/src/generated/envoy/api/v2/auth/SdsSecretConfig.ts new file mode 100644 index 000000000..5a4292951 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/auth/SdsSecretConfig.ts @@ -0,0 +1,23 @@ +// Original file: deps/envoy-api/envoy/api/v2/auth/secret.proto + +import { ConfigSource as _envoy_api_v2_core_ConfigSource, ConfigSource__Output as _envoy_api_v2_core_ConfigSource__Output } from '../../../../envoy/api/v2/core/ConfigSource'; + +export interface SdsSecretConfig { + /** + * Name (FQDN, UUID, SPKI, SHA256, etc.) by which the secret can be uniquely referred to. + * When both name and config are specified, then secret can be fetched and/or reloaded via + * SDS. When only name is specified, then secret will be loaded from static resources. + */ + 'name'?: (string); + 'sds_config'?: (_envoy_api_v2_core_ConfigSource); +} + +export interface SdsSecretConfig__Output { + /** + * Name (FQDN, UUID, SPKI, SHA256, etc.) by which the secret can be uniquely referred to. + * When both name and config are specified, then secret can be fetched and/or reloaded via + * SDS. When only name is specified, then secret will be loaded from static resources. + */ + 'name': (string); + 'sds_config'?: (_envoy_api_v2_core_ConfigSource__Output); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/auth/Secret.ts b/packages/grpc-js/src/generated/envoy/api/v2/auth/Secret.ts new file mode 100644 index 000000000..086f7648e --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/auth/Secret.ts @@ -0,0 +1,36 @@ +// Original file: deps/envoy-api/envoy/api/v2/auth/secret.proto + +import { TlsCertificate as _envoy_api_v2_auth_TlsCertificate, TlsCertificate__Output as _envoy_api_v2_auth_TlsCertificate__Output } from '../../../../envoy/api/v2/auth/TlsCertificate'; +import { TlsSessionTicketKeys as _envoy_api_v2_auth_TlsSessionTicketKeys, TlsSessionTicketKeys__Output as _envoy_api_v2_auth_TlsSessionTicketKeys__Output } from '../../../../envoy/api/v2/auth/TlsSessionTicketKeys'; +import { CertificateValidationContext as _envoy_api_v2_auth_CertificateValidationContext, CertificateValidationContext__Output as _envoy_api_v2_auth_CertificateValidationContext__Output } from '../../../../envoy/api/v2/auth/CertificateValidationContext'; +import { GenericSecret as _envoy_api_v2_auth_GenericSecret, GenericSecret__Output as _envoy_api_v2_auth_GenericSecret__Output } from '../../../../envoy/api/v2/auth/GenericSecret'; + +/** + * [#next-free-field: 6] + */ +export interface Secret { + /** + * Name (FQDN, UUID, SPKI, SHA256, etc.) by which the secret can be uniquely referred to. + */ + 'name'?: (string); + 'tls_certificate'?: (_envoy_api_v2_auth_TlsCertificate); + 'session_ticket_keys'?: (_envoy_api_v2_auth_TlsSessionTicketKeys); + 'validation_context'?: (_envoy_api_v2_auth_CertificateValidationContext); + 'generic_secret'?: (_envoy_api_v2_auth_GenericSecret); + 'type'?: "tls_certificate"|"session_ticket_keys"|"validation_context"|"generic_secret"; +} + +/** + * [#next-free-field: 6] + */ +export interface Secret__Output { + /** + * Name (FQDN, UUID, SPKI, SHA256, etc.) by which the secret can be uniquely referred to. + */ + 'name': (string); + 'tls_certificate'?: (_envoy_api_v2_auth_TlsCertificate__Output); + 'session_ticket_keys'?: (_envoy_api_v2_auth_TlsSessionTicketKeys__Output); + 'validation_context'?: (_envoy_api_v2_auth_CertificateValidationContext__Output); + 'generic_secret'?: (_envoy_api_v2_auth_GenericSecret__Output); + 'type': "tls_certificate"|"session_ticket_keys"|"validation_context"|"generic_secret"; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/auth/TlsCertificate.ts b/packages/grpc-js/src/generated/envoy/api/v2/auth/TlsCertificate.ts new file mode 100644 index 000000000..cdefe7040 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/auth/TlsCertificate.ts @@ -0,0 +1,78 @@ +// Original file: deps/envoy-api/envoy/api/v2/auth/common.proto + +import { DataSource as _envoy_api_v2_core_DataSource, DataSource__Output as _envoy_api_v2_core_DataSource__Output } from '../../../../envoy/api/v2/core/DataSource'; +import { PrivateKeyProvider as _envoy_api_v2_auth_PrivateKeyProvider, PrivateKeyProvider__Output as _envoy_api_v2_auth_PrivateKeyProvider__Output } from '../../../../envoy/api/v2/auth/PrivateKeyProvider'; + +/** + * [#next-free-field: 7] + */ +export interface TlsCertificate { + /** + * The TLS certificate chain. + */ + 'certificate_chain'?: (_envoy_api_v2_core_DataSource); + /** + * The TLS private key. + */ + 'private_key'?: (_envoy_api_v2_core_DataSource); + /** + * The password to decrypt the TLS private key. If this field is not set, it is assumed that the + * TLS private key is not password encrypted. + */ + 'password'?: (_envoy_api_v2_core_DataSource); + /** + * [#not-implemented-hide:] + */ + 'ocsp_staple'?: (_envoy_api_v2_core_DataSource); + /** + * [#not-implemented-hide:] + */ + 'signed_certificate_timestamp'?: (_envoy_api_v2_core_DataSource)[]; + /** + * BoringSSL private key method provider. This is an alternative to :ref:`private_key + * ` field. This can't be + * marked as ``oneof`` due to API compatibility reasons. Setting both :ref:`private_key + * ` and + * :ref:`private_key_provider + * ` fields will result in an + * error. + */ + 'private_key_provider'?: (_envoy_api_v2_auth_PrivateKeyProvider); +} + +/** + * [#next-free-field: 7] + */ +export interface TlsCertificate__Output { + /** + * The TLS certificate chain. + */ + 'certificate_chain'?: (_envoy_api_v2_core_DataSource__Output); + /** + * The TLS private key. + */ + 'private_key'?: (_envoy_api_v2_core_DataSource__Output); + /** + * The password to decrypt the TLS private key. If this field is not set, it is assumed that the + * TLS private key is not password encrypted. + */ + 'password'?: (_envoy_api_v2_core_DataSource__Output); + /** + * [#not-implemented-hide:] + */ + 'ocsp_staple'?: (_envoy_api_v2_core_DataSource__Output); + /** + * [#not-implemented-hide:] + */ + 'signed_certificate_timestamp': (_envoy_api_v2_core_DataSource__Output)[]; + /** + * BoringSSL private key method provider. This is an alternative to :ref:`private_key + * ` field. This can't be + * marked as ``oneof`` due to API compatibility reasons. Setting both :ref:`private_key + * ` and + * :ref:`private_key_provider + * ` fields will result in an + * error. + */ + 'private_key_provider'?: (_envoy_api_v2_auth_PrivateKeyProvider__Output); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/auth/TlsParameters.ts b/packages/grpc-js/src/generated/envoy/api/v2/auth/TlsParameters.ts new file mode 100644 index 000000000..29fe8f4c8 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/auth/TlsParameters.ts @@ -0,0 +1,171 @@ +// Original file: deps/envoy-api/envoy/api/v2/auth/common.proto + + +// Original file: deps/envoy-api/envoy/api/v2/auth/common.proto + +export enum _envoy_api_v2_auth_TlsParameters_TlsProtocol { + /** + * Envoy will choose the optimal TLS version. + */ + TLS_AUTO = 0, + /** + * TLS 1.0 + */ + TLSv1_0 = 1, + /** + * TLS 1.1 + */ + TLSv1_1 = 2, + /** + * TLS 1.2 + */ + TLSv1_2 = 3, + /** + * TLS 1.3 + */ + TLSv1_3 = 4, +} + +export interface TlsParameters { + /** + * Minimum TLS protocol version. By default, it's ``TLSv1_2`` for clients and ``TLSv1_0`` for + * servers. + */ + 'tls_minimum_protocol_version'?: (_envoy_api_v2_auth_TlsParameters_TlsProtocol | keyof typeof _envoy_api_v2_auth_TlsParameters_TlsProtocol); + /** + * Maximum TLS protocol version. By default, it's ``TLSv1_3`` for servers in non-FIPS builds, and + * ``TLSv1_2`` for clients and for servers using :ref:`BoringSSL FIPS `. + */ + 'tls_maximum_protocol_version'?: (_envoy_api_v2_auth_TlsParameters_TlsProtocol | keyof typeof _envoy_api_v2_auth_TlsParameters_TlsProtocol); + /** + * If specified, the TLS listener will only support the specified `cipher list + * `_ + * when negotiating TLS 1.0-1.2 (this setting has no effect when negotiating TLS 1.3). If not + * specified, the default list will be used. + * + * In non-FIPS builds, the default cipher list is: + * + * .. code-block:: none + * + * [ECDHE-ECDSA-AES128-GCM-SHA256|ECDHE-ECDSA-CHACHA20-POLY1305] + * [ECDHE-RSA-AES128-GCM-SHA256|ECDHE-RSA-CHACHA20-POLY1305] + * ECDHE-ECDSA-AES128-SHA + * ECDHE-RSA-AES128-SHA + * AES128-GCM-SHA256 + * AES128-SHA + * ECDHE-ECDSA-AES256-GCM-SHA384 + * ECDHE-RSA-AES256-GCM-SHA384 + * ECDHE-ECDSA-AES256-SHA + * ECDHE-RSA-AES256-SHA + * AES256-GCM-SHA384 + * AES256-SHA + * + * In builds using :ref:`BoringSSL FIPS `, the default cipher list is: + * + * .. code-block:: none + * + * ECDHE-ECDSA-AES128-GCM-SHA256 + * ECDHE-RSA-AES128-GCM-SHA256 + * ECDHE-ECDSA-AES128-SHA + * ECDHE-RSA-AES128-SHA + * AES128-GCM-SHA256 + * AES128-SHA + * ECDHE-ECDSA-AES256-GCM-SHA384 + * ECDHE-RSA-AES256-GCM-SHA384 + * ECDHE-ECDSA-AES256-SHA + * ECDHE-RSA-AES256-SHA + * AES256-GCM-SHA384 + * AES256-SHA + */ + 'cipher_suites'?: (string)[]; + /** + * If specified, the TLS connection will only support the specified ECDH + * curves. If not specified, the default curves will be used. + * + * In non-FIPS builds, the default curves are: + * + * .. code-block:: none + * + * X25519 + * P-256 + * + * In builds using :ref:`BoringSSL FIPS `, the default curve is: + * + * .. code-block:: none + * + * P-256 + */ + 'ecdh_curves'?: (string)[]; +} + +export interface TlsParameters__Output { + /** + * Minimum TLS protocol version. By default, it's ``TLSv1_2`` for clients and ``TLSv1_0`` for + * servers. + */ + 'tls_minimum_protocol_version': (keyof typeof _envoy_api_v2_auth_TlsParameters_TlsProtocol); + /** + * Maximum TLS protocol version. By default, it's ``TLSv1_3`` for servers in non-FIPS builds, and + * ``TLSv1_2`` for clients and for servers using :ref:`BoringSSL FIPS `. + */ + 'tls_maximum_protocol_version': (keyof typeof _envoy_api_v2_auth_TlsParameters_TlsProtocol); + /** + * If specified, the TLS listener will only support the specified `cipher list + * `_ + * when negotiating TLS 1.0-1.2 (this setting has no effect when negotiating TLS 1.3). If not + * specified, the default list will be used. + * + * In non-FIPS builds, the default cipher list is: + * + * .. code-block:: none + * + * [ECDHE-ECDSA-AES128-GCM-SHA256|ECDHE-ECDSA-CHACHA20-POLY1305] + * [ECDHE-RSA-AES128-GCM-SHA256|ECDHE-RSA-CHACHA20-POLY1305] + * ECDHE-ECDSA-AES128-SHA + * ECDHE-RSA-AES128-SHA + * AES128-GCM-SHA256 + * AES128-SHA + * ECDHE-ECDSA-AES256-GCM-SHA384 + * ECDHE-RSA-AES256-GCM-SHA384 + * ECDHE-ECDSA-AES256-SHA + * ECDHE-RSA-AES256-SHA + * AES256-GCM-SHA384 + * AES256-SHA + * + * In builds using :ref:`BoringSSL FIPS `, the default cipher list is: + * + * .. code-block:: none + * + * ECDHE-ECDSA-AES128-GCM-SHA256 + * ECDHE-RSA-AES128-GCM-SHA256 + * ECDHE-ECDSA-AES128-SHA + * ECDHE-RSA-AES128-SHA + * AES128-GCM-SHA256 + * AES128-SHA + * ECDHE-ECDSA-AES256-GCM-SHA384 + * ECDHE-RSA-AES256-GCM-SHA384 + * ECDHE-ECDSA-AES256-SHA + * ECDHE-RSA-AES256-SHA + * AES256-GCM-SHA384 + * AES256-SHA + */ + 'cipher_suites': (string)[]; + /** + * If specified, the TLS connection will only support the specified ECDH + * curves. If not specified, the default curves will be used. + * + * In non-FIPS builds, the default curves are: + * + * .. code-block:: none + * + * X25519 + * P-256 + * + * In builds using :ref:`BoringSSL FIPS `, the default curve is: + * + * .. code-block:: none + * + * P-256 + */ + 'ecdh_curves': (string)[]; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/auth/TlsSessionTicketKeys.ts b/packages/grpc-js/src/generated/envoy/api/v2/auth/TlsSessionTicketKeys.ts new file mode 100644 index 000000000..80a79fa08 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/auth/TlsSessionTicketKeys.ts @@ -0,0 +1,61 @@ +// Original file: deps/envoy-api/envoy/api/v2/auth/common.proto + +import { DataSource as _envoy_api_v2_core_DataSource, DataSource__Output as _envoy_api_v2_core_DataSource__Output } from '../../../../envoy/api/v2/core/DataSource'; + +export interface TlsSessionTicketKeys { + /** + * Keys for encrypting and decrypting TLS session tickets. The + * first key in the array contains the key to encrypt all new sessions created by this context. + * All keys are candidates for decrypting received tickets. This allows for easy rotation of keys + * by, for example, putting the new key first, and the previous key second. + * + * If :ref:`session_ticket_keys ` + * is not specified, the TLS library will still support resuming sessions via tickets, but it will + * use an internally-generated and managed key, so sessions cannot be resumed across hot restarts + * or on different hosts. + * + * Each key must contain exactly 80 bytes of cryptographically-secure random data. For + * example, the output of ``openssl rand 80``. + * + * .. attention:: + * + * Using this feature has serious security considerations and risks. Improper handling of keys + * may result in loss of secrecy in connections, even if ciphers supporting perfect forward + * secrecy are used. See https://www.imperialviolet.org/2013/06/27/botchingpfs.html for some + * discussion. To minimize the risk, you must: + * + * * Keep the session ticket keys at least as secure as your TLS certificate private keys + * * Rotate session ticket keys at least daily, and preferably hourly + * * Always generate keys using a cryptographically-secure random data source + */ + 'keys'?: (_envoy_api_v2_core_DataSource)[]; +} + +export interface TlsSessionTicketKeys__Output { + /** + * Keys for encrypting and decrypting TLS session tickets. The + * first key in the array contains the key to encrypt all new sessions created by this context. + * All keys are candidates for decrypting received tickets. This allows for easy rotation of keys + * by, for example, putting the new key first, and the previous key second. + * + * If :ref:`session_ticket_keys ` + * is not specified, the TLS library will still support resuming sessions via tickets, but it will + * use an internally-generated and managed key, so sessions cannot be resumed across hot restarts + * or on different hosts. + * + * Each key must contain exactly 80 bytes of cryptographically-secure random data. For + * example, the output of ``openssl rand 80``. + * + * .. attention:: + * + * Using this feature has serious security considerations and risks. Improper handling of keys + * may result in loss of secrecy in connections, even if ciphers supporting perfect forward + * secrecy are used. See https://www.imperialviolet.org/2013/06/27/botchingpfs.html for some + * discussion. To minimize the risk, you must: + * + * * Keep the session ticket keys at least as secure as your TLS certificate private keys + * * Rotate session ticket keys at least daily, and preferably hourly + * * Always generate keys using a cryptographically-secure random data source + */ + 'keys': (_envoy_api_v2_core_DataSource__Output)[]; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/auth/UpstreamTlsContext.ts b/packages/grpc-js/src/generated/envoy/api/v2/auth/UpstreamTlsContext.ts new file mode 100644 index 000000000..7a56be3c0 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/auth/UpstreamTlsContext.ts @@ -0,0 +1,68 @@ +// Original file: deps/envoy-api/envoy/api/v2/auth/tls.proto + +import { CommonTlsContext as _envoy_api_v2_auth_CommonTlsContext, CommonTlsContext__Output as _envoy_api_v2_auth_CommonTlsContext__Output } from '../../../../envoy/api/v2/auth/CommonTlsContext'; +import { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output as _google_protobuf_UInt32Value__Output } from '../../../../google/protobuf/UInt32Value'; + +export interface UpstreamTlsContext { + /** + * Common TLS context settings. + * + * .. attention:: + * + * Server certificate verification is not enabled by default. Configure + * :ref:`trusted_ca` to enable + * verification. + */ + 'common_tls_context'?: (_envoy_api_v2_auth_CommonTlsContext); + /** + * SNI string to use when creating TLS backend connections. + */ + 'sni'?: (string); + /** + * If true, server-initiated TLS renegotiation will be allowed. + * + * .. attention:: + * + * TLS renegotiation is considered insecure and shouldn't be used unless absolutely necessary. + */ + 'allow_renegotiation'?: (boolean); + /** + * Maximum number of session keys (Pre-Shared Keys for TLSv1.3+, Session IDs and Session Tickets + * for TLSv1.2 and older) to store for the purpose of session resumption. + * + * Defaults to 1, setting this to 0 disables session resumption. + */ + 'max_session_keys'?: (_google_protobuf_UInt32Value); +} + +export interface UpstreamTlsContext__Output { + /** + * Common TLS context settings. + * + * .. attention:: + * + * Server certificate verification is not enabled by default. Configure + * :ref:`trusted_ca` to enable + * verification. + */ + 'common_tls_context'?: (_envoy_api_v2_auth_CommonTlsContext__Output); + /** + * SNI string to use when creating TLS backend connections. + */ + 'sni': (string); + /** + * If true, server-initiated TLS renegotiation will be allowed. + * + * .. attention:: + * + * TLS renegotiation is considered insecure and shouldn't be used unless absolutely necessary. + */ + 'allow_renegotiation': (boolean); + /** + * Maximum number of session keys (Pre-Shared Keys for TLSv1.3+, Session IDs and Session Tickets + * for TLSv1.2 and older) to store for the purpose of session resumption. + * + * Defaults to 1, setting this to 0 disables session resumption. + */ + 'max_session_keys'?: (_google_protobuf_UInt32Value__Output); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/cluster/CircuitBreakers.ts b/packages/grpc-js/src/generated/envoy/api/v2/cluster/CircuitBreakers.ts new file mode 100644 index 000000000..f9380aec1 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/cluster/CircuitBreakers.ts @@ -0,0 +1,195 @@ +// Original file: deps/envoy-api/envoy/api/v2/cluster/circuit_breaker.proto + +import { RoutingPriority as _envoy_api_v2_core_RoutingPriority } from '../../../../envoy/api/v2/core/RoutingPriority'; +import { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output as _google_protobuf_UInt32Value__Output } from '../../../../google/protobuf/UInt32Value'; +import { Percent as _envoy_type_Percent, Percent__Output as _envoy_type_Percent__Output } from '../../../../envoy/type/Percent'; + +export interface _envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget { + /** + * Specifies the limit on concurrent retries as a percentage of the sum of active requests and + * active pending requests. For example, if there are 100 active requests and the + * budget_percent is set to 25, there may be 25 active retries. + * + * This parameter is optional. Defaults to 20%. + */ + 'budget_percent'?: (_envoy_type_Percent); + /** + * Specifies the minimum retry concurrency allowed for the retry budget. The limit on the + * number of active retries may never go below this number. + * + * This parameter is optional. Defaults to 3. + */ + 'min_retry_concurrency'?: (_google_protobuf_UInt32Value); +} + +export interface _envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget__Output { + /** + * Specifies the limit on concurrent retries as a percentage of the sum of active requests and + * active pending requests. For example, if there are 100 active requests and the + * budget_percent is set to 25, there may be 25 active retries. + * + * This parameter is optional. Defaults to 20%. + */ + 'budget_percent'?: (_envoy_type_Percent__Output); + /** + * Specifies the minimum retry concurrency allowed for the retry budget. The limit on the + * number of active retries may never go below this number. + * + * This parameter is optional. Defaults to 3. + */ + 'min_retry_concurrency'?: (_google_protobuf_UInt32Value__Output); +} + +/** + * A Thresholds defines CircuitBreaker settings for a + * :ref:`RoutingPriority`. + * [#next-free-field: 9] + */ +export interface _envoy_api_v2_cluster_CircuitBreakers_Thresholds { + /** + * The :ref:`RoutingPriority` + * the specified CircuitBreaker settings apply to. + */ + 'priority'?: (_envoy_api_v2_core_RoutingPriority | keyof typeof _envoy_api_v2_core_RoutingPriority); + /** + * The maximum number of connections that Envoy will make to the upstream + * cluster. If not specified, the default is 1024. + */ + 'max_connections'?: (_google_protobuf_UInt32Value); + /** + * The maximum number of pending requests that Envoy will allow to the + * upstream cluster. If not specified, the default is 1024. + */ + 'max_pending_requests'?: (_google_protobuf_UInt32Value); + /** + * The maximum number of parallel requests that Envoy will make to the + * upstream cluster. If not specified, the default is 1024. + */ + 'max_requests'?: (_google_protobuf_UInt32Value); + /** + * The maximum number of parallel retries that Envoy will allow to the + * upstream cluster. If not specified, the default is 3. + */ + 'max_retries'?: (_google_protobuf_UInt32Value); + /** + * Specifies a limit on concurrent retries in relation to the number of active requests. This + * parameter is optional. + * + * .. note:: + * + * If this field is set, the retry budget will override any configured retry circuit + * breaker. + */ + 'retry_budget'?: (_envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget); + /** + * If track_remaining is true, then stats will be published that expose + * the number of resources remaining until the circuit breakers open. If + * not specified, the default is false. + * + * .. note:: + * + * If a retry budget is used in lieu of the max_retries circuit breaker, + * the remaining retry resources remaining will not be tracked. + */ + 'track_remaining'?: (boolean); + /** + * The maximum number of connection pools per cluster that Envoy will concurrently support at + * once. If not specified, the default is unlimited. Set this for clusters which create a + * large number of connection pools. See + * :ref:`Circuit Breaking ` for + * more details. + */ + 'max_connection_pools'?: (_google_protobuf_UInt32Value); +} + +/** + * A Thresholds defines CircuitBreaker settings for a + * :ref:`RoutingPriority`. + * [#next-free-field: 9] + */ +export interface _envoy_api_v2_cluster_CircuitBreakers_Thresholds__Output { + /** + * The :ref:`RoutingPriority` + * the specified CircuitBreaker settings apply to. + */ + 'priority': (keyof typeof _envoy_api_v2_core_RoutingPriority); + /** + * The maximum number of connections that Envoy will make to the upstream + * cluster. If not specified, the default is 1024. + */ + 'max_connections'?: (_google_protobuf_UInt32Value__Output); + /** + * The maximum number of pending requests that Envoy will allow to the + * upstream cluster. If not specified, the default is 1024. + */ + 'max_pending_requests'?: (_google_protobuf_UInt32Value__Output); + /** + * The maximum number of parallel requests that Envoy will make to the + * upstream cluster. If not specified, the default is 1024. + */ + 'max_requests'?: (_google_protobuf_UInt32Value__Output); + /** + * The maximum number of parallel retries that Envoy will allow to the + * upstream cluster. If not specified, the default is 3. + */ + 'max_retries'?: (_google_protobuf_UInt32Value__Output); + /** + * Specifies a limit on concurrent retries in relation to the number of active requests. This + * parameter is optional. + * + * .. note:: + * + * If this field is set, the retry budget will override any configured retry circuit + * breaker. + */ + 'retry_budget'?: (_envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget__Output); + /** + * If track_remaining is true, then stats will be published that expose + * the number of resources remaining until the circuit breakers open. If + * not specified, the default is false. + * + * .. note:: + * + * If a retry budget is used in lieu of the max_retries circuit breaker, + * the remaining retry resources remaining will not be tracked. + */ + 'track_remaining': (boolean); + /** + * The maximum number of connection pools per cluster that Envoy will concurrently support at + * once. If not specified, the default is unlimited. Set this for clusters which create a + * large number of connection pools. See + * :ref:`Circuit Breaking ` for + * more details. + */ + 'max_connection_pools'?: (_google_protobuf_UInt32Value__Output); +} + +/** + * :ref:`Circuit breaking` settings can be + * specified individually for each defined priority. + */ +export interface CircuitBreakers { + /** + * If multiple :ref:`Thresholds` + * are defined with the same :ref:`RoutingPriority`, + * the first one in the list is used. If no Thresholds is defined for a given + * :ref:`RoutingPriority`, the default values + * are used. + */ + 'thresholds'?: (_envoy_api_v2_cluster_CircuitBreakers_Thresholds)[]; +} + +/** + * :ref:`Circuit breaking` settings can be + * specified individually for each defined priority. + */ +export interface CircuitBreakers__Output { + /** + * If multiple :ref:`Thresholds` + * are defined with the same :ref:`RoutingPriority`, + * the first one in the list is used. If no Thresholds is defined for a given + * :ref:`RoutingPriority`, the default values + * are used. + */ + 'thresholds': (_envoy_api_v2_cluster_CircuitBreakers_Thresholds__Output)[]; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/cluster/Filter.ts b/packages/grpc-js/src/generated/envoy/api/v2/cluster/Filter.ts new file mode 100644 index 000000000..225928629 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/cluster/Filter.ts @@ -0,0 +1,29 @@ +// Original file: deps/envoy-api/envoy/api/v2/cluster/filter.proto + +import { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../../google/protobuf/Any'; + +export interface Filter { + /** + * The name of the filter to instantiate. The name must match a + * :ref:`supported filter `. + */ + 'name'?: (string); + /** + * Filter specific configuration which depends on the filter being + * instantiated. See the supported filters for further documentation. + */ + 'typed_config'?: (_google_protobuf_Any); +} + +export interface Filter__Output { + /** + * The name of the filter to instantiate. The name must match a + * :ref:`supported filter `. + */ + 'name': (string); + /** + * Filter specific configuration which depends on the filter being + * instantiated. See the supported filters for further documentation. + */ + 'typed_config'?: (_google_protobuf_Any__Output); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/cluster/OutlierDetection.ts b/packages/grpc-js/src/generated/envoy/api/v2/cluster/OutlierDetection.ts new file mode 100644 index 000000000..995b01180 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/cluster/OutlierDetection.ts @@ -0,0 +1,300 @@ +// Original file: deps/envoy-api/envoy/api/v2/cluster/outlier_detection.proto + +import { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output as _google_protobuf_UInt32Value__Output } from '../../../../google/protobuf/UInt32Value'; +import { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from '../../../../google/protobuf/Duration'; + +/** + * See the :ref:`architecture overview ` for + * more information on outlier detection. + * [#next-free-field: 21] + */ +export interface OutlierDetection { + /** + * The number of consecutive 5xx responses or local origin errors that are mapped + * to 5xx error codes before a consecutive 5xx ejection + * occurs. Defaults to 5. + */ + 'consecutive_5xx'?: (_google_protobuf_UInt32Value); + /** + * The time interval between ejection analysis sweeps. This can result in + * both new ejections as well as hosts being returned to service. Defaults + * to 10000ms or 10s. + */ + 'interval'?: (_google_protobuf_Duration); + /** + * The base time that a host is ejected for. The real time is equal to the + * base time multiplied by the number of times the host has been ejected. + * Defaults to 30000ms or 30s. + */ + 'base_ejection_time'?: (_google_protobuf_Duration); + /** + * The maximum % of an upstream cluster that can be ejected due to outlier + * detection. Defaults to 10% but will eject at least one host regardless of the value. + */ + 'max_ejection_percent'?: (_google_protobuf_UInt32Value); + /** + * The % chance that a host will be actually ejected when an outlier status + * is detected through consecutive 5xx. This setting can be used to disable + * ejection or to ramp it up slowly. Defaults to 100. + */ + 'enforcing_consecutive_5xx'?: (_google_protobuf_UInt32Value); + /** + * The % chance that a host will be actually ejected when an outlier status + * is detected through success rate statistics. This setting can be used to + * disable ejection or to ramp it up slowly. Defaults to 100. + */ + 'enforcing_success_rate'?: (_google_protobuf_UInt32Value); + /** + * The number of hosts in a cluster that must have enough request volume to + * detect success rate outliers. If the number of hosts is less than this + * setting, outlier detection via success rate statistics is not performed + * for any host in the cluster. Defaults to 5. + */ + 'success_rate_minimum_hosts'?: (_google_protobuf_UInt32Value); + /** + * The minimum number of total requests that must be collected in one + * interval (as defined by the interval duration above) to include this host + * in success rate based outlier detection. If the volume is lower than this + * setting, outlier detection via success rate statistics is not performed + * for that host. Defaults to 100. + */ + 'success_rate_request_volume'?: (_google_protobuf_UInt32Value); + /** + * This factor is used to determine the ejection threshold for success rate + * outlier ejection. The ejection threshold is the difference between the + * mean success rate, and the product of this factor and the standard + * deviation of the mean success rate: mean - (stdev * + * success_rate_stdev_factor). This factor is divided by a thousand to get a + * double. That is, if the desired factor is 1.9, the runtime value should + * be 1900. Defaults to 1900. + */ + 'success_rate_stdev_factor'?: (_google_protobuf_UInt32Value); + /** + * The number of consecutive gateway failures (502, 503, 504 status codes) + * before a consecutive gateway failure ejection occurs. Defaults to 5. + */ + 'consecutive_gateway_failure'?: (_google_protobuf_UInt32Value); + /** + * The % chance that a host will be actually ejected when an outlier status + * is detected through consecutive gateway failures. This setting can be + * used to disable ejection or to ramp it up slowly. Defaults to 0. + */ + 'enforcing_consecutive_gateway_failure'?: (_google_protobuf_UInt32Value); + /** + * Determines whether to distinguish local origin failures from external errors. If set to true + * the following configuration parameters are taken into account: + * :ref:`consecutive_local_origin_failure`, + * :ref:`enforcing_consecutive_local_origin_failure` + * and + * :ref:`enforcing_local_origin_success_rate`. + * Defaults to false. + */ + 'split_external_local_origin_errors'?: (boolean); + /** + * The number of consecutive locally originated failures before ejection + * occurs. Defaults to 5. Parameter takes effect only when + * :ref:`split_external_local_origin_errors` + * is set to true. + */ + 'consecutive_local_origin_failure'?: (_google_protobuf_UInt32Value); + /** + * The % chance that a host will be actually ejected when an outlier status + * is detected through consecutive locally originated failures. This setting can be + * used to disable ejection or to ramp it up slowly. Defaults to 100. + * Parameter takes effect only when + * :ref:`split_external_local_origin_errors` + * is set to true. + */ + 'enforcing_consecutive_local_origin_failure'?: (_google_protobuf_UInt32Value); + /** + * The % chance that a host will be actually ejected when an outlier status + * is detected through success rate statistics for locally originated errors. + * This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100. + * Parameter takes effect only when + * :ref:`split_external_local_origin_errors` + * is set to true. + */ + 'enforcing_local_origin_success_rate'?: (_google_protobuf_UInt32Value); + /** + * The failure percentage to use when determining failure percentage-based outlier detection. If + * the failure percentage of a given host is greater than or equal to this value, it will be + * ejected. Defaults to 85. + */ + 'failure_percentage_threshold'?: (_google_protobuf_UInt32Value); + /** + * The % chance that a host will be actually ejected when an outlier status is detected through + * failure percentage statistics. This setting can be used to disable ejection or to ramp it up + * slowly. Defaults to 0. + * + * [#next-major-version: setting this without setting failure_percentage_threshold should be + * invalid in v4.] + */ + 'enforcing_failure_percentage'?: (_google_protobuf_UInt32Value); + /** + * The % chance that a host will be actually ejected when an outlier status is detected through + * local-origin failure percentage statistics. This setting can be used to disable ejection or to + * ramp it up slowly. Defaults to 0. + */ + 'enforcing_failure_percentage_local_origin'?: (_google_protobuf_UInt32Value); + /** + * The minimum number of hosts in a cluster in order to perform failure percentage-based ejection. + * If the total number of hosts in the cluster is less than this value, failure percentage-based + * ejection will not be performed. Defaults to 5. + */ + 'failure_percentage_minimum_hosts'?: (_google_protobuf_UInt32Value); + /** + * The minimum number of total requests that must be collected in one interval (as defined by the + * interval duration above) to perform failure percentage-based ejection for this host. If the + * volume is lower than this setting, failure percentage-based ejection will not be performed for + * this host. Defaults to 50. + */ + 'failure_percentage_request_volume'?: (_google_protobuf_UInt32Value); +} + +/** + * See the :ref:`architecture overview ` for + * more information on outlier detection. + * [#next-free-field: 21] + */ +export interface OutlierDetection__Output { + /** + * The number of consecutive 5xx responses or local origin errors that are mapped + * to 5xx error codes before a consecutive 5xx ejection + * occurs. Defaults to 5. + */ + 'consecutive_5xx'?: (_google_protobuf_UInt32Value__Output); + /** + * The time interval between ejection analysis sweeps. This can result in + * both new ejections as well as hosts being returned to service. Defaults + * to 10000ms or 10s. + */ + 'interval'?: (_google_protobuf_Duration__Output); + /** + * The base time that a host is ejected for. The real time is equal to the + * base time multiplied by the number of times the host has been ejected. + * Defaults to 30000ms or 30s. + */ + 'base_ejection_time'?: (_google_protobuf_Duration__Output); + /** + * The maximum % of an upstream cluster that can be ejected due to outlier + * detection. Defaults to 10% but will eject at least one host regardless of the value. + */ + 'max_ejection_percent'?: (_google_protobuf_UInt32Value__Output); + /** + * The % chance that a host will be actually ejected when an outlier status + * is detected through consecutive 5xx. This setting can be used to disable + * ejection or to ramp it up slowly. Defaults to 100. + */ + 'enforcing_consecutive_5xx'?: (_google_protobuf_UInt32Value__Output); + /** + * The % chance that a host will be actually ejected when an outlier status + * is detected through success rate statistics. This setting can be used to + * disable ejection or to ramp it up slowly. Defaults to 100. + */ + 'enforcing_success_rate'?: (_google_protobuf_UInt32Value__Output); + /** + * The number of hosts in a cluster that must have enough request volume to + * detect success rate outliers. If the number of hosts is less than this + * setting, outlier detection via success rate statistics is not performed + * for any host in the cluster. Defaults to 5. + */ + 'success_rate_minimum_hosts'?: (_google_protobuf_UInt32Value__Output); + /** + * The minimum number of total requests that must be collected in one + * interval (as defined by the interval duration above) to include this host + * in success rate based outlier detection. If the volume is lower than this + * setting, outlier detection via success rate statistics is not performed + * for that host. Defaults to 100. + */ + 'success_rate_request_volume'?: (_google_protobuf_UInt32Value__Output); + /** + * This factor is used to determine the ejection threshold for success rate + * outlier ejection. The ejection threshold is the difference between the + * mean success rate, and the product of this factor and the standard + * deviation of the mean success rate: mean - (stdev * + * success_rate_stdev_factor). This factor is divided by a thousand to get a + * double. That is, if the desired factor is 1.9, the runtime value should + * be 1900. Defaults to 1900. + */ + 'success_rate_stdev_factor'?: (_google_protobuf_UInt32Value__Output); + /** + * The number of consecutive gateway failures (502, 503, 504 status codes) + * before a consecutive gateway failure ejection occurs. Defaults to 5. + */ + 'consecutive_gateway_failure'?: (_google_protobuf_UInt32Value__Output); + /** + * The % chance that a host will be actually ejected when an outlier status + * is detected through consecutive gateway failures. This setting can be + * used to disable ejection or to ramp it up slowly. Defaults to 0. + */ + 'enforcing_consecutive_gateway_failure'?: (_google_protobuf_UInt32Value__Output); + /** + * Determines whether to distinguish local origin failures from external errors. If set to true + * the following configuration parameters are taken into account: + * :ref:`consecutive_local_origin_failure`, + * :ref:`enforcing_consecutive_local_origin_failure` + * and + * :ref:`enforcing_local_origin_success_rate`. + * Defaults to false. + */ + 'split_external_local_origin_errors': (boolean); + /** + * The number of consecutive locally originated failures before ejection + * occurs. Defaults to 5. Parameter takes effect only when + * :ref:`split_external_local_origin_errors` + * is set to true. + */ + 'consecutive_local_origin_failure'?: (_google_protobuf_UInt32Value__Output); + /** + * The % chance that a host will be actually ejected when an outlier status + * is detected through consecutive locally originated failures. This setting can be + * used to disable ejection or to ramp it up slowly. Defaults to 100. + * Parameter takes effect only when + * :ref:`split_external_local_origin_errors` + * is set to true. + */ + 'enforcing_consecutive_local_origin_failure'?: (_google_protobuf_UInt32Value__Output); + /** + * The % chance that a host will be actually ejected when an outlier status + * is detected through success rate statistics for locally originated errors. + * This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100. + * Parameter takes effect only when + * :ref:`split_external_local_origin_errors` + * is set to true. + */ + 'enforcing_local_origin_success_rate'?: (_google_protobuf_UInt32Value__Output); + /** + * The failure percentage to use when determining failure percentage-based outlier detection. If + * the failure percentage of a given host is greater than or equal to this value, it will be + * ejected. Defaults to 85. + */ + 'failure_percentage_threshold'?: (_google_protobuf_UInt32Value__Output); + /** + * The % chance that a host will be actually ejected when an outlier status is detected through + * failure percentage statistics. This setting can be used to disable ejection or to ramp it up + * slowly. Defaults to 0. + * + * [#next-major-version: setting this without setting failure_percentage_threshold should be + * invalid in v4.] + */ + 'enforcing_failure_percentage'?: (_google_protobuf_UInt32Value__Output); + /** + * The % chance that a host will be actually ejected when an outlier status is detected through + * local-origin failure percentage statistics. This setting can be used to disable ejection or to + * ramp it up slowly. Defaults to 0. + */ + 'enforcing_failure_percentage_local_origin'?: (_google_protobuf_UInt32Value__Output); + /** + * The minimum number of hosts in a cluster in order to perform failure percentage-based ejection. + * If the total number of hosts in the cluster is less than this value, failure percentage-based + * ejection will not be performed. Defaults to 5. + */ + 'failure_percentage_minimum_hosts'?: (_google_protobuf_UInt32Value__Output); + /** + * The minimum number of total requests that must be collected in one interval (as defined by the + * interval duration above) to perform failure percentage-based ejection for this host. If the + * volume is lower than this setting, failure percentage-based ejection will not be performed for + * this host. Defaults to 50. + */ + 'failure_percentage_request_volume'?: (_google_protobuf_UInt32Value__Output); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/Address.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/Address.ts new file mode 100644 index 000000000..4ccd1e892 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/Address.ts @@ -0,0 +1,26 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/address.proto + +import { SocketAddress as _envoy_api_v2_core_SocketAddress, SocketAddress__Output as _envoy_api_v2_core_SocketAddress__Output } from '../../../../envoy/api/v2/core/SocketAddress'; +import { Pipe as _envoy_api_v2_core_Pipe, Pipe__Output as _envoy_api_v2_core_Pipe__Output } from '../../../../envoy/api/v2/core/Pipe'; + +/** + * Addresses specify either a logical or physical address and port, which are + * used to tell Envoy where to bind/listen, connect to upstream and find + * management servers. + */ +export interface Address { + 'socket_address'?: (_envoy_api_v2_core_SocketAddress); + 'pipe'?: (_envoy_api_v2_core_Pipe); + 'address'?: "socket_address"|"pipe"; +} + +/** + * Addresses specify either a logical or physical address and port, which are + * used to tell Envoy where to bind/listen, connect to upstream and find + * management servers. + */ +export interface Address__Output { + 'socket_address'?: (_envoy_api_v2_core_SocketAddress__Output); + 'pipe'?: (_envoy_api_v2_core_Pipe__Output); + 'address': "socket_address"|"pipe"; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/AggregatedConfigSource.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/AggregatedConfigSource.ts new file mode 100644 index 000000000..6837dd0db --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/AggregatedConfigSource.ts @@ -0,0 +1,18 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/config_source.proto + + +/** + * Aggregated Discovery Service (ADS) options. This is currently empty, but when + * set in :ref:`ConfigSource ` can be used to + * specify that ADS is to be used. + */ +export interface AggregatedConfigSource { +} + +/** + * Aggregated Discovery Service (ADS) options. This is currently empty, but when + * set in :ref:`ConfigSource ` can be used to + * specify that ADS is to be used. + */ +export interface AggregatedConfigSource__Output { +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/ApiConfigSource.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/ApiConfigSource.ts new file mode 100644 index 000000000..b6906acd5 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/ApiConfigSource.ts @@ -0,0 +1,135 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/config_source.proto + +import { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from '../../../../google/protobuf/Duration'; +import { GrpcService as _envoy_api_v2_core_GrpcService, GrpcService__Output as _envoy_api_v2_core_GrpcService__Output } from '../../../../envoy/api/v2/core/GrpcService'; +import { RateLimitSettings as _envoy_api_v2_core_RateLimitSettings, RateLimitSettings__Output as _envoy_api_v2_core_RateLimitSettings__Output } from '../../../../envoy/api/v2/core/RateLimitSettings'; +import { ApiVersion as _envoy_api_v2_core_ApiVersion } from '../../../../envoy/api/v2/core/ApiVersion'; + +// Original file: deps/envoy-api/envoy/api/v2/core/config_source.proto + +/** + * APIs may be fetched via either REST or gRPC. + */ +export enum _envoy_api_v2_core_ApiConfigSource_ApiType { + /** + * Ideally this would be 'reserved 0' but one can't reserve the default + * value. Instead we throw an exception if this is ever used. + */ + UNSUPPORTED_REST_LEGACY = 0, + /** + * REST-JSON v2 API. The `canonical JSON encoding + * `_ for + * the v2 protos is used. + */ + REST = 1, + /** + * gRPC v2 API. + */ + GRPC = 2, + /** + * Using the delta xDS gRPC service, i.e. DeltaDiscovery{Request,Response} + * rather than Discovery{Request,Response}. Rather than sending Envoy the entire state + * with every update, the xDS server only sends what has changed since the last update. + */ + DELTA_GRPC = 3, +} + +/** + * API configuration source. This identifies the API type and cluster that Envoy + * will use to fetch an xDS API. + * [#next-free-field: 9] + */ +export interface ApiConfigSource { + /** + * API type (gRPC, REST, delta gRPC) + */ + 'api_type'?: (_envoy_api_v2_core_ApiConfigSource_ApiType | keyof typeof _envoy_api_v2_core_ApiConfigSource_ApiType); + /** + * Cluster names should be used only with REST. If > 1 + * cluster is defined, clusters will be cycled through if any kind of failure + * occurs. + * + * .. note:: + * + * The cluster with name ``cluster_name`` must be statically defined and its + * type must not be ``EDS``. + */ + 'cluster_names'?: (string)[]; + /** + * For REST APIs, the delay between successive polls. + */ + 'refresh_delay'?: (_google_protobuf_Duration); + /** + * Multiple gRPC services be provided for GRPC. If > 1 cluster is defined, + * services will be cycled through if any kind of failure occurs. + */ + 'grpc_services'?: (_envoy_api_v2_core_GrpcService)[]; + /** + * For REST APIs, the request timeout. If not set, a default value of 1s will be used. + */ + 'request_timeout'?: (_google_protobuf_Duration); + /** + * For GRPC APIs, the rate limit settings. If present, discovery requests made by Envoy will be + * rate limited. + */ + 'rate_limit_settings'?: (_envoy_api_v2_core_RateLimitSettings); + /** + * Skip the node identifier in subsequent discovery requests for streaming gRPC config types. + */ + 'set_node_on_first_message_only'?: (boolean); + /** + * API version for xDS transport protocol. This describes the xDS gRPC/REST + * endpoint and version of [Delta]DiscoveryRequest/Response used on the wire. + */ + 'transport_api_version'?: (_envoy_api_v2_core_ApiVersion | keyof typeof _envoy_api_v2_core_ApiVersion); +} + +/** + * API configuration source. This identifies the API type and cluster that Envoy + * will use to fetch an xDS API. + * [#next-free-field: 9] + */ +export interface ApiConfigSource__Output { + /** + * API type (gRPC, REST, delta gRPC) + */ + 'api_type': (keyof typeof _envoy_api_v2_core_ApiConfigSource_ApiType); + /** + * Cluster names should be used only with REST. If > 1 + * cluster is defined, clusters will be cycled through if any kind of failure + * occurs. + * + * .. note:: + * + * The cluster with name ``cluster_name`` must be statically defined and its + * type must not be ``EDS``. + */ + 'cluster_names': (string)[]; + /** + * For REST APIs, the delay between successive polls. + */ + 'refresh_delay'?: (_google_protobuf_Duration__Output); + /** + * Multiple gRPC services be provided for GRPC. If > 1 cluster is defined, + * services will be cycled through if any kind of failure occurs. + */ + 'grpc_services': (_envoy_api_v2_core_GrpcService__Output)[]; + /** + * For REST APIs, the request timeout. If not set, a default value of 1s will be used. + */ + 'request_timeout'?: (_google_protobuf_Duration__Output); + /** + * For GRPC APIs, the rate limit settings. If present, discovery requests made by Envoy will be + * rate limited. + */ + 'rate_limit_settings'?: (_envoy_api_v2_core_RateLimitSettings__Output); + /** + * Skip the node identifier in subsequent discovery requests for streaming gRPC config types. + */ + 'set_node_on_first_message_only': (boolean); + /** + * API version for xDS transport protocol. This describes the xDS gRPC/REST + * endpoint and version of [Delta]DiscoveryRequest/Response used on the wire. + */ + 'transport_api_version': (keyof typeof _envoy_api_v2_core_ApiVersion); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/ApiVersion.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/ApiVersion.ts new file mode 100644 index 000000000..7f03a5995 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/ApiVersion.ts @@ -0,0 +1,22 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/config_source.proto + +/** + * xDS API version. This is used to describe both resource and transport + * protocol versions (in distinct configuration fields). + */ +export enum ApiVersion { + /** + * When not specified, we assume v2, to ease migration to Envoy's stable API + * versioning. If a client does not support v2 (e.g. due to deprecation), this + * is an invalid value. + */ + AUTO = 0, + /** + * Use xDS v2 API. + */ + V2 = 1, + /** + * Use xDS v3 API. + */ + V3 = 2, +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/AsyncDataSource.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/AsyncDataSource.ts new file mode 100644 index 000000000..c4de49ee0 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/AsyncDataSource.ts @@ -0,0 +1,34 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/base.proto + +import { DataSource as _envoy_api_v2_core_DataSource, DataSource__Output as _envoy_api_v2_core_DataSource__Output } from '../../../../envoy/api/v2/core/DataSource'; +import { RemoteDataSource as _envoy_api_v2_core_RemoteDataSource, RemoteDataSource__Output as _envoy_api_v2_core_RemoteDataSource__Output } from '../../../../envoy/api/v2/core/RemoteDataSource'; + +/** + * Async data source which support async data fetch. + */ +export interface AsyncDataSource { + /** + * Local async data source. + */ + 'local'?: (_envoy_api_v2_core_DataSource); + /** + * Remote async data source. + */ + 'remote'?: (_envoy_api_v2_core_RemoteDataSource); + 'specifier'?: "local"|"remote"; +} + +/** + * Async data source which support async data fetch. + */ +export interface AsyncDataSource__Output { + /** + * Local async data source. + */ + 'local'?: (_envoy_api_v2_core_DataSource__Output); + /** + * Remote async data source. + */ + 'remote'?: (_envoy_api_v2_core_RemoteDataSource__Output); + 'specifier': "local"|"remote"; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/BackoffStrategy.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/BackoffStrategy.ts new file mode 100644 index 000000000..3e8c6dd49 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/BackoffStrategy.ts @@ -0,0 +1,43 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/backoff.proto + +import { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from '../../../../google/protobuf/Duration'; + +/** + * Configuration defining a jittered exponential back off strategy. + */ +export interface BackoffStrategy { + /** + * The base interval to be used for the next back off computation. It should + * be greater than zero and less than or equal to :ref:`max_interval + * `. + */ + 'base_interval'?: (_google_protobuf_Duration); + /** + * Specifies the maximum interval between retries. This parameter is optional, + * but must be greater than or equal to the :ref:`base_interval + * ` if set. The default + * is 10 times the :ref:`base_interval + * `. + */ + 'max_interval'?: (_google_protobuf_Duration); +} + +/** + * Configuration defining a jittered exponential back off strategy. + */ +export interface BackoffStrategy__Output { + /** + * The base interval to be used for the next back off computation. It should + * be greater than zero and less than or equal to :ref:`max_interval + * `. + */ + 'base_interval'?: (_google_protobuf_Duration__Output); + /** + * Specifies the maximum interval between retries. This parameter is optional, + * but must be greater than or equal to the :ref:`base_interval + * ` if set. The default + * is 10 times the :ref:`base_interval + * `. + */ + 'max_interval'?: (_google_protobuf_Duration__Output); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/BindConfig.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/BindConfig.ts new file mode 100644 index 000000000..8b8451080 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/BindConfig.ts @@ -0,0 +1,49 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/address.proto + +import { SocketAddress as _envoy_api_v2_core_SocketAddress, SocketAddress__Output as _envoy_api_v2_core_SocketAddress__Output } from '../../../../envoy/api/v2/core/SocketAddress'; +import { BoolValue as _google_protobuf_BoolValue, BoolValue__Output as _google_protobuf_BoolValue__Output } from '../../../../google/protobuf/BoolValue'; +import { SocketOption as _envoy_api_v2_core_SocketOption, SocketOption__Output as _envoy_api_v2_core_SocketOption__Output } from '../../../../envoy/api/v2/core/SocketOption'; + +export interface BindConfig { + /** + * The address to bind to when creating a socket. + */ + 'source_address'?: (_envoy_api_v2_core_SocketAddress); + /** + * Whether to set the *IP_FREEBIND* option when creating the socket. When this + * flag is set to true, allows the :ref:`source_address + * ` to be an IP address + * that is not configured on the system running Envoy. When this flag is set + * to false, the option *IP_FREEBIND* is disabled on the socket. When this + * flag is not set (default), the socket is not modified, i.e. the option is + * neither enabled nor disabled. + */ + 'freebind'?: (_google_protobuf_BoolValue); + /** + * Additional socket options that may not be present in Envoy source code or + * precompiled binaries. + */ + 'socket_options'?: (_envoy_api_v2_core_SocketOption)[]; +} + +export interface BindConfig__Output { + /** + * The address to bind to when creating a socket. + */ + 'source_address'?: (_envoy_api_v2_core_SocketAddress__Output); + /** + * Whether to set the *IP_FREEBIND* option when creating the socket. When this + * flag is set to true, allows the :ref:`source_address + * ` to be an IP address + * that is not configured on the system running Envoy. When this flag is set + * to false, the option *IP_FREEBIND* is disabled on the socket. When this + * flag is not set (default), the socket is not modified, i.e. the option is + * neither enabled nor disabled. + */ + 'freebind'?: (_google_protobuf_BoolValue__Output); + /** + * Additional socket options that may not be present in Envoy source code or + * precompiled binaries. + */ + 'socket_options': (_envoy_api_v2_core_SocketOption__Output)[]; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/BuildVersion.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/BuildVersion.ts new file mode 100644 index 000000000..b3b9a808d --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/BuildVersion.ts @@ -0,0 +1,36 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/base.proto + +import { SemanticVersion as _envoy_type_SemanticVersion, SemanticVersion__Output as _envoy_type_SemanticVersion__Output } from '../../../../envoy/type/SemanticVersion'; +import { Struct as _google_protobuf_Struct, Struct__Output as _google_protobuf_Struct__Output } from '../../../../google/protobuf/Struct'; + +/** + * BuildVersion combines SemVer version of extension with free-form build information + * (i.e. 'alpha', 'private-build') as a set of strings. + */ +export interface BuildVersion { + /** + * SemVer version of extension. + */ + 'version'?: (_envoy_type_SemanticVersion); + /** + * Free-form build information. + * Envoy defines several well known keys in the source/common/common/version.h file + */ + 'metadata'?: (_google_protobuf_Struct); +} + +/** + * BuildVersion combines SemVer version of extension with free-form build information + * (i.e. 'alpha', 'private-build') as a set of strings. + */ +export interface BuildVersion__Output { + /** + * SemVer version of extension. + */ + 'version'?: (_envoy_type_SemanticVersion__Output); + /** + * Free-form build information. + * Envoy defines several well known keys in the source/common/common/version.h file + */ + 'metadata'?: (_google_protobuf_Struct__Output); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/CidrRange.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/CidrRange.ts new file mode 100644 index 000000000..18b693fcf --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/CidrRange.ts @@ -0,0 +1,33 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/address.proto + +import { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output as _google_protobuf_UInt32Value__Output } from '../../../../google/protobuf/UInt32Value'; + +/** + * CidrRange specifies an IP Address and a prefix length to construct + * the subnet mask for a `CIDR `_ range. + */ +export interface CidrRange { + /** + * IPv4 or IPv6 address, e.g. ``192.0.0.0`` or ``2001:db8::``. + */ + 'address_prefix'?: (string); + /** + * Length of prefix, e.g. 0, 32. + */ + 'prefix_len'?: (_google_protobuf_UInt32Value); +} + +/** + * CidrRange specifies an IP Address and a prefix length to construct + * the subnet mask for a `CIDR `_ range. + */ +export interface CidrRange__Output { + /** + * IPv4 or IPv6 address, e.g. ``192.0.0.0`` or ``2001:db8::``. + */ + 'address_prefix': (string); + /** + * Length of prefix, e.g. 0, 32. + */ + 'prefix_len'?: (_google_protobuf_UInt32Value__Output); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/ConfigSource.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/ConfigSource.ts new file mode 100644 index 000000000..1e4bfa4cd --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/ConfigSource.ts @@ -0,0 +1,143 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/config_source.proto + +import { ApiConfigSource as _envoy_api_v2_core_ApiConfigSource, ApiConfigSource__Output as _envoy_api_v2_core_ApiConfigSource__Output } from '../../../../envoy/api/v2/core/ApiConfigSource'; +import { AggregatedConfigSource as _envoy_api_v2_core_AggregatedConfigSource, AggregatedConfigSource__Output as _envoy_api_v2_core_AggregatedConfigSource__Output } from '../../../../envoy/api/v2/core/AggregatedConfigSource'; +import { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from '../../../../google/protobuf/Duration'; +import { SelfConfigSource as _envoy_api_v2_core_SelfConfigSource, SelfConfigSource__Output as _envoy_api_v2_core_SelfConfigSource__Output } from '../../../../envoy/api/v2/core/SelfConfigSource'; +import { ApiVersion as _envoy_api_v2_core_ApiVersion } from '../../../../envoy/api/v2/core/ApiVersion'; + +/** + * Configuration for :ref:`listeners `, :ref:`clusters + * `, :ref:`routes + * `, :ref:`endpoints + * ` etc. may either be sourced from the + * filesystem or from an xDS API source. Filesystem configs are watched with + * inotify for updates. + * [#next-free-field: 7] + */ +export interface ConfigSource { + /** + * Path on the filesystem to source and watch for configuration updates. + * When sourcing configuration for :ref:`secret `, + * the certificate and key files are also watched for updates. + * + * .. note:: + * + * The path to the source must exist at config load time. + * + * .. note:: + * + * Envoy will only watch the file path for *moves.* This is because in general only moves + * are atomic. The same method of swapping files as is demonstrated in the + * :ref:`runtime documentation ` can be used here also. + */ + 'path'?: (string); + /** + * API configuration source. + */ + 'api_config_source'?: (_envoy_api_v2_core_ApiConfigSource); + /** + * When set, ADS will be used to fetch resources. The ADS API configuration + * source in the bootstrap configuration is used. + */ + 'ads'?: (_envoy_api_v2_core_AggregatedConfigSource); + /** + * When this timeout is specified, Envoy will wait no longer than the specified time for first + * config response on this xDS subscription during the :ref:`initialization process + * `. After reaching the timeout, Envoy will move to the next + * initialization phase, even if the first config is not delivered yet. The timer is activated + * when the xDS API subscription starts, and is disarmed on first config update or on error. 0 + * means no timeout - Envoy will wait indefinitely for the first xDS config (unless another + * timeout applies). The default is 15s. + */ + 'initial_fetch_timeout'?: (_google_protobuf_Duration); + /** + * [#not-implemented-hide:] + * When set, the client will access the resources from the same server it got the + * ConfigSource from, although not necessarily from the same stream. This is similar to the + * :ref:`ads` field, except that the client may use a + * different stream to the same server. As a result, this field can be used for things + * like LRS that cannot be sent on an ADS stream. It can also be used to link from (e.g.) + * LDS to RDS on the same server without requiring the management server to know its name + * or required credentials. + * [#next-major-version: In xDS v3, consider replacing the ads field with this one, since + * this field can implicitly mean to use the same stream in the case where the ConfigSource + * is provided via ADS and the specified data can also be obtained via ADS.] + */ + 'self'?: (_envoy_api_v2_core_SelfConfigSource); + /** + * API version for xDS resources. This implies the type URLs that the client + * will request for resources and the resource type that the client will in + * turn expect to be delivered. + */ + 'resource_api_version'?: (_envoy_api_v2_core_ApiVersion | keyof typeof _envoy_api_v2_core_ApiVersion); + 'config_source_specifier'?: "path"|"api_config_source"|"ads"|"self"; +} + +/** + * Configuration for :ref:`listeners `, :ref:`clusters + * `, :ref:`routes + * `, :ref:`endpoints + * ` etc. may either be sourced from the + * filesystem or from an xDS API source. Filesystem configs are watched with + * inotify for updates. + * [#next-free-field: 7] + */ +export interface ConfigSource__Output { + /** + * Path on the filesystem to source and watch for configuration updates. + * When sourcing configuration for :ref:`secret `, + * the certificate and key files are also watched for updates. + * + * .. note:: + * + * The path to the source must exist at config load time. + * + * .. note:: + * + * Envoy will only watch the file path for *moves.* This is because in general only moves + * are atomic. The same method of swapping files as is demonstrated in the + * :ref:`runtime documentation ` can be used here also. + */ + 'path'?: (string); + /** + * API configuration source. + */ + 'api_config_source'?: (_envoy_api_v2_core_ApiConfigSource__Output); + /** + * When set, ADS will be used to fetch resources. The ADS API configuration + * source in the bootstrap configuration is used. + */ + 'ads'?: (_envoy_api_v2_core_AggregatedConfigSource__Output); + /** + * When this timeout is specified, Envoy will wait no longer than the specified time for first + * config response on this xDS subscription during the :ref:`initialization process + * `. After reaching the timeout, Envoy will move to the next + * initialization phase, even if the first config is not delivered yet. The timer is activated + * when the xDS API subscription starts, and is disarmed on first config update or on error. 0 + * means no timeout - Envoy will wait indefinitely for the first xDS config (unless another + * timeout applies). The default is 15s. + */ + 'initial_fetch_timeout'?: (_google_protobuf_Duration__Output); + /** + * [#not-implemented-hide:] + * When set, the client will access the resources from the same server it got the + * ConfigSource from, although not necessarily from the same stream. This is similar to the + * :ref:`ads` field, except that the client may use a + * different stream to the same server. As a result, this field can be used for things + * like LRS that cannot be sent on an ADS stream. It can also be used to link from (e.g.) + * LDS to RDS on the same server without requiring the management server to know its name + * or required credentials. + * [#next-major-version: In xDS v3, consider replacing the ads field with this one, since + * this field can implicitly mean to use the same stream in the case where the ConfigSource + * is provided via ADS and the specified data can also be obtained via ADS.] + */ + 'self'?: (_envoy_api_v2_core_SelfConfigSource__Output); + /** + * API version for xDS resources. This implies the type URLs that the client + * will request for resources and the resource type that the client will in + * turn expect to be delivered. + */ + 'resource_api_version': (keyof typeof _envoy_api_v2_core_ApiVersion); + 'config_source_specifier': "path"|"api_config_source"|"ads"|"self"; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/ControlPlane.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/ControlPlane.ts new file mode 100644 index 000000000..551f693a2 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/ControlPlane.ts @@ -0,0 +1,26 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/base.proto + + +/** + * Identifies a specific ControlPlane instance that Envoy is connected to. + */ +export interface ControlPlane { + /** + * An opaque control plane identifier that uniquely identifies an instance + * of control plane. This can be used to identify which control plane instance, + * the Envoy is connected to. + */ + 'identifier'?: (string); +} + +/** + * Identifies a specific ControlPlane instance that Envoy is connected to. + */ +export interface ControlPlane__Output { + /** + * An opaque control plane identifier that uniquely identifies an instance + * of control plane. This can be used to identify which control plane instance, + * the Envoy is connected to. + */ + 'identifier': (string); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/DataSource.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/DataSource.ts new file mode 100644 index 000000000..a04100054 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/DataSource.ts @@ -0,0 +1,40 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/base.proto + + +/** + * Data source consisting of either a file or an inline value. + */ +export interface DataSource { + /** + * Local filesystem data source. + */ + 'filename'?: (string); + /** + * Bytes inlined in the configuration. + */ + 'inline_bytes'?: (Buffer | Uint8Array | string); + /** + * String inlined in the configuration. + */ + 'inline_string'?: (string); + 'specifier'?: "filename"|"inline_bytes"|"inline_string"; +} + +/** + * Data source consisting of either a file or an inline value. + */ +export interface DataSource__Output { + /** + * Local filesystem data source. + */ + 'filename'?: (string); + /** + * Bytes inlined in the configuration. + */ + 'inline_bytes'?: (Buffer); + /** + * String inlined in the configuration. + */ + 'inline_string'?: (string); + 'specifier': "filename"|"inline_bytes"|"inline_string"; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/EventServiceConfig.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/EventServiceConfig.ts new file mode 100644 index 000000000..3cba29184 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/EventServiceConfig.ts @@ -0,0 +1,27 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/event_service_config.proto + +import { GrpcService as _envoy_api_v2_core_GrpcService, GrpcService__Output as _envoy_api_v2_core_GrpcService__Output } from '../../../../envoy/api/v2/core/GrpcService'; + +/** + * [#not-implemented-hide:] + * Configuration of the event reporting service endpoint. + */ +export interface EventServiceConfig { + /** + * Specifies the gRPC service that hosts the event reporting service. + */ + 'grpc_service'?: (_envoy_api_v2_core_GrpcService); + 'config_source_specifier'?: "grpc_service"; +} + +/** + * [#not-implemented-hide:] + * Configuration of the event reporting service endpoint. + */ +export interface EventServiceConfig__Output { + /** + * Specifies the gRPC service that hosts the event reporting service. + */ + 'grpc_service'?: (_envoy_api_v2_core_GrpcService__Output); + 'config_source_specifier': "grpc_service"; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/Extension.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/Extension.ts new file mode 100644 index 000000000..3656f1f9a --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/Extension.ts @@ -0,0 +1,75 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/base.proto + +import { BuildVersion as _envoy_api_v2_core_BuildVersion, BuildVersion__Output as _envoy_api_v2_core_BuildVersion__Output } from '../../../../envoy/api/v2/core/BuildVersion'; + +/** + * Version and identification for an Envoy extension. + * [#next-free-field: 6] + */ +export interface Extension { + /** + * This is the name of the Envoy filter as specified in the Envoy + * configuration, e.g. envoy.filters.http.router, com.acme.widget. + */ + 'name'?: (string); + /** + * Category of the extension. + * Extension category names use reverse DNS notation. For instance "envoy.filters.listener" + * for Envoy's built-in listener filters or "com.acme.filters.http" for HTTP filters from + * acme.com vendor. + * [#comment:TODO(yanavlasov): Link to the doc with existing envoy category names.] + */ + 'category'?: (string); + /** + * [#not-implemented-hide:] Type descriptor of extension configuration proto. + * [#comment:TODO(yanavlasov): Link to the doc with existing configuration protos.] + * [#comment:TODO(yanavlasov): Add tests when PR #9391 lands.] + */ + 'type_descriptor'?: (string); + /** + * The version is a property of the extension and maintained independently + * of other extensions and the Envoy API. + * This field is not set when extension did not provide version information. + */ + 'version'?: (_envoy_api_v2_core_BuildVersion); + /** + * Indicates that the extension is present but was disabled via dynamic configuration. + */ + 'disabled'?: (boolean); +} + +/** + * Version and identification for an Envoy extension. + * [#next-free-field: 6] + */ +export interface Extension__Output { + /** + * This is the name of the Envoy filter as specified in the Envoy + * configuration, e.g. envoy.filters.http.router, com.acme.widget. + */ + 'name': (string); + /** + * Category of the extension. + * Extension category names use reverse DNS notation. For instance "envoy.filters.listener" + * for Envoy's built-in listener filters or "com.acme.filters.http" for HTTP filters from + * acme.com vendor. + * [#comment:TODO(yanavlasov): Link to the doc with existing envoy category names.] + */ + 'category': (string); + /** + * [#not-implemented-hide:] Type descriptor of extension configuration proto. + * [#comment:TODO(yanavlasov): Link to the doc with existing configuration protos.] + * [#comment:TODO(yanavlasov): Add tests when PR #9391 lands.] + */ + 'type_descriptor': (string); + /** + * The version is a property of the extension and maintained independently + * of other extensions and the Envoy API. + * This field is not set when extension did not provide version information. + */ + 'version'?: (_envoy_api_v2_core_BuildVersion__Output); + /** + * Indicates that the extension is present but was disabled via dynamic configuration. + */ + 'disabled': (boolean); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/GrpcProtocolOptions.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/GrpcProtocolOptions.ts new file mode 100644 index 000000000..038245239 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/GrpcProtocolOptions.ts @@ -0,0 +1,17 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/protocol.proto + +import { Http2ProtocolOptions as _envoy_api_v2_core_Http2ProtocolOptions, Http2ProtocolOptions__Output as _envoy_api_v2_core_Http2ProtocolOptions__Output } from '../../../../envoy/api/v2/core/Http2ProtocolOptions'; + +/** + * [#not-implemented-hide:] + */ +export interface GrpcProtocolOptions { + 'http2_protocol_options'?: (_envoy_api_v2_core_Http2ProtocolOptions); +} + +/** + * [#not-implemented-hide:] + */ +export interface GrpcProtocolOptions__Output { + 'http2_protocol_options'?: (_envoy_api_v2_core_Http2ProtocolOptions__Output); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/GrpcService.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/GrpcService.ts new file mode 100644 index 000000000..567da12bc --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/GrpcService.ts @@ -0,0 +1,481 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/grpc_service.proto + +import { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from '../../../../google/protobuf/Duration'; +import { HeaderValue as _envoy_api_v2_core_HeaderValue, HeaderValue__Output as _envoy_api_v2_core_HeaderValue__Output } from '../../../../envoy/api/v2/core/HeaderValue'; +import { Struct as _google_protobuf_Struct, Struct__Output as _google_protobuf_Struct__Output } from '../../../../google/protobuf/Struct'; +import { DataSource as _envoy_api_v2_core_DataSource, DataSource__Output as _envoy_api_v2_core_DataSource__Output } from '../../../../envoy/api/v2/core/DataSource'; +import { Empty as _google_protobuf_Empty, Empty__Output as _google_protobuf_Empty__Output } from '../../../../google/protobuf/Empty'; +import { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../../google/protobuf/Any'; +import { Long } from '@grpc/proto-loader'; + +/** + * [#next-free-field: 8] + */ +export interface _envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials { + /** + * Access token credentials. + * https://grpc.io/grpc/cpp/namespacegrpc.html#ad3a80da696ffdaea943f0f858d7a360d. + */ + 'access_token'?: (string); + /** + * Google Compute Engine credentials. + * https://grpc.io/grpc/cpp/namespacegrpc.html#a6beb3ac70ff94bd2ebbd89b8f21d1f61 + */ + 'google_compute_engine'?: (_google_protobuf_Empty); + /** + * Google refresh token credentials. + * https://grpc.io/grpc/cpp/namespacegrpc.html#a96901c997b91bc6513b08491e0dca37c. + */ + 'google_refresh_token'?: (string); + /** + * Service Account JWT Access credentials. + * https://grpc.io/grpc/cpp/namespacegrpc.html#a92a9f959d6102461f66ee973d8e9d3aa. + */ + 'service_account_jwt_access'?: (_envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials); + /** + * Google IAM credentials. + * https://grpc.io/grpc/cpp/namespacegrpc.html#a9fc1fc101b41e680d47028166e76f9d0. + */ + 'google_iam'?: (_envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials); + /** + * Custom authenticator credentials. + * https://grpc.io/grpc/cpp/namespacegrpc.html#a823c6a4b19ffc71fb33e90154ee2ad07. + * https://grpc.io/docs/guides/auth.html#extending-grpc-to-support-other-authentication-mechanisms. + */ + 'from_plugin'?: (_envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin); + /** + * Custom security token service which implements OAuth 2.0 token exchange. + * https://tools.ietf.org/html/draft-ietf-oauth-token-exchange-16 + * See https://github.com/grpc/grpc/pull/19587. + */ + 'sts_service'?: (_envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService); + 'credential_specifier'?: "access_token"|"google_compute_engine"|"google_refresh_token"|"service_account_jwt_access"|"google_iam"|"from_plugin"|"sts_service"; +} + +/** + * [#next-free-field: 8] + */ +export interface _envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials__Output { + /** + * Access token credentials. + * https://grpc.io/grpc/cpp/namespacegrpc.html#ad3a80da696ffdaea943f0f858d7a360d. + */ + 'access_token'?: (string); + /** + * Google Compute Engine credentials. + * https://grpc.io/grpc/cpp/namespacegrpc.html#a6beb3ac70ff94bd2ebbd89b8f21d1f61 + */ + 'google_compute_engine'?: (_google_protobuf_Empty__Output); + /** + * Google refresh token credentials. + * https://grpc.io/grpc/cpp/namespacegrpc.html#a96901c997b91bc6513b08491e0dca37c. + */ + 'google_refresh_token'?: (string); + /** + * Service Account JWT Access credentials. + * https://grpc.io/grpc/cpp/namespacegrpc.html#a92a9f959d6102461f66ee973d8e9d3aa. + */ + 'service_account_jwt_access'?: (_envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials__Output); + /** + * Google IAM credentials. + * https://grpc.io/grpc/cpp/namespacegrpc.html#a9fc1fc101b41e680d47028166e76f9d0. + */ + 'google_iam'?: (_envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials__Output); + /** + * Custom authenticator credentials. + * https://grpc.io/grpc/cpp/namespacegrpc.html#a823c6a4b19ffc71fb33e90154ee2ad07. + * https://grpc.io/docs/guides/auth.html#extending-grpc-to-support-other-authentication-mechanisms. + */ + 'from_plugin'?: (_envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin__Output); + /** + * Custom security token service which implements OAuth 2.0 token exchange. + * https://tools.ietf.org/html/draft-ietf-oauth-token-exchange-16 + * See https://github.com/grpc/grpc/pull/19587. + */ + 'sts_service'?: (_envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService__Output); + 'credential_specifier': "access_token"|"google_compute_engine"|"google_refresh_token"|"service_account_jwt_access"|"google_iam"|"from_plugin"|"sts_service"; +} + +/** + * See https://grpc.io/docs/guides/auth.html#credential-types to understand Channel and Call + * credential types. + */ +export interface _envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials { + 'ssl_credentials'?: (_envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials); + /** + * https://grpc.io/grpc/cpp/namespacegrpc.html#a6beb3ac70ff94bd2ebbd89b8f21d1f61 + */ + 'google_default'?: (_google_protobuf_Empty); + 'local_credentials'?: (_envoy_api_v2_core_GrpcService_GoogleGrpc_GoogleLocalCredentials); + 'credential_specifier'?: "ssl_credentials"|"google_default"|"local_credentials"; +} + +/** + * See https://grpc.io/docs/guides/auth.html#credential-types to understand Channel and Call + * credential types. + */ +export interface _envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials__Output { + 'ssl_credentials'?: (_envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials__Output); + /** + * https://grpc.io/grpc/cpp/namespacegrpc.html#a6beb3ac70ff94bd2ebbd89b8f21d1f61 + */ + 'google_default'?: (_google_protobuf_Empty__Output); + 'local_credentials'?: (_envoy_api_v2_core_GrpcService_GoogleGrpc_GoogleLocalCredentials__Output); + 'credential_specifier': "ssl_credentials"|"google_default"|"local_credentials"; +} + +export interface _envoy_api_v2_core_GrpcService_EnvoyGrpc { + /** + * The name of the upstream gRPC cluster. SSL credentials will be supplied + * in the :ref:`Cluster ` :ref:`transport_socket + * `. + */ + 'cluster_name'?: (string); +} + +export interface _envoy_api_v2_core_GrpcService_EnvoyGrpc__Output { + /** + * The name of the upstream gRPC cluster. SSL credentials will be supplied + * in the :ref:`Cluster ` :ref:`transport_socket + * `. + */ + 'cluster_name': (string); +} + +/** + * [#next-free-field: 7] + */ +export interface _envoy_api_v2_core_GrpcService_GoogleGrpc { + /** + * The target URI when using the `Google C++ gRPC client + * `_. SSL credentials will be supplied in + * :ref:`channel_credentials `. + */ + 'target_uri'?: (string); + 'channel_credentials'?: (_envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials); + /** + * A set of call credentials that can be composed with `channel credentials + * `_. + */ + 'call_credentials'?: (_envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials)[]; + /** + * The human readable prefix to use when emitting statistics for the gRPC + * service. + * + * .. csv-table:: + * :header: Name, Type, Description + * :widths: 1, 1, 2 + * + * streams_total, Counter, Total number of streams opened + * streams_closed_, Counter, Total streams closed with + */ + 'stat_prefix'?: (string); + /** + * The name of the Google gRPC credentials factory to use. This must have been registered with + * Envoy. If this is empty, a default credentials factory will be used that sets up channel + * credentials based on other configuration parameters. + */ + 'credentials_factory_name'?: (string); + /** + * Additional configuration for site-specific customizations of the Google + * gRPC library. + */ + 'config'?: (_google_protobuf_Struct); +} + +/** + * [#next-free-field: 7] + */ +export interface _envoy_api_v2_core_GrpcService_GoogleGrpc__Output { + /** + * The target URI when using the `Google C++ gRPC client + * `_. SSL credentials will be supplied in + * :ref:`channel_credentials `. + */ + 'target_uri': (string); + 'channel_credentials'?: (_envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials__Output); + /** + * A set of call credentials that can be composed with `channel credentials + * `_. + */ + 'call_credentials': (_envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials__Output)[]; + /** + * The human readable prefix to use when emitting statistics for the gRPC + * service. + * + * .. csv-table:: + * :header: Name, Type, Description + * :widths: 1, 1, 2 + * + * streams_total, Counter, Total number of streams opened + * streams_closed_, Counter, Total streams closed with + */ + 'stat_prefix': (string); + /** + * The name of the Google gRPC credentials factory to use. This must have been registered with + * Envoy. If this is empty, a default credentials factory will be used that sets up channel + * credentials based on other configuration parameters. + */ + 'credentials_factory_name': (string); + /** + * Additional configuration for site-specific customizations of the Google + * gRPC library. + */ + 'config'?: (_google_protobuf_Struct__Output); +} + +export interface _envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials { + 'authorization_token'?: (string); + 'authority_selector'?: (string); +} + +export interface _envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials__Output { + 'authorization_token': (string); + 'authority_selector': (string); +} + +/** + * Local channel credentials. Only UDS is supported for now. + * See https://github.com/grpc/grpc/pull/15909. + */ +export interface _envoy_api_v2_core_GrpcService_GoogleGrpc_GoogleLocalCredentials { +} + +/** + * Local channel credentials. Only UDS is supported for now. + * See https://github.com/grpc/grpc/pull/15909. + */ +export interface _envoy_api_v2_core_GrpcService_GoogleGrpc_GoogleLocalCredentials__Output { +} + +export interface _envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin { + 'name'?: (string); + 'config'?: (_google_protobuf_Struct); + 'typed_config'?: (_google_protobuf_Any); + 'config_type'?: "config"|"typed_config"; +} + +export interface _envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin__Output { + 'name': (string); + 'config'?: (_google_protobuf_Struct__Output); + 'typed_config'?: (_google_protobuf_Any__Output); + 'config_type': "config"|"typed_config"; +} + +export interface _envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials { + 'json_key'?: (string); + 'token_lifetime_seconds'?: (number | string | Long); +} + +export interface _envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials__Output { + 'json_key': (string); + 'token_lifetime_seconds': (string); +} + +/** + * See https://grpc.io/grpc/cpp/structgrpc_1_1_ssl_credentials_options.html. + */ +export interface _envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials { + /** + * PEM encoded server root certificates. + */ + 'root_certs'?: (_envoy_api_v2_core_DataSource); + /** + * PEM encoded client private key. + */ + 'private_key'?: (_envoy_api_v2_core_DataSource); + /** + * PEM encoded client certificate chain. + */ + 'cert_chain'?: (_envoy_api_v2_core_DataSource); +} + +/** + * See https://grpc.io/grpc/cpp/structgrpc_1_1_ssl_credentials_options.html. + */ +export interface _envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials__Output { + /** + * PEM encoded server root certificates. + */ + 'root_certs'?: (_envoy_api_v2_core_DataSource__Output); + /** + * PEM encoded client private key. + */ + 'private_key'?: (_envoy_api_v2_core_DataSource__Output); + /** + * PEM encoded client certificate chain. + */ + 'cert_chain'?: (_envoy_api_v2_core_DataSource__Output); +} + +/** + * Security token service configuration that allows Google gRPC to + * fetch security token from an OAuth 2.0 authorization server. + * See https://tools.ietf.org/html/draft-ietf-oauth-token-exchange-16 and + * https://github.com/grpc/grpc/pull/19587. + * [#next-free-field: 10] + */ +export interface _envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService { + /** + * URI of the token exchange service that handles token exchange requests. + * [#comment:TODO(asraa): Add URI validation when implemented. Tracked by + * https://github.com/envoyproxy/protoc-gen-validate/issues/303] + */ + 'token_exchange_service_uri'?: (string); + /** + * Location of the target service or resource where the client + * intends to use the requested security token. + */ + 'resource'?: (string); + /** + * Logical name of the target service where the client intends to + * use the requested security token. + */ + 'audience'?: (string); + /** + * The desired scope of the requested security token in the + * context of the service or resource where the token will be used. + */ + 'scope'?: (string); + /** + * Type of the requested security token. + */ + 'requested_token_type'?: (string); + /** + * The path of subject token, a security token that represents the + * identity of the party on behalf of whom the request is being made. + */ + 'subject_token_path'?: (string); + /** + * Type of the subject token. + */ + 'subject_token_type'?: (string); + /** + * The path of actor token, a security token that represents the identity + * of the acting party. The acting party is authorized to use the + * requested security token and act on behalf of the subject. + */ + 'actor_token_path'?: (string); + /** + * Type of the actor token. + */ + 'actor_token_type'?: (string); +} + +/** + * Security token service configuration that allows Google gRPC to + * fetch security token from an OAuth 2.0 authorization server. + * See https://tools.ietf.org/html/draft-ietf-oauth-token-exchange-16 and + * https://github.com/grpc/grpc/pull/19587. + * [#next-free-field: 10] + */ +export interface _envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService__Output { + /** + * URI of the token exchange service that handles token exchange requests. + * [#comment:TODO(asraa): Add URI validation when implemented. Tracked by + * https://github.com/envoyproxy/protoc-gen-validate/issues/303] + */ + 'token_exchange_service_uri': (string); + /** + * Location of the target service or resource where the client + * intends to use the requested security token. + */ + 'resource': (string); + /** + * Logical name of the target service where the client intends to + * use the requested security token. + */ + 'audience': (string); + /** + * The desired scope of the requested security token in the + * context of the service or resource where the token will be used. + */ + 'scope': (string); + /** + * Type of the requested security token. + */ + 'requested_token_type': (string); + /** + * The path of subject token, a security token that represents the + * identity of the party on behalf of whom the request is being made. + */ + 'subject_token_path': (string); + /** + * Type of the subject token. + */ + 'subject_token_type': (string); + /** + * The path of actor token, a security token that represents the identity + * of the acting party. The acting party is authorized to use the + * requested security token and act on behalf of the subject. + */ + 'actor_token_path': (string); + /** + * Type of the actor token. + */ + 'actor_token_type': (string); +} + +/** + * gRPC service configuration. This is used by :ref:`ApiConfigSource + * ` and filter configurations. + * [#next-free-field: 6] + */ +export interface GrpcService { + /** + * Envoy's in-built gRPC client. + * See the :ref:`gRPC services overview ` + * documentation for discussion on gRPC client selection. + */ + 'envoy_grpc'?: (_envoy_api_v2_core_GrpcService_EnvoyGrpc); + /** + * `Google C++ gRPC client `_ + * See the :ref:`gRPC services overview ` + * documentation for discussion on gRPC client selection. + */ + 'google_grpc'?: (_envoy_api_v2_core_GrpcService_GoogleGrpc); + /** + * The timeout for the gRPC request. This is the timeout for a specific + * request. + */ + 'timeout'?: (_google_protobuf_Duration); + /** + * Additional metadata to include in streams initiated to the GrpcService. + * This can be used for scenarios in which additional ad hoc authorization + * headers (e.g. ``x-foo-bar: baz-key``) are to be injected. + */ + 'initial_metadata'?: (_envoy_api_v2_core_HeaderValue)[]; + 'target_specifier'?: "envoy_grpc"|"google_grpc"; +} + +/** + * gRPC service configuration. This is used by :ref:`ApiConfigSource + * ` and filter configurations. + * [#next-free-field: 6] + */ +export interface GrpcService__Output { + /** + * Envoy's in-built gRPC client. + * See the :ref:`gRPC services overview ` + * documentation for discussion on gRPC client selection. + */ + 'envoy_grpc'?: (_envoy_api_v2_core_GrpcService_EnvoyGrpc__Output); + /** + * `Google C++ gRPC client `_ + * See the :ref:`gRPC services overview ` + * documentation for discussion on gRPC client selection. + */ + 'google_grpc'?: (_envoy_api_v2_core_GrpcService_GoogleGrpc__Output); + /** + * The timeout for the gRPC request. This is the timeout for a specific + * request. + */ + 'timeout'?: (_google_protobuf_Duration__Output); + /** + * Additional metadata to include in streams initiated to the GrpcService. + * This can be used for scenarios in which additional ad hoc authorization + * headers (e.g. ``x-foo-bar: baz-key``) are to be injected. + */ + 'initial_metadata': (_envoy_api_v2_core_HeaderValue__Output)[]; + 'target_specifier': "envoy_grpc"|"google_grpc"; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/HeaderMap.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/HeaderMap.ts new file mode 100644 index 000000000..3144e668c --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/HeaderMap.ts @@ -0,0 +1,17 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/base.proto + +import { HeaderValue as _envoy_api_v2_core_HeaderValue, HeaderValue__Output as _envoy_api_v2_core_HeaderValue__Output } from '../../../../envoy/api/v2/core/HeaderValue'; + +/** + * Wrapper for a set of headers. + */ +export interface HeaderMap { + 'headers'?: (_envoy_api_v2_core_HeaderValue)[]; +} + +/** + * Wrapper for a set of headers. + */ +export interface HeaderMap__Output { + 'headers': (_envoy_api_v2_core_HeaderValue__Output)[]; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/HeaderValue.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/HeaderValue.ts new file mode 100644 index 000000000..b36605324 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/HeaderValue.ts @@ -0,0 +1,38 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/base.proto + + +/** + * Header name/value pair. + */ +export interface HeaderValue { + /** + * Header name. + */ + 'key'?: (string); + /** + * Header value. + * + * The same :ref:`format specifier ` as used for + * :ref:`HTTP access logging ` applies here, however + * unknown header values are replaced with the empty string instead of `-`. + */ + 'value'?: (string); +} + +/** + * Header name/value pair. + */ +export interface HeaderValue__Output { + /** + * Header name. + */ + 'key': (string); + /** + * Header value. + * + * The same :ref:`format specifier ` as used for + * :ref:`HTTP access logging ` applies here, however + * unknown header values are replaced with the empty string instead of `-`. + */ + 'value': (string); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/HeaderValueOption.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/HeaderValueOption.ts new file mode 100644 index 000000000..c66ce9aad --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/HeaderValueOption.ts @@ -0,0 +1,34 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/base.proto + +import { HeaderValue as _envoy_api_v2_core_HeaderValue, HeaderValue__Output as _envoy_api_v2_core_HeaderValue__Output } from '../../../../envoy/api/v2/core/HeaderValue'; +import { BoolValue as _google_protobuf_BoolValue, BoolValue__Output as _google_protobuf_BoolValue__Output } from '../../../../google/protobuf/BoolValue'; + +/** + * Header name/value pair plus option to control append behavior. + */ +export interface HeaderValueOption { + /** + * Header name/value pair that this option applies to. + */ + 'header'?: (_envoy_api_v2_core_HeaderValue); + /** + * Should the value be appended? If true (default), the value is appended to + * existing values. + */ + 'append'?: (_google_protobuf_BoolValue); +} + +/** + * Header name/value pair plus option to control append behavior. + */ +export interface HeaderValueOption__Output { + /** + * Header name/value pair that this option applies to. + */ + 'header'?: (_envoy_api_v2_core_HeaderValue__Output); + /** + * Should the value be appended? If true (default), the value is appended to + * existing values. + */ + 'append'?: (_google_protobuf_BoolValue__Output); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/HealthCheck.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/HealthCheck.ts new file mode 100644 index 000000000..a9a3e3310 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/HealthCheck.ts @@ -0,0 +1,607 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/health_check.proto + +import { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from '../../../../google/protobuf/Duration'; +import { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output as _google_protobuf_UInt32Value__Output } from '../../../../google/protobuf/UInt32Value'; +import { BoolValue as _google_protobuf_BoolValue, BoolValue__Output as _google_protobuf_BoolValue__Output } from '../../../../google/protobuf/BoolValue'; +import { EventServiceConfig as _envoy_api_v2_core_EventServiceConfig, EventServiceConfig__Output as _envoy_api_v2_core_EventServiceConfig__Output } from '../../../../envoy/api/v2/core/EventServiceConfig'; +import { HeaderValueOption as _envoy_api_v2_core_HeaderValueOption, HeaderValueOption__Output as _envoy_api_v2_core_HeaderValueOption__Output } from '../../../../envoy/api/v2/core/HeaderValueOption'; +import { Int64Range as _envoy_type_Int64Range, Int64Range__Output as _envoy_type_Int64Range__Output } from '../../../../envoy/type/Int64Range'; +import { CodecClientType as _envoy_type_CodecClientType } from '../../../../envoy/type/CodecClientType'; +import { StringMatcher as _envoy_type_matcher_StringMatcher, StringMatcher__Output as _envoy_type_matcher_StringMatcher__Output } from '../../../../envoy/type/matcher/StringMatcher'; +import { Struct as _google_protobuf_Struct, Struct__Output as _google_protobuf_Struct__Output } from '../../../../google/protobuf/Struct'; +import { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../../google/protobuf/Any'; +import { Long } from '@grpc/proto-loader'; + +/** + * Custom health check. + */ +export interface _envoy_api_v2_core_HealthCheck_CustomHealthCheck { + /** + * The registered name of the custom health checker. + */ + 'name'?: (string); + 'config'?: (_google_protobuf_Struct); + 'typed_config'?: (_google_protobuf_Any); + /** + * A custom health checker specific configuration which depends on the custom health checker + * being instantiated. See :api:`envoy/config/health_checker` for reference. + */ + 'config_type'?: "config"|"typed_config"; +} + +/** + * Custom health check. + */ +export interface _envoy_api_v2_core_HealthCheck_CustomHealthCheck__Output { + /** + * The registered name of the custom health checker. + */ + 'name': (string); + 'config'?: (_google_protobuf_Struct__Output); + 'typed_config'?: (_google_protobuf_Any__Output); + /** + * A custom health checker specific configuration which depends on the custom health checker + * being instantiated. See :api:`envoy/config/health_checker` for reference. + */ + 'config_type': "config"|"typed_config"; +} + +/** + * `grpc.health.v1.Health + * `_-based + * healthcheck. See `gRPC doc `_ + * for details. + */ +export interface _envoy_api_v2_core_HealthCheck_GrpcHealthCheck { + /** + * An optional service name parameter which will be sent to gRPC service in + * `grpc.health.v1.HealthCheckRequest + * `_. + * message. See `gRPC health-checking overview + * `_ for more information. + */ + 'service_name'?: (string); + /** + * The value of the :authority header in the gRPC health check request. If + * left empty (default value), the name of the cluster this health check is associated + * with will be used. The authority header can be customized for a specific endpoint by setting + * the :ref:`hostname ` field. + */ + 'authority'?: (string); +} + +/** + * `grpc.health.v1.Health + * `_-based + * healthcheck. See `gRPC doc `_ + * for details. + */ +export interface _envoy_api_v2_core_HealthCheck_GrpcHealthCheck__Output { + /** + * An optional service name parameter which will be sent to gRPC service in + * `grpc.health.v1.HealthCheckRequest + * `_. + * message. See `gRPC health-checking overview + * `_ for more information. + */ + 'service_name': (string); + /** + * The value of the :authority header in the gRPC health check request. If + * left empty (default value), the name of the cluster this health check is associated + * with will be used. The authority header can be customized for a specific endpoint by setting + * the :ref:`hostname ` field. + */ + 'authority': (string); +} + +/** + * [#next-free-field: 12] + */ +export interface _envoy_api_v2_core_HealthCheck_HttpHealthCheck { + /** + * The value of the host header in the HTTP health check request. If + * left empty (default value), the name of the cluster this health check is associated + * with will be used. The host header can be customized for a specific endpoint by setting the + * :ref:`hostname ` field. + */ + 'host'?: (string); + /** + * Specifies the HTTP path that will be requested during health checking. For example + * * /healthcheck*. + */ + 'path'?: (string); + /** + * [#not-implemented-hide:] HTTP specific payload. + */ + 'send'?: (_envoy_api_v2_core_HealthCheck_Payload); + /** + * [#not-implemented-hide:] HTTP specific response. + */ + 'receive'?: (_envoy_api_v2_core_HealthCheck_Payload); + /** + * An optional service name parameter which is used to validate the identity of + * the health checked cluster. See the :ref:`architecture overview + * ` for more information. + * + * .. attention:: + * + * This field has been deprecated in favor of `service_name_matcher` for better flexibility + * over matching with service-cluster name. + */ + 'service_name'?: (string); + /** + * Specifies a list of HTTP headers that should be added to each request that is sent to the + * health checked cluster. For more information, including details on header value syntax, see + * the documentation on :ref:`custom request headers + * `. + */ + 'request_headers_to_add'?: (_envoy_api_v2_core_HeaderValueOption)[]; + /** + * Specifies a list of HTTP headers that should be removed from each request that is sent to the + * health checked cluster. + */ + 'request_headers_to_remove'?: (string)[]; + /** + * If set, health checks will be made using http/2. + * Deprecated, use :ref:`codec_client_type + * ` instead. + */ + 'use_http2'?: (boolean); + /** + * Specifies a list of HTTP response statuses considered healthy. If provided, replaces default + * 200-only policy - 200 must be included explicitly as needed. Ranges follow half-open + * semantics of :ref:`Int64Range `. The start and end of each + * range are required. Only statuses in the range [100, 600) are allowed. + */ + 'expected_statuses'?: (_envoy_type_Int64Range)[]; + /** + * Use specified application protocol for health checks. + */ + 'codec_client_type'?: (_envoy_type_CodecClientType | keyof typeof _envoy_type_CodecClientType); + /** + * An optional service name parameter which is used to validate the identity of + * the health checked cluster using a :ref:`StringMatcher + * `. See the :ref:`architecture overview + * ` for more information. + */ + 'service_name_matcher'?: (_envoy_type_matcher_StringMatcher); +} + +/** + * [#next-free-field: 12] + */ +export interface _envoy_api_v2_core_HealthCheck_HttpHealthCheck__Output { + /** + * The value of the host header in the HTTP health check request. If + * left empty (default value), the name of the cluster this health check is associated + * with will be used. The host header can be customized for a specific endpoint by setting the + * :ref:`hostname ` field. + */ + 'host': (string); + /** + * Specifies the HTTP path that will be requested during health checking. For example + * * /healthcheck*. + */ + 'path': (string); + /** + * [#not-implemented-hide:] HTTP specific payload. + */ + 'send'?: (_envoy_api_v2_core_HealthCheck_Payload__Output); + /** + * [#not-implemented-hide:] HTTP specific response. + */ + 'receive'?: (_envoy_api_v2_core_HealthCheck_Payload__Output); + /** + * An optional service name parameter which is used to validate the identity of + * the health checked cluster. See the :ref:`architecture overview + * ` for more information. + * + * .. attention:: + * + * This field has been deprecated in favor of `service_name_matcher` for better flexibility + * over matching with service-cluster name. + */ + 'service_name': (string); + /** + * Specifies a list of HTTP headers that should be added to each request that is sent to the + * health checked cluster. For more information, including details on header value syntax, see + * the documentation on :ref:`custom request headers + * `. + */ + 'request_headers_to_add': (_envoy_api_v2_core_HeaderValueOption__Output)[]; + /** + * Specifies a list of HTTP headers that should be removed from each request that is sent to the + * health checked cluster. + */ + 'request_headers_to_remove': (string)[]; + /** + * If set, health checks will be made using http/2. + * Deprecated, use :ref:`codec_client_type + * ` instead. + */ + 'use_http2': (boolean); + /** + * Specifies a list of HTTP response statuses considered healthy. If provided, replaces default + * 200-only policy - 200 must be included explicitly as needed. Ranges follow half-open + * semantics of :ref:`Int64Range `. The start and end of each + * range are required. Only statuses in the range [100, 600) are allowed. + */ + 'expected_statuses': (_envoy_type_Int64Range__Output)[]; + /** + * Use specified application protocol for health checks. + */ + 'codec_client_type': (keyof typeof _envoy_type_CodecClientType); + /** + * An optional service name parameter which is used to validate the identity of + * the health checked cluster using a :ref:`StringMatcher + * `. See the :ref:`architecture overview + * ` for more information. + */ + 'service_name_matcher'?: (_envoy_type_matcher_StringMatcher__Output); +} + +/** + * Describes the encoding of the payload bytes in the payload. + */ +export interface _envoy_api_v2_core_HealthCheck_Payload { + /** + * Hex encoded payload. E.g., "000000FF". + */ + 'text'?: (string); + /** + * [#not-implemented-hide:] Binary payload. + */ + 'binary'?: (Buffer | Uint8Array | string); + 'payload'?: "text"|"binary"; +} + +/** + * Describes the encoding of the payload bytes in the payload. + */ +export interface _envoy_api_v2_core_HealthCheck_Payload__Output { + /** + * Hex encoded payload. E.g., "000000FF". + */ + 'text'?: (string); + /** + * [#not-implemented-hide:] Binary payload. + */ + 'binary'?: (Buffer); + 'payload': "text"|"binary"; +} + +export interface _envoy_api_v2_core_HealthCheck_RedisHealthCheck { + /** + * If set, optionally perform ``EXISTS `` instead of ``PING``. A return value + * from Redis of 0 (does not exist) is considered a passing healthcheck. A return value other + * than 0 is considered a failure. This allows the user to mark a Redis instance for maintenance + * by setting the specified key to any value and waiting for traffic to drain. + */ + 'key'?: (string); +} + +export interface _envoy_api_v2_core_HealthCheck_RedisHealthCheck__Output { + /** + * If set, optionally perform ``EXISTS `` instead of ``PING``. A return value + * from Redis of 0 (does not exist) is considered a passing healthcheck. A return value other + * than 0 is considered a failure. This allows the user to mark a Redis instance for maintenance + * by setting the specified key to any value and waiting for traffic to drain. + */ + 'key': (string); +} + +export interface _envoy_api_v2_core_HealthCheck_TcpHealthCheck { + /** + * Empty payloads imply a connect-only health check. + */ + 'send'?: (_envoy_api_v2_core_HealthCheck_Payload); + /** + * When checking the response, “fuzzy” matching is performed such that each + * binary block must be found, and in the order specified, but not + * necessarily contiguous. + */ + 'receive'?: (_envoy_api_v2_core_HealthCheck_Payload)[]; +} + +export interface _envoy_api_v2_core_HealthCheck_TcpHealthCheck__Output { + /** + * Empty payloads imply a connect-only health check. + */ + 'send'?: (_envoy_api_v2_core_HealthCheck_Payload__Output); + /** + * When checking the response, “fuzzy” matching is performed such that each + * binary block must be found, and in the order specified, but not + * necessarily contiguous. + */ + 'receive': (_envoy_api_v2_core_HealthCheck_Payload__Output)[]; +} + +/** + * Health checks occur over the transport socket specified for the cluster. This implies that if a + * cluster is using a TLS-enabled transport socket, the health check will also occur over TLS. + * + * This allows overriding the cluster TLS settings, just for health check connections. + */ +export interface _envoy_api_v2_core_HealthCheck_TlsOptions { + /** + * Specifies the ALPN protocols for health check connections. This is useful if the + * corresponding upstream is using ALPN-based :ref:`FilterChainMatch + * ` along with different protocols for health checks + * versus data connections. If empty, no ALPN protocols will be set on health check connections. + */ + 'alpn_protocols'?: (string)[]; +} + +/** + * Health checks occur over the transport socket specified for the cluster. This implies that if a + * cluster is using a TLS-enabled transport socket, the health check will also occur over TLS. + * + * This allows overriding the cluster TLS settings, just for health check connections. + */ +export interface _envoy_api_v2_core_HealthCheck_TlsOptions__Output { + /** + * Specifies the ALPN protocols for health check connections. This is useful if the + * corresponding upstream is using ALPN-based :ref:`FilterChainMatch + * ` along with different protocols for health checks + * versus data connections. If empty, no ALPN protocols will be set on health check connections. + */ + 'alpn_protocols': (string)[]; +} + +/** + * [#next-free-field: 23] + */ +export interface HealthCheck { + /** + * The time to wait for a health check response. If the timeout is reached the + * health check attempt will be considered a failure. + */ + 'timeout'?: (_google_protobuf_Duration); + /** + * The interval between health checks. + */ + 'interval'?: (_google_protobuf_Duration); + /** + * An optional jitter amount in milliseconds. If specified, during every + * interval Envoy will add interval_jitter to the wait time. + */ + 'interval_jitter'?: (_google_protobuf_Duration); + /** + * The number of unhealthy health checks required before a host is marked + * unhealthy. Note that for *http* health checking if a host responds with 503 + * this threshold is ignored and the host is considered unhealthy immediately. + */ + 'unhealthy_threshold'?: (_google_protobuf_UInt32Value); + /** + * The number of healthy health checks required before a host is marked + * healthy. Note that during startup, only a single successful health check is + * required to mark a host healthy. + */ + 'healthy_threshold'?: (_google_protobuf_UInt32Value); + /** + * [#not-implemented-hide:] Non-serving port for health checking. + */ + 'alt_port'?: (_google_protobuf_UInt32Value); + /** + * Reuse health check connection between health checks. Default is true. + */ + 'reuse_connection'?: (_google_protobuf_BoolValue); + /** + * HTTP health check. + */ + 'http_health_check'?: (_envoy_api_v2_core_HealthCheck_HttpHealthCheck); + /** + * TCP health check. + */ + 'tcp_health_check'?: (_envoy_api_v2_core_HealthCheck_TcpHealthCheck); + /** + * gRPC health check. + */ + 'grpc_health_check'?: (_envoy_api_v2_core_HealthCheck_GrpcHealthCheck); + /** + * The "no traffic interval" is a special health check interval that is used when a cluster has + * never had traffic routed to it. This lower interval allows cluster information to be kept up to + * date, without sending a potentially large amount of active health checking traffic for no + * reason. Once a cluster has been used for traffic routing, Envoy will shift back to using the + * standard health check interval that is defined. Note that this interval takes precedence over + * any other. + * + * The default value for "no traffic interval" is 60 seconds. + */ + 'no_traffic_interval'?: (_google_protobuf_Duration); + /** + * Custom health check. + */ + 'custom_health_check'?: (_envoy_api_v2_core_HealthCheck_CustomHealthCheck); + /** + * The "unhealthy interval" is a health check interval that is used for hosts that are marked as + * unhealthy. As soon as the host is marked as healthy, Envoy will shift back to using the + * standard health check interval that is defined. + * + * The default value for "unhealthy interval" is the same as "interval". + */ + 'unhealthy_interval'?: (_google_protobuf_Duration); + /** + * The "unhealthy edge interval" is a special health check interval that is used for the first + * health check right after a host is marked as unhealthy. For subsequent health checks + * Envoy will shift back to using either "unhealthy interval" if present or the standard health + * check interval that is defined. + * + * The default value for "unhealthy edge interval" is the same as "unhealthy interval". + */ + 'unhealthy_edge_interval'?: (_google_protobuf_Duration); + /** + * The "healthy edge interval" is a special health check interval that is used for the first + * health check right after a host is marked as healthy. For subsequent health checks + * Envoy will shift back to using the standard health check interval that is defined. + * + * The default value for "healthy edge interval" is the same as the default interval. + */ + 'healthy_edge_interval'?: (_google_protobuf_Duration); + /** + * Specifies the path to the :ref:`health check event log `. + * If empty, no event log will be written. + */ + 'event_log_path'?: (string); + /** + * An optional jitter amount as a percentage of interval_ms. If specified, + * during every interval Envoy will add interval_ms * + * interval_jitter_percent / 100 to the wait time. + * + * If interval_jitter_ms and interval_jitter_percent are both set, both of + * them will be used to increase the wait time. + */ + 'interval_jitter_percent'?: (number); + /** + * If set to true, health check failure events will always be logged. If set to false, only the + * initial health check failure event will be logged. + * The default value is false. + */ + 'always_log_health_check_failures'?: (boolean); + /** + * An optional jitter amount in milliseconds. If specified, Envoy will start health + * checking after for a random time in ms between 0 and initial_jitter. This only + * applies to the first health check. + */ + 'initial_jitter'?: (_google_protobuf_Duration); + /** + * This allows overriding the cluster TLS settings, just for health check connections. + */ + 'tls_options'?: (_envoy_api_v2_core_HealthCheck_TlsOptions); + /** + * [#not-implemented-hide:] + * The gRPC service for the health check event service. + * If empty, health check events won't be sent to a remote endpoint. + */ + 'event_service'?: (_envoy_api_v2_core_EventServiceConfig); + 'health_checker'?: "http_health_check"|"tcp_health_check"|"grpc_health_check"|"custom_health_check"; +} + +/** + * [#next-free-field: 23] + */ +export interface HealthCheck__Output { + /** + * The time to wait for a health check response. If the timeout is reached the + * health check attempt will be considered a failure. + */ + 'timeout'?: (_google_protobuf_Duration__Output); + /** + * The interval between health checks. + */ + 'interval'?: (_google_protobuf_Duration__Output); + /** + * An optional jitter amount in milliseconds. If specified, during every + * interval Envoy will add interval_jitter to the wait time. + */ + 'interval_jitter'?: (_google_protobuf_Duration__Output); + /** + * The number of unhealthy health checks required before a host is marked + * unhealthy. Note that for *http* health checking if a host responds with 503 + * this threshold is ignored and the host is considered unhealthy immediately. + */ + 'unhealthy_threshold'?: (_google_protobuf_UInt32Value__Output); + /** + * The number of healthy health checks required before a host is marked + * healthy. Note that during startup, only a single successful health check is + * required to mark a host healthy. + */ + 'healthy_threshold'?: (_google_protobuf_UInt32Value__Output); + /** + * [#not-implemented-hide:] Non-serving port for health checking. + */ + 'alt_port'?: (_google_protobuf_UInt32Value__Output); + /** + * Reuse health check connection between health checks. Default is true. + */ + 'reuse_connection'?: (_google_protobuf_BoolValue__Output); + /** + * HTTP health check. + */ + 'http_health_check'?: (_envoy_api_v2_core_HealthCheck_HttpHealthCheck__Output); + /** + * TCP health check. + */ + 'tcp_health_check'?: (_envoy_api_v2_core_HealthCheck_TcpHealthCheck__Output); + /** + * gRPC health check. + */ + 'grpc_health_check'?: (_envoy_api_v2_core_HealthCheck_GrpcHealthCheck__Output); + /** + * The "no traffic interval" is a special health check interval that is used when a cluster has + * never had traffic routed to it. This lower interval allows cluster information to be kept up to + * date, without sending a potentially large amount of active health checking traffic for no + * reason. Once a cluster has been used for traffic routing, Envoy will shift back to using the + * standard health check interval that is defined. Note that this interval takes precedence over + * any other. + * + * The default value for "no traffic interval" is 60 seconds. + */ + 'no_traffic_interval'?: (_google_protobuf_Duration__Output); + /** + * Custom health check. + */ + 'custom_health_check'?: (_envoy_api_v2_core_HealthCheck_CustomHealthCheck__Output); + /** + * The "unhealthy interval" is a health check interval that is used for hosts that are marked as + * unhealthy. As soon as the host is marked as healthy, Envoy will shift back to using the + * standard health check interval that is defined. + * + * The default value for "unhealthy interval" is the same as "interval". + */ + 'unhealthy_interval'?: (_google_protobuf_Duration__Output); + /** + * The "unhealthy edge interval" is a special health check interval that is used for the first + * health check right after a host is marked as unhealthy. For subsequent health checks + * Envoy will shift back to using either "unhealthy interval" if present or the standard health + * check interval that is defined. + * + * The default value for "unhealthy edge interval" is the same as "unhealthy interval". + */ + 'unhealthy_edge_interval'?: (_google_protobuf_Duration__Output); + /** + * The "healthy edge interval" is a special health check interval that is used for the first + * health check right after a host is marked as healthy. For subsequent health checks + * Envoy will shift back to using the standard health check interval that is defined. + * + * The default value for "healthy edge interval" is the same as the default interval. + */ + 'healthy_edge_interval'?: (_google_protobuf_Duration__Output); + /** + * Specifies the path to the :ref:`health check event log `. + * If empty, no event log will be written. + */ + 'event_log_path': (string); + /** + * An optional jitter amount as a percentage of interval_ms. If specified, + * during every interval Envoy will add interval_ms * + * interval_jitter_percent / 100 to the wait time. + * + * If interval_jitter_ms and interval_jitter_percent are both set, both of + * them will be used to increase the wait time. + */ + 'interval_jitter_percent': (number); + /** + * If set to true, health check failure events will always be logged. If set to false, only the + * initial health check failure event will be logged. + * The default value is false. + */ + 'always_log_health_check_failures': (boolean); + /** + * An optional jitter amount in milliseconds. If specified, Envoy will start health + * checking after for a random time in ms between 0 and initial_jitter. This only + * applies to the first health check. + */ + 'initial_jitter'?: (_google_protobuf_Duration__Output); + /** + * This allows overriding the cluster TLS settings, just for health check connections. + */ + 'tls_options'?: (_envoy_api_v2_core_HealthCheck_TlsOptions__Output); + /** + * [#not-implemented-hide:] + * The gRPC service for the health check event service. + * If empty, health check events won't be sent to a remote endpoint. + */ + 'event_service'?: (_envoy_api_v2_core_EventServiceConfig__Output); + 'health_checker': "http_health_check"|"tcp_health_check"|"grpc_health_check"|"custom_health_check"; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/HealthStatus.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/HealthStatus.ts new file mode 100644 index 000000000..e1d572fa4 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/HealthStatus.ts @@ -0,0 +1,36 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/health_check.proto + +/** + * Endpoint health status. + */ +export enum HealthStatus { + /** + * The health status is not known. This is interpreted by Envoy as *HEALTHY*. + */ + UNKNOWN = 0, + /** + * Healthy. + */ + HEALTHY = 1, + /** + * Unhealthy. + */ + UNHEALTHY = 2, + /** + * Connection draining in progress. E.g., + * ``_ + * or + * ``_. + * This is interpreted by Envoy as *UNHEALTHY*. + */ + DRAINING = 3, + /** + * Health check timed out. This is part of HDS and is interpreted by Envoy as + * *UNHEALTHY*. + */ + TIMEOUT = 4, + /** + * Degraded. + */ + DEGRADED = 5, +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/Http1ProtocolOptions.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/Http1ProtocolOptions.ts new file mode 100644 index 000000000..7feca246a --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/Http1ProtocolOptions.ts @@ -0,0 +1,119 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/protocol.proto + +import { BoolValue as _google_protobuf_BoolValue, BoolValue__Output as _google_protobuf_BoolValue__Output } from '../../../../google/protobuf/BoolValue'; + +export interface _envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat { + /** + * Formats the header by proper casing words: the first character and any character following + * a special character will be capitalized if it's an alpha character. For example, + * "content-type" becomes "Content-Type", and "foo$b#$are" becomes "Foo$B#$Are". + * Note that while this results in most headers following conventional casing, certain headers + * are not covered. For example, the "TE" header will be formatted as "Te". + */ + 'proper_case_words'?: (_envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords); + 'header_format'?: "proper_case_words"; +} + +export interface _envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat__Output { + /** + * Formats the header by proper casing words: the first character and any character following + * a special character will be capitalized if it's an alpha character. For example, + * "content-type" becomes "Content-Type", and "foo$b#$are" becomes "Foo$B#$Are". + * Note that while this results in most headers following conventional casing, certain headers + * are not covered. For example, the "TE" header will be formatted as "Te". + */ + 'proper_case_words'?: (_envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords__Output); + 'header_format': "proper_case_words"; +} + +export interface _envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords { +} + +export interface _envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords__Output { +} + +/** + * [#next-free-field: 6] + */ +export interface Http1ProtocolOptions { + /** + * Handle HTTP requests with absolute URLs in the requests. These requests + * are generally sent by clients to forward/explicit proxies. This allows clients to configure + * envoy as their HTTP proxy. In Unix, for example, this is typically done by setting the + * *http_proxy* environment variable. + */ + 'allow_absolute_url'?: (_google_protobuf_BoolValue); + /** + * Handle incoming HTTP/1.0 and HTTP 0.9 requests. + * This is off by default, and not fully standards compliant. There is support for pre-HTTP/1.1 + * style connect logic, dechunking, and handling lack of client host iff + * *default_host_for_http_10* is configured. + */ + 'accept_http_10'?: (boolean); + /** + * A default host for HTTP/1.0 requests. This is highly suggested if *accept_http_10* is true as + * Envoy does not otherwise support HTTP/1.0 without a Host header. + * This is a no-op if *accept_http_10* is not true. + */ + 'default_host_for_http_10'?: (string); + /** + * Describes how the keys for response headers should be formatted. By default, all header keys + * are lower cased. + */ + 'header_key_format'?: (_envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat); + /** + * Enables trailers for HTTP/1. By default the HTTP/1 codec drops proxied trailers. + * + * .. attention:: + * + * Note that this only happens when Envoy is chunk encoding which occurs when: + * - The request is HTTP/1.1. + * - Is neither a HEAD only request nor a HTTP Upgrade. + * - Not a response to a HEAD request. + * - The content length header is not present. + */ + 'enable_trailers'?: (boolean); +} + +/** + * [#next-free-field: 6] + */ +export interface Http1ProtocolOptions__Output { + /** + * Handle HTTP requests with absolute URLs in the requests. These requests + * are generally sent by clients to forward/explicit proxies. This allows clients to configure + * envoy as their HTTP proxy. In Unix, for example, this is typically done by setting the + * *http_proxy* environment variable. + */ + 'allow_absolute_url'?: (_google_protobuf_BoolValue__Output); + /** + * Handle incoming HTTP/1.0 and HTTP 0.9 requests. + * This is off by default, and not fully standards compliant. There is support for pre-HTTP/1.1 + * style connect logic, dechunking, and handling lack of client host iff + * *default_host_for_http_10* is configured. + */ + 'accept_http_10': (boolean); + /** + * A default host for HTTP/1.0 requests. This is highly suggested if *accept_http_10* is true as + * Envoy does not otherwise support HTTP/1.0 without a Host header. + * This is a no-op if *accept_http_10* is not true. + */ + 'default_host_for_http_10': (string); + /** + * Describes how the keys for response headers should be formatted. By default, all header keys + * are lower cased. + */ + 'header_key_format'?: (_envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat__Output); + /** + * Enables trailers for HTTP/1. By default the HTTP/1 codec drops proxied trailers. + * + * .. attention:: + * + * Note that this only happens when Envoy is chunk encoding which occurs when: + * - The request is HTTP/1.1. + * - Is neither a HEAD only request nor a HTTP Upgrade. + * - Not a response to a HEAD request. + * - The content length header is not present. + */ + 'enable_trailers': (boolean); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/Http2ProtocolOptions.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/Http2ProtocolOptions.ts new file mode 100644 index 000000000..d24c38a55 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/Http2ProtocolOptions.ts @@ -0,0 +1,325 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/protocol.proto + +import { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output as _google_protobuf_UInt32Value__Output } from '../../../../google/protobuf/UInt32Value'; + +/** + * Defines a parameter to be sent in the SETTINGS frame. + * See `RFC7540, sec. 6.5.1 `_ for details. + */ +export interface _envoy_api_v2_core_Http2ProtocolOptions_SettingsParameter { + /** + * The 16 bit parameter identifier. + */ + 'identifier'?: (_google_protobuf_UInt32Value); + /** + * The 32 bit parameter value. + */ + 'value'?: (_google_protobuf_UInt32Value); +} + +/** + * Defines a parameter to be sent in the SETTINGS frame. + * See `RFC7540, sec. 6.5.1 `_ for details. + */ +export interface _envoy_api_v2_core_Http2ProtocolOptions_SettingsParameter__Output { + /** + * The 16 bit parameter identifier. + */ + 'identifier'?: (_google_protobuf_UInt32Value__Output); + /** + * The 32 bit parameter value. + */ + 'value'?: (_google_protobuf_UInt32Value__Output); +} + +/** + * [#next-free-field: 14] + */ +export interface Http2ProtocolOptions { + /** + * `Maximum table size `_ + * (in octets) that the encoder is permitted to use for the dynamic HPACK table. Valid values + * range from 0 to 4294967295 (2^32 - 1) and defaults to 4096. 0 effectively disables header + * compression. + */ + 'hpack_table_size'?: (_google_protobuf_UInt32Value); + /** + * `Maximum concurrent streams `_ + * allowed for peer on one HTTP/2 connection. Valid values range from 1 to 2147483647 (2^31 - 1) + * and defaults to 2147483647. + * + * For upstream connections, this also limits how many streams Envoy will initiate concurrently + * on a single connection. If the limit is reached, Envoy may queue requests or establish + * additional connections (as allowed per circuit breaker limits). + */ + 'max_concurrent_streams'?: (_google_protobuf_UInt32Value); + /** + * `Initial stream-level flow-control window + * `_ size. Valid values range from 65535 + * (2^16 - 1, HTTP/2 default) to 2147483647 (2^31 - 1, HTTP/2 maximum) and defaults to 268435456 + * (256 * 1024 * 1024). + * + * NOTE: 65535 is the initial window size from HTTP/2 spec. We only support increasing the default + * window size now, so it's also the minimum. + * + * This field also acts as a soft limit on the number of bytes Envoy will buffer per-stream in the + * HTTP/2 codec buffers. Once the buffer reaches this pointer, watermark callbacks will fire to + * stop the flow of data to the codec buffers. + */ + 'initial_stream_window_size'?: (_google_protobuf_UInt32Value); + /** + * Similar to *initial_stream_window_size*, but for connection-level flow-control + * window. Currently, this has the same minimum/maximum/default as *initial_stream_window_size*. + */ + 'initial_connection_window_size'?: (_google_protobuf_UInt32Value); + /** + * Allows proxying Websocket and other upgrades over H2 connect. + */ + 'allow_connect'?: (boolean); + /** + * [#not-implemented-hide:] Hiding until envoy has full metadata support. + * Still under implementation. DO NOT USE. + * + * Allows metadata. See [metadata + * docs](https://github.com/envoyproxy/envoy/blob/master/source/docs/h2_metadata.md) for more + * information. + */ + 'allow_metadata'?: (boolean); + /** + * Limit the number of pending outbound downstream frames of all types (frames that are waiting to + * be written into the socket). Exceeding this limit triggers flood mitigation and connection is + * terminated. The ``http2.outbound_flood`` stat tracks the number of terminated connections due + * to flood mitigation. The default limit is 10000. + * [#comment:TODO: implement same limits for upstream outbound frames as well.] + */ + 'max_outbound_frames'?: (_google_protobuf_UInt32Value); + /** + * Limit the number of pending outbound downstream frames of types PING, SETTINGS and RST_STREAM, + * preventing high memory utilization when receiving continuous stream of these frames. Exceeding + * this limit triggers flood mitigation and connection is terminated. The + * ``http2.outbound_control_flood`` stat tracks the number of terminated connections due to flood + * mitigation. The default limit is 1000. + * [#comment:TODO: implement same limits for upstream outbound frames as well.] + */ + 'max_outbound_control_frames'?: (_google_protobuf_UInt32Value); + /** + * Limit the number of consecutive inbound frames of types HEADERS, CONTINUATION and DATA with an + * empty payload and no end stream flag. Those frames have no legitimate use and are abusive, but + * might be a result of a broken HTTP/2 implementation. The `http2.inbound_empty_frames_flood`` + * stat tracks the number of connections terminated due to flood mitigation. + * Setting this to 0 will terminate connection upon receiving first frame with an empty payload + * and no end stream flag. The default limit is 1. + * [#comment:TODO: implement same limits for upstream inbound frames as well.] + */ + 'max_consecutive_inbound_frames_with_empty_payload'?: (_google_protobuf_UInt32Value); + /** + * Limit the number of inbound PRIORITY frames allowed per each opened stream. If the number + * of PRIORITY frames received over the lifetime of connection exceeds the value calculated + * using this formula:: + * + * max_inbound_priority_frames_per_stream * (1 + inbound_streams) + * + * the connection is terminated. The ``http2.inbound_priority_frames_flood`` stat tracks + * the number of connections terminated due to flood mitigation. The default limit is 100. + * [#comment:TODO: implement same limits for upstream inbound frames as well.] + */ + 'max_inbound_priority_frames_per_stream'?: (_google_protobuf_UInt32Value); + /** + * Limit the number of inbound WINDOW_UPDATE frames allowed per DATA frame sent. If the number + * of WINDOW_UPDATE frames received over the lifetime of connection exceeds the value calculated + * using this formula:: + * + * 1 + 2 * (inbound_streams + + * max_inbound_window_update_frames_per_data_frame_sent * outbound_data_frames) + * + * the connection is terminated. The ``http2.inbound_priority_frames_flood`` stat tracks + * the number of connections terminated due to flood mitigation. The default limit is 10. + * Setting this to 1 should be enough to support HTTP/2 implementations with basic flow control, + * but more complex implementations that try to estimate available bandwidth require at least 2. + * [#comment:TODO: implement same limits for upstream inbound frames as well.] + */ + 'max_inbound_window_update_frames_per_data_frame_sent'?: (_google_protobuf_UInt32Value); + /** + * Allows invalid HTTP messaging and headers. When this option is disabled (default), then + * the whole HTTP/2 connection is terminated upon receiving invalid HEADERS frame. However, + * when this option is enabled, only the offending stream is terminated. + * + * See `RFC7540, sec. 8.1 `_ for details. + */ + 'stream_error_on_invalid_http_messaging'?: (boolean); + /** + * [#not-implemented-hide:] + * Specifies SETTINGS frame parameters to be sent to the peer, with two exceptions: + * + * 1. SETTINGS_ENABLE_PUSH (0x2) is not configurable as HTTP/2 server push is not supported by + * Envoy. + * + * 2. SETTINGS_ENABLE_CONNECT_PROTOCOL (0x8) is only configurable through the named field + * 'allow_connect'. + * + * Note that custom parameters specified through this field can not also be set in the + * corresponding named parameters: + * + * .. code-block:: text + * + * ID Field Name + * ---------------- + * 0x1 hpack_table_size + * 0x3 max_concurrent_streams + * 0x4 initial_stream_window_size + * + * Collisions will trigger config validation failure on load/update. Likewise, inconsistencies + * between custom parameters with the same identifier will trigger a failure. + * + * See `IANA HTTP/2 Settings + * `_ for + * standardized identifiers. + */ + 'custom_settings_parameters'?: (_envoy_api_v2_core_Http2ProtocolOptions_SettingsParameter)[]; +} + +/** + * [#next-free-field: 14] + */ +export interface Http2ProtocolOptions__Output { + /** + * `Maximum table size `_ + * (in octets) that the encoder is permitted to use for the dynamic HPACK table. Valid values + * range from 0 to 4294967295 (2^32 - 1) and defaults to 4096. 0 effectively disables header + * compression. + */ + 'hpack_table_size'?: (_google_protobuf_UInt32Value__Output); + /** + * `Maximum concurrent streams `_ + * allowed for peer on one HTTP/2 connection. Valid values range from 1 to 2147483647 (2^31 - 1) + * and defaults to 2147483647. + * + * For upstream connections, this also limits how many streams Envoy will initiate concurrently + * on a single connection. If the limit is reached, Envoy may queue requests or establish + * additional connections (as allowed per circuit breaker limits). + */ + 'max_concurrent_streams'?: (_google_protobuf_UInt32Value__Output); + /** + * `Initial stream-level flow-control window + * `_ size. Valid values range from 65535 + * (2^16 - 1, HTTP/2 default) to 2147483647 (2^31 - 1, HTTP/2 maximum) and defaults to 268435456 + * (256 * 1024 * 1024). + * + * NOTE: 65535 is the initial window size from HTTP/2 spec. We only support increasing the default + * window size now, so it's also the minimum. + * + * This field also acts as a soft limit on the number of bytes Envoy will buffer per-stream in the + * HTTP/2 codec buffers. Once the buffer reaches this pointer, watermark callbacks will fire to + * stop the flow of data to the codec buffers. + */ + 'initial_stream_window_size'?: (_google_protobuf_UInt32Value__Output); + /** + * Similar to *initial_stream_window_size*, but for connection-level flow-control + * window. Currently, this has the same minimum/maximum/default as *initial_stream_window_size*. + */ + 'initial_connection_window_size'?: (_google_protobuf_UInt32Value__Output); + /** + * Allows proxying Websocket and other upgrades over H2 connect. + */ + 'allow_connect': (boolean); + /** + * [#not-implemented-hide:] Hiding until envoy has full metadata support. + * Still under implementation. DO NOT USE. + * + * Allows metadata. See [metadata + * docs](https://github.com/envoyproxy/envoy/blob/master/source/docs/h2_metadata.md) for more + * information. + */ + 'allow_metadata': (boolean); + /** + * Limit the number of pending outbound downstream frames of all types (frames that are waiting to + * be written into the socket). Exceeding this limit triggers flood mitigation and connection is + * terminated. The ``http2.outbound_flood`` stat tracks the number of terminated connections due + * to flood mitigation. The default limit is 10000. + * [#comment:TODO: implement same limits for upstream outbound frames as well.] + */ + 'max_outbound_frames'?: (_google_protobuf_UInt32Value__Output); + /** + * Limit the number of pending outbound downstream frames of types PING, SETTINGS and RST_STREAM, + * preventing high memory utilization when receiving continuous stream of these frames. Exceeding + * this limit triggers flood mitigation and connection is terminated. The + * ``http2.outbound_control_flood`` stat tracks the number of terminated connections due to flood + * mitigation. The default limit is 1000. + * [#comment:TODO: implement same limits for upstream outbound frames as well.] + */ + 'max_outbound_control_frames'?: (_google_protobuf_UInt32Value__Output); + /** + * Limit the number of consecutive inbound frames of types HEADERS, CONTINUATION and DATA with an + * empty payload and no end stream flag. Those frames have no legitimate use and are abusive, but + * might be a result of a broken HTTP/2 implementation. The `http2.inbound_empty_frames_flood`` + * stat tracks the number of connections terminated due to flood mitigation. + * Setting this to 0 will terminate connection upon receiving first frame with an empty payload + * and no end stream flag. The default limit is 1. + * [#comment:TODO: implement same limits for upstream inbound frames as well.] + */ + 'max_consecutive_inbound_frames_with_empty_payload'?: (_google_protobuf_UInt32Value__Output); + /** + * Limit the number of inbound PRIORITY frames allowed per each opened stream. If the number + * of PRIORITY frames received over the lifetime of connection exceeds the value calculated + * using this formula:: + * + * max_inbound_priority_frames_per_stream * (1 + inbound_streams) + * + * the connection is terminated. The ``http2.inbound_priority_frames_flood`` stat tracks + * the number of connections terminated due to flood mitigation. The default limit is 100. + * [#comment:TODO: implement same limits for upstream inbound frames as well.] + */ + 'max_inbound_priority_frames_per_stream'?: (_google_protobuf_UInt32Value__Output); + /** + * Limit the number of inbound WINDOW_UPDATE frames allowed per DATA frame sent. If the number + * of WINDOW_UPDATE frames received over the lifetime of connection exceeds the value calculated + * using this formula:: + * + * 1 + 2 * (inbound_streams + + * max_inbound_window_update_frames_per_data_frame_sent * outbound_data_frames) + * + * the connection is terminated. The ``http2.inbound_priority_frames_flood`` stat tracks + * the number of connections terminated due to flood mitigation. The default limit is 10. + * Setting this to 1 should be enough to support HTTP/2 implementations with basic flow control, + * but more complex implementations that try to estimate available bandwidth require at least 2. + * [#comment:TODO: implement same limits for upstream inbound frames as well.] + */ + 'max_inbound_window_update_frames_per_data_frame_sent'?: (_google_protobuf_UInt32Value__Output); + /** + * Allows invalid HTTP messaging and headers. When this option is disabled (default), then + * the whole HTTP/2 connection is terminated upon receiving invalid HEADERS frame. However, + * when this option is enabled, only the offending stream is terminated. + * + * See `RFC7540, sec. 8.1 `_ for details. + */ + 'stream_error_on_invalid_http_messaging': (boolean); + /** + * [#not-implemented-hide:] + * Specifies SETTINGS frame parameters to be sent to the peer, with two exceptions: + * + * 1. SETTINGS_ENABLE_PUSH (0x2) is not configurable as HTTP/2 server push is not supported by + * Envoy. + * + * 2. SETTINGS_ENABLE_CONNECT_PROTOCOL (0x8) is only configurable through the named field + * 'allow_connect'. + * + * Note that custom parameters specified through this field can not also be set in the + * corresponding named parameters: + * + * .. code-block:: text + * + * ID Field Name + * ---------------- + * 0x1 hpack_table_size + * 0x3 max_concurrent_streams + * 0x4 initial_stream_window_size + * + * Collisions will trigger config validation failure on load/update. Likewise, inconsistencies + * between custom parameters with the same identifier will trigger a failure. + * + * See `IANA HTTP/2 Settings + * `_ for + * standardized identifiers. + */ + 'custom_settings_parameters': (_envoy_api_v2_core_Http2ProtocolOptions_SettingsParameter__Output)[]; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/HttpProtocolOptions.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/HttpProtocolOptions.ts new file mode 100644 index 000000000..964645696 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/HttpProtocolOptions.ts @@ -0,0 +1,126 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/protocol.proto + +import { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from '../../../../google/protobuf/Duration'; +import { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output as _google_protobuf_UInt32Value__Output } from '../../../../google/protobuf/UInt32Value'; + +// Original file: deps/envoy-api/envoy/api/v2/core/protocol.proto + +/** + * Action to take when Envoy receives client request with header names containing underscore + * characters. + * Underscore character is allowed in header names by the RFC-7230 and this behavior is implemented + * as a security measure due to systems that treat '_' and '-' as interchangeable. Envoy by default allows client request headers with underscore + * characters. + */ +export enum _envoy_api_v2_core_HttpProtocolOptions_HeadersWithUnderscoresAction { + /** + * Allow headers with underscores. This is the default behavior. + */ + ALLOW = 0, + /** + * Reject client request. HTTP/1 requests are rejected with the 400 status. HTTP/2 requests + * end with the stream reset. The "httpN.requests_rejected_with_underscores_in_headers" counter + * is incremented for each rejected request. + */ + REJECT_REQUEST = 1, + /** + * Drop the header with name containing underscores. The header is dropped before the filter chain is + * invoked and as such filters will not see dropped headers. The + * "httpN.dropped_headers_with_underscores" is incremented for each dropped header. + */ + DROP_HEADER = 2, +} + +/** + * [#next-free-field: 6] + */ +export interface HttpProtocolOptions { + /** + * The idle timeout for connections. The idle timeout is defined as the + * period in which there are no active requests. When the + * idle timeout is reached the connection will be closed. If the connection is an HTTP/2 + * downstream connection a drain sequence will occur prior to closing the connection, see + * :ref:`drain_timeout + * `. + * Note that request based timeouts mean that HTTP/2 PINGs will not keep the connection alive. + * If not specified, this defaults to 1 hour. To disable idle timeouts explicitly set this to 0. + * + * .. warning:: + * Disabling this timeout has a highly likelihood of yielding connection leaks due to lost TCP + * FIN packets, etc. + */ + 'idle_timeout'?: (_google_protobuf_Duration); + /** + * The maximum number of headers. If unconfigured, the default + * maximum number of request headers allowed is 100. Requests that exceed this limit will receive + * a 431 response for HTTP/1.x and cause a stream reset for HTTP/2. + */ + 'max_headers_count'?: (_google_protobuf_UInt32Value); + /** + * The maximum duration of a connection. The duration is defined as a period since a connection + * was established. If not set, there is no max duration. When max_connection_duration is reached + * the connection will be closed. Drain sequence will occur prior to closing the connection if + * if's applicable. See :ref:`drain_timeout + * `. + * Note: not implemented for upstream connections. + */ + 'max_connection_duration'?: (_google_protobuf_Duration); + /** + * Total duration to keep alive an HTTP request/response stream. If the time limit is reached the stream will be + * reset independent of any other timeouts. If not specified, this value is not set. + */ + 'max_stream_duration'?: (_google_protobuf_Duration); + /** + * Action to take when a client request with a header name containing underscore characters is received. + * If this setting is not specified, the value defaults to ALLOW. + * Note: upstream responses are not affected by this setting. + */ + 'headers_with_underscores_action'?: (_envoy_api_v2_core_HttpProtocolOptions_HeadersWithUnderscoresAction | keyof typeof _envoy_api_v2_core_HttpProtocolOptions_HeadersWithUnderscoresAction); +} + +/** + * [#next-free-field: 6] + */ +export interface HttpProtocolOptions__Output { + /** + * The idle timeout for connections. The idle timeout is defined as the + * period in which there are no active requests. When the + * idle timeout is reached the connection will be closed. If the connection is an HTTP/2 + * downstream connection a drain sequence will occur prior to closing the connection, see + * :ref:`drain_timeout + * `. + * Note that request based timeouts mean that HTTP/2 PINGs will not keep the connection alive. + * If not specified, this defaults to 1 hour. To disable idle timeouts explicitly set this to 0. + * + * .. warning:: + * Disabling this timeout has a highly likelihood of yielding connection leaks due to lost TCP + * FIN packets, etc. + */ + 'idle_timeout'?: (_google_protobuf_Duration__Output); + /** + * The maximum number of headers. If unconfigured, the default + * maximum number of request headers allowed is 100. Requests that exceed this limit will receive + * a 431 response for HTTP/1.x and cause a stream reset for HTTP/2. + */ + 'max_headers_count'?: (_google_protobuf_UInt32Value__Output); + /** + * The maximum duration of a connection. The duration is defined as a period since a connection + * was established. If not set, there is no max duration. When max_connection_duration is reached + * the connection will be closed. Drain sequence will occur prior to closing the connection if + * if's applicable. See :ref:`drain_timeout + * `. + * Note: not implemented for upstream connections. + */ + 'max_connection_duration'?: (_google_protobuf_Duration__Output); + /** + * Total duration to keep alive an HTTP request/response stream. If the time limit is reached the stream will be + * reset independent of any other timeouts. If not specified, this value is not set. + */ + 'max_stream_duration'?: (_google_protobuf_Duration__Output); + /** + * Action to take when a client request with a header name containing underscore characters is received. + * If this setting is not specified, the value defaults to ALLOW. + * Note: upstream responses are not affected by this setting. + */ + 'headers_with_underscores_action': (keyof typeof _envoy_api_v2_core_HttpProtocolOptions_HeadersWithUnderscoresAction); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/HttpUri.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/HttpUri.ts new file mode 100644 index 000000000..b01489a64 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/HttpUri.ts @@ -0,0 +1,79 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/http_uri.proto + +import { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from '../../../../google/protobuf/Duration'; + +/** + * Envoy external URI descriptor + */ +export interface HttpUri { + /** + * The HTTP server URI. It should be a full FQDN with protocol, host and path. + * + * Example: + * + * .. code-block:: yaml + * + * uri: https://www.googleapis.com/oauth2/v1/certs + */ + 'uri'?: (string); + /** + * A cluster is created in the Envoy "cluster_manager" config + * section. This field specifies the cluster name. + * + * Example: + * + * .. code-block:: yaml + * + * cluster: jwks_cluster + */ + 'cluster'?: (string); + /** + * Sets the maximum duration in milliseconds that a response can take to arrive upon request. + */ + 'timeout'?: (_google_protobuf_Duration); + /** + * Specify how `uri` is to be fetched. Today, this requires an explicit + * cluster, but in the future we may support dynamic cluster creation or + * inline DNS resolution. See `issue + * `_. + */ + 'http_upstream_type'?: "cluster"; +} + +/** + * Envoy external URI descriptor + */ +export interface HttpUri__Output { + /** + * The HTTP server URI. It should be a full FQDN with protocol, host and path. + * + * Example: + * + * .. code-block:: yaml + * + * uri: https://www.googleapis.com/oauth2/v1/certs + */ + 'uri': (string); + /** + * A cluster is created in the Envoy "cluster_manager" config + * section. This field specifies the cluster name. + * + * Example: + * + * .. code-block:: yaml + * + * cluster: jwks_cluster + */ + 'cluster'?: (string); + /** + * Sets the maximum duration in milliseconds that a response can take to arrive upon request. + */ + 'timeout'?: (_google_protobuf_Duration__Output); + /** + * Specify how `uri` is to be fetched. Today, this requires an explicit + * cluster, but in the future we may support dynamic cluster creation or + * inline DNS resolution. See `issue + * `_. + */ + 'http_upstream_type': "cluster"; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/Locality.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/Locality.ts new file mode 100644 index 000000000..49fb232a4 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/Locality.ts @@ -0,0 +1,56 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/base.proto + + +/** + * Identifies location of where either Envoy runs or where upstream hosts run. + */ +export interface Locality { + /** + * Region this :ref:`zone ` belongs to. + */ + 'region'?: (string); + /** + * Defines the local service zone where Envoy is running. Though optional, it + * should be set if discovery service routing is used and the discovery + * service exposes :ref:`zone data `, + * either in this message or via :option:`--service-zone`. The meaning of zone + * is context dependent, e.g. `Availability Zone (AZ) + * `_ + * on AWS, `Zone `_ on + * GCP, etc. + */ + 'zone'?: (string); + /** + * When used for locality of upstream hosts, this field further splits zone + * into smaller chunks of sub-zones so they can be load balanced + * independently. + */ + 'sub_zone'?: (string); +} + +/** + * Identifies location of where either Envoy runs or where upstream hosts run. + */ +export interface Locality__Output { + /** + * Region this :ref:`zone ` belongs to. + */ + 'region': (string); + /** + * Defines the local service zone where Envoy is running. Though optional, it + * should be set if discovery service routing is used and the discovery + * service exposes :ref:`zone data `, + * either in this message or via :option:`--service-zone`. The meaning of zone + * is context dependent, e.g. `Availability Zone (AZ) + * `_ + * on AWS, `Zone `_ on + * GCP, etc. + */ + 'zone': (string); + /** + * When used for locality of upstream hosts, this field further splits zone + * into smaller chunks of sub-zones so they can be load balanced + * independently. + */ + 'sub_zone': (string); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/Metadata.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/Metadata.ts new file mode 100644 index 000000000..2a3c8f996 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/Metadata.ts @@ -0,0 +1,67 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/base.proto + +import { Struct as _google_protobuf_Struct, Struct__Output as _google_protobuf_Struct__Output } from '../../../../google/protobuf/Struct'; + +/** + * Metadata provides additional inputs to filters based on matched listeners, + * filter chains, routes and endpoints. It is structured as a map, usually from + * filter name (in reverse DNS format) to metadata specific to the filter. Metadata + * key-values for a filter are merged as connection and request handling occurs, + * with later values for the same key overriding earlier values. + * + * An example use of metadata is providing additional values to + * http_connection_manager in the envoy.http_connection_manager.access_log + * namespace. + * + * Another example use of metadata is to per service config info in cluster metadata, which may get + * consumed by multiple filters. + * + * For load balancing, Metadata provides a means to subset cluster endpoints. + * Endpoints have a Metadata object associated and routes contain a Metadata + * object to match against. There are some well defined metadata used today for + * this purpose: + * + * * ``{"envoy.lb": {"canary": }}`` This indicates the canary status of an + * endpoint and is also used during header processing + * (x-envoy-upstream-canary) and for stats purposes. + * [#next-major-version: move to type/metadata/v2] + */ +export interface Metadata { + /** + * Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* + * namespace is reserved for Envoy's built-in filters. + */ + 'filter_metadata'?: ({[key: string]: _google_protobuf_Struct}); +} + +/** + * Metadata provides additional inputs to filters based on matched listeners, + * filter chains, routes and endpoints. It is structured as a map, usually from + * filter name (in reverse DNS format) to metadata specific to the filter. Metadata + * key-values for a filter are merged as connection and request handling occurs, + * with later values for the same key overriding earlier values. + * + * An example use of metadata is providing additional values to + * http_connection_manager in the envoy.http_connection_manager.access_log + * namespace. + * + * Another example use of metadata is to per service config info in cluster metadata, which may get + * consumed by multiple filters. + * + * For load balancing, Metadata provides a means to subset cluster endpoints. + * Endpoints have a Metadata object associated and routes contain a Metadata + * object to match against. There are some well defined metadata used today for + * this purpose: + * + * * ``{"envoy.lb": {"canary": }}`` This indicates the canary status of an + * endpoint and is also used during header processing + * (x-envoy-upstream-canary) and for stats purposes. + * [#next-major-version: move to type/metadata/v2] + */ +export interface Metadata__Output { + /** + * Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* + * namespace is reserved for Envoy's built-in filters. + */ + 'filter_metadata'?: ({[key: string]: _google_protobuf_Struct__Output}); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/Node.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/Node.ts new file mode 100644 index 000000000..5a8842482 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/Node.ts @@ -0,0 +1,173 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/base.proto + +import { Struct as _google_protobuf_Struct, Struct__Output as _google_protobuf_Struct__Output } from '../../../../google/protobuf/Struct'; +import { Locality as _envoy_api_v2_core_Locality, Locality__Output as _envoy_api_v2_core_Locality__Output } from '../../../../envoy/api/v2/core/Locality'; +import { BuildVersion as _envoy_api_v2_core_BuildVersion, BuildVersion__Output as _envoy_api_v2_core_BuildVersion__Output } from '../../../../envoy/api/v2/core/BuildVersion'; +import { Extension as _envoy_api_v2_core_Extension, Extension__Output as _envoy_api_v2_core_Extension__Output } from '../../../../envoy/api/v2/core/Extension'; +import { Address as _envoy_api_v2_core_Address, Address__Output as _envoy_api_v2_core_Address__Output } from '../../../../envoy/api/v2/core/Address'; + +/** + * Identifies a specific Envoy instance. The node identifier is presented to the + * management server, which may use this identifier to distinguish per Envoy + * configuration for serving. + * [#next-free-field: 12] + */ +export interface Node { + /** + * An opaque node identifier for the Envoy node. This also provides the local + * service node name. It should be set if any of the following features are + * used: :ref:`statsd `, :ref:`CDS + * `, and :ref:`HTTP tracing + * `, either in this message or via + * :option:`--service-node`. + */ + 'id'?: (string); + /** + * Defines the local service cluster name where Envoy is running. Though + * optional, it should be set if any of the following features are used: + * :ref:`statsd `, :ref:`health check cluster + * verification + * `, + * :ref:`runtime override directory `, + * :ref:`user agent addition + * `, + * :ref:`HTTP global rate limiting `, + * :ref:`CDS `, and :ref:`HTTP tracing + * `, either in this message or via + * :option:`--service-cluster`. + */ + 'cluster'?: (string); + /** + * Opaque metadata extending the node identifier. Envoy will pass this + * directly to the management server. + */ + 'metadata'?: (_google_protobuf_Struct); + /** + * Locality specifying where the Envoy instance is running. + */ + 'locality'?: (_envoy_api_v2_core_Locality); + /** + * This is motivated by informing a management server during canary which + * version of Envoy is being tested in a heterogeneous fleet. This will be set + * by Envoy in management server RPCs. + * This field is deprecated in favor of the user_agent_name and user_agent_version values. + */ + 'build_version'?: (string); + /** + * Free-form string that identifies the entity requesting config. + * E.g. "envoy" or "grpc" + */ + 'user_agent_name'?: (string); + /** + * Free-form string that identifies the version of the entity requesting config. + * E.g. "1.12.2" or "abcd1234", or "SpecialEnvoyBuild" + */ + 'user_agent_version'?: (string); + /** + * Structured version of the entity requesting config. + */ + 'user_agent_build_version'?: (_envoy_api_v2_core_BuildVersion); + /** + * List of extensions and their versions supported by the node. + */ + 'extensions'?: (_envoy_api_v2_core_Extension)[]; + /** + * Client feature support list. These are well known features described + * in the Envoy API repository for a given major version of an API. Client features + * use reverse DNS naming scheme, for example `com.acme.feature`. + * See :ref:`the list of features ` that xDS client may + * support. + */ + 'client_features'?: (string)[]; + /** + * Known listening ports on the node as a generic hint to the management server + * for filtering :ref:`listeners ` to be returned. For example, + * if there is a listener bound to port 80, the list can optionally contain the + * SocketAddress `(0.0.0.0,80)`. The field is optional and just a hint. + */ + 'listening_addresses'?: (_envoy_api_v2_core_Address)[]; + 'user_agent_version_type'?: "user_agent_version"|"user_agent_build_version"; +} + +/** + * Identifies a specific Envoy instance. The node identifier is presented to the + * management server, which may use this identifier to distinguish per Envoy + * configuration for serving. + * [#next-free-field: 12] + */ +export interface Node__Output { + /** + * An opaque node identifier for the Envoy node. This also provides the local + * service node name. It should be set if any of the following features are + * used: :ref:`statsd `, :ref:`CDS + * `, and :ref:`HTTP tracing + * `, either in this message or via + * :option:`--service-node`. + */ + 'id': (string); + /** + * Defines the local service cluster name where Envoy is running. Though + * optional, it should be set if any of the following features are used: + * :ref:`statsd `, :ref:`health check cluster + * verification + * `, + * :ref:`runtime override directory `, + * :ref:`user agent addition + * `, + * :ref:`HTTP global rate limiting `, + * :ref:`CDS `, and :ref:`HTTP tracing + * `, either in this message or via + * :option:`--service-cluster`. + */ + 'cluster': (string); + /** + * Opaque metadata extending the node identifier. Envoy will pass this + * directly to the management server. + */ + 'metadata'?: (_google_protobuf_Struct__Output); + /** + * Locality specifying where the Envoy instance is running. + */ + 'locality'?: (_envoy_api_v2_core_Locality__Output); + /** + * This is motivated by informing a management server during canary which + * version of Envoy is being tested in a heterogeneous fleet. This will be set + * by Envoy in management server RPCs. + * This field is deprecated in favor of the user_agent_name and user_agent_version values. + */ + 'build_version': (string); + /** + * Free-form string that identifies the entity requesting config. + * E.g. "envoy" or "grpc" + */ + 'user_agent_name': (string); + /** + * Free-form string that identifies the version of the entity requesting config. + * E.g. "1.12.2" or "abcd1234", or "SpecialEnvoyBuild" + */ + 'user_agent_version'?: (string); + /** + * Structured version of the entity requesting config. + */ + 'user_agent_build_version'?: (_envoy_api_v2_core_BuildVersion__Output); + /** + * List of extensions and their versions supported by the node. + */ + 'extensions': (_envoy_api_v2_core_Extension__Output)[]; + /** + * Client feature support list. These are well known features described + * in the Envoy API repository for a given major version of an API. Client features + * use reverse DNS naming scheme, for example `com.acme.feature`. + * See :ref:`the list of features ` that xDS client may + * support. + */ + 'client_features': (string)[]; + /** + * Known listening ports on the node as a generic hint to the management server + * for filtering :ref:`listeners ` to be returned. For example, + * if there is a listener bound to port 80, the list can optionally contain the + * SocketAddress `(0.0.0.0,80)`. The field is optional and just a hint. + */ + 'listening_addresses': (_envoy_api_v2_core_Address__Output)[]; + 'user_agent_version_type': "user_agent_version"|"user_agent_build_version"; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/Pipe.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/Pipe.ts new file mode 100644 index 000000000..9e6cbb82d --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/Pipe.ts @@ -0,0 +1,30 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/address.proto + + +export interface Pipe { + /** + * Unix Domain Socket path. On Linux, paths starting with '@' will use the + * abstract namespace. The starting '@' is replaced by a null byte by Envoy. + * Paths starting with '@' will result in an error in environments other than + * Linux. + */ + 'path'?: (string); + /** + * The mode for the Pipe. Not applicable for abstract sockets. + */ + 'mode'?: (number); +} + +export interface Pipe__Output { + /** + * Unix Domain Socket path. On Linux, paths starting with '@' will use the + * abstract namespace. The starting '@' is replaced by a null byte by Envoy. + * Paths starting with '@' will result in an error in environments other than + * Linux. + */ + 'path': (string); + /** + * The mode for the Pipe. Not applicable for abstract sockets. + */ + 'mode': (number); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/RateLimitSettings.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/RateLimitSettings.ts new file mode 100644 index 000000000..05cb819c9 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/RateLimitSettings.ts @@ -0,0 +1,36 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/config_source.proto + +import { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output as _google_protobuf_UInt32Value__Output } from '../../../../google/protobuf/UInt32Value'; +import { DoubleValue as _google_protobuf_DoubleValue, DoubleValue__Output as _google_protobuf_DoubleValue__Output } from '../../../../google/protobuf/DoubleValue'; + +/** + * Rate Limit settings to be applied for discovery requests made by Envoy. + */ +export interface RateLimitSettings { + /** + * Maximum number of tokens to be used for rate limiting discovery request calls. If not set, a + * default value of 100 will be used. + */ + 'max_tokens'?: (_google_protobuf_UInt32Value); + /** + * Rate at which tokens will be filled per second. If not set, a default fill rate of 10 tokens + * per second will be used. + */ + 'fill_rate'?: (_google_protobuf_DoubleValue); +} + +/** + * Rate Limit settings to be applied for discovery requests made by Envoy. + */ +export interface RateLimitSettings__Output { + /** + * Maximum number of tokens to be used for rate limiting discovery request calls. If not set, a + * default value of 100 will be used. + */ + 'max_tokens'?: (_google_protobuf_UInt32Value__Output); + /** + * Rate at which tokens will be filled per second. If not set, a default fill rate of 10 tokens + * per second will be used. + */ + 'fill_rate'?: (_google_protobuf_DoubleValue__Output); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/RemoteDataSource.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/RemoteDataSource.ts new file mode 100644 index 000000000..603cc258c --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/RemoteDataSource.ts @@ -0,0 +1,40 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/base.proto + +import { HttpUri as _envoy_api_v2_core_HttpUri, HttpUri__Output as _envoy_api_v2_core_HttpUri__Output } from '../../../../envoy/api/v2/core/HttpUri'; +import { RetryPolicy as _envoy_api_v2_core_RetryPolicy, RetryPolicy__Output as _envoy_api_v2_core_RetryPolicy__Output } from '../../../../envoy/api/v2/core/RetryPolicy'; + +/** + * The message specifies how to fetch data from remote and how to verify it. + */ +export interface RemoteDataSource { + /** + * The HTTP URI to fetch the remote data. + */ + 'http_uri'?: (_envoy_api_v2_core_HttpUri); + /** + * SHA256 string for verifying data. + */ + 'sha256'?: (string); + /** + * Retry policy for fetching remote data. + */ + 'retry_policy'?: (_envoy_api_v2_core_RetryPolicy); +} + +/** + * The message specifies how to fetch data from remote and how to verify it. + */ +export interface RemoteDataSource__Output { + /** + * The HTTP URI to fetch the remote data. + */ + 'http_uri'?: (_envoy_api_v2_core_HttpUri__Output); + /** + * SHA256 string for verifying data. + */ + 'sha256': (string); + /** + * Retry policy for fetching remote data. + */ + 'retry_policy'?: (_envoy_api_v2_core_RetryPolicy__Output); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/RequestMethod.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/RequestMethod.ts new file mode 100644 index 000000000..029e9882d --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/RequestMethod.ts @@ -0,0 +1,17 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/base.proto + +/** + * HTTP request method. + */ +export enum RequestMethod { + METHOD_UNSPECIFIED = 0, + GET = 1, + HEAD = 2, + POST = 3, + PUT = 4, + DELETE = 5, + CONNECT = 6, + OPTIONS = 7, + TRACE = 8, + PATCH = 9, +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/RetryPolicy.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/RetryPolicy.ts new file mode 100644 index 000000000..4df63c53e --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/RetryPolicy.ts @@ -0,0 +1,38 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/base.proto + +import { BackoffStrategy as _envoy_api_v2_core_BackoffStrategy, BackoffStrategy__Output as _envoy_api_v2_core_BackoffStrategy__Output } from '../../../../envoy/api/v2/core/BackoffStrategy'; +import { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output as _google_protobuf_UInt32Value__Output } from '../../../../google/protobuf/UInt32Value'; + +/** + * The message specifies the retry policy of remote data source when fetching fails. + */ +export interface RetryPolicy { + /** + * Specifies parameters that control :ref:`retry backoff strategy `. + * This parameter is optional, in which case the default base interval is 1000 milliseconds. The + * default maximum interval is 10 times the base interval. + */ + 'retry_back_off'?: (_envoy_api_v2_core_BackoffStrategy); + /** + * Specifies the allowed number of retries. This parameter is optional and + * defaults to 1. + */ + 'num_retries'?: (_google_protobuf_UInt32Value); +} + +/** + * The message specifies the retry policy of remote data source when fetching fails. + */ +export interface RetryPolicy__Output { + /** + * Specifies parameters that control :ref:`retry backoff strategy `. + * This parameter is optional, in which case the default base interval is 1000 milliseconds. The + * default maximum interval is 10 times the base interval. + */ + 'retry_back_off'?: (_envoy_api_v2_core_BackoffStrategy__Output); + /** + * Specifies the allowed number of retries. This parameter is optional and + * defaults to 1. + */ + 'num_retries'?: (_google_protobuf_UInt32Value__Output); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/RoutingPriority.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/RoutingPriority.ts new file mode 100644 index 000000000..5937fceb2 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/RoutingPriority.ts @@ -0,0 +1,15 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/base.proto + +/** + * Envoy supports :ref:`upstream priority routing + * ` both at the route and the virtual + * cluster level. The current priority implementation uses different connection + * pool and circuit breaking settings for each priority level. This means that + * even for HTTP/2 requests, two physical connections will be used to an + * upstream host. In the future Envoy will likely support true HTTP/2 priority + * over a single upstream connection. + */ +export enum RoutingPriority { + DEFAULT = 0, + HIGH = 1, +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/RuntimeDouble.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/RuntimeDouble.ts new file mode 100644 index 000000000..8d9aba3e0 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/RuntimeDouble.ts @@ -0,0 +1,30 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/base.proto + + +/** + * Runtime derived double with a default when not specified. + */ +export interface RuntimeDouble { + /** + * Default value if runtime value is not available. + */ + 'default_value'?: (number | string); + /** + * Runtime key to get value for comparison. This value is used if defined. + */ + 'runtime_key'?: (string); +} + +/** + * Runtime derived double with a default when not specified. + */ +export interface RuntimeDouble__Output { + /** + * Default value if runtime value is not available. + */ + 'default_value': (number | string); + /** + * Runtime key to get value for comparison. This value is used if defined. + */ + 'runtime_key': (string); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/RuntimeFeatureFlag.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/RuntimeFeatureFlag.ts new file mode 100644 index 000000000..6994218d1 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/RuntimeFeatureFlag.ts @@ -0,0 +1,35 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/base.proto + +import { BoolValue as _google_protobuf_BoolValue, BoolValue__Output as _google_protobuf_BoolValue__Output } from '../../../../google/protobuf/BoolValue'; + +/** + * Runtime derived bool with a default when not specified. + */ +export interface RuntimeFeatureFlag { + /** + * Default value if runtime value is not available. + */ + 'default_value'?: (_google_protobuf_BoolValue); + /** + * Runtime key to get value for comparison. This value is used if defined. The boolean value must + * be represented via its + * `canonical JSON encoding `_. + */ + 'runtime_key'?: (string); +} + +/** + * Runtime derived bool with a default when not specified. + */ +export interface RuntimeFeatureFlag__Output { + /** + * Default value if runtime value is not available. + */ + 'default_value'?: (_google_protobuf_BoolValue__Output); + /** + * Runtime key to get value for comparison. This value is used if defined. The boolean value must + * be represented via its + * `canonical JSON encoding `_. + */ + 'runtime_key': (string); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/RuntimeFractionalPercent.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/RuntimeFractionalPercent.ts new file mode 100644 index 000000000..78eeb3257 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/RuntimeFractionalPercent.ts @@ -0,0 +1,49 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/base.proto + +import { FractionalPercent as _envoy_type_FractionalPercent, FractionalPercent__Output as _envoy_type_FractionalPercent__Output } from '../../../../envoy/type/FractionalPercent'; + +/** + * Runtime derived FractionalPercent with defaults for when the numerator or denominator is not + * specified via a runtime key. + * + * .. note:: + * + * Parsing of the runtime key's data is implemented such that it may be represented as a + * :ref:`FractionalPercent ` proto represented as JSON/YAML + * and may also be represented as an integer with the assumption that the value is an integral + * percentage out of 100. For instance, a runtime key lookup returning the value "42" would parse + * as a `FractionalPercent` whose numerator is 42 and denominator is HUNDRED. + */ +export interface RuntimeFractionalPercent { + /** + * Default value if the runtime value's for the numerator/denominator keys are not available. + */ + 'default_value'?: (_envoy_type_FractionalPercent); + /** + * Runtime key for a YAML representation of a FractionalPercent. + */ + 'runtime_key'?: (string); +} + +/** + * Runtime derived FractionalPercent with defaults for when the numerator or denominator is not + * specified via a runtime key. + * + * .. note:: + * + * Parsing of the runtime key's data is implemented such that it may be represented as a + * :ref:`FractionalPercent ` proto represented as JSON/YAML + * and may also be represented as an integer with the assumption that the value is an integral + * percentage out of 100. For instance, a runtime key lookup returning the value "42" would parse + * as a `FractionalPercent` whose numerator is 42 and denominator is HUNDRED. + */ +export interface RuntimeFractionalPercent__Output { + /** + * Default value if the runtime value's for the numerator/denominator keys are not available. + */ + 'default_value'?: (_envoy_type_FractionalPercent__Output); + /** + * Runtime key for a YAML representation of a FractionalPercent. + */ + 'runtime_key': (string); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/RuntimeUInt32.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/RuntimeUInt32.ts new file mode 100644 index 000000000..72e8972a4 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/RuntimeUInt32.ts @@ -0,0 +1,30 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/base.proto + + +/** + * Runtime derived uint32 with a default when not specified. + */ +export interface RuntimeUInt32 { + /** + * Default value if runtime value is not available. + */ + 'default_value'?: (number); + /** + * Runtime key to get value for comparison. This value is used if defined. + */ + 'runtime_key'?: (string); +} + +/** + * Runtime derived uint32 with a default when not specified. + */ +export interface RuntimeUInt32__Output { + /** + * Default value if runtime value is not available. + */ + 'default_value': (number); + /** + * Runtime key to get value for comparison. This value is used if defined. + */ + 'runtime_key': (string); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/SelfConfigSource.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/SelfConfigSource.ts new file mode 100644 index 000000000..144cfdf5a --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/SelfConfigSource.ts @@ -0,0 +1,20 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/config_source.proto + + +/** + * [#not-implemented-hide:] + * Self-referencing config source options. This is currently empty, but when + * set in :ref:`ConfigSource ` can be used to + * specify that other data can be obtained from the same server. + */ +export interface SelfConfigSource { +} + +/** + * [#not-implemented-hide:] + * Self-referencing config source options. This is currently empty, but when + * set in :ref:`ConfigSource ` can be used to + * specify that other data can be obtained from the same server. + */ +export interface SelfConfigSource__Output { +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/SocketAddress.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/SocketAddress.ts new file mode 100644 index 000000000..f81c981c1 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/SocketAddress.ts @@ -0,0 +1,97 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/address.proto + + +// Original file: deps/envoy-api/envoy/api/v2/core/address.proto + +export enum _envoy_api_v2_core_SocketAddress_Protocol { + TCP = 0, + UDP = 1, +} + +/** + * [#next-free-field: 7] + */ +export interface SocketAddress { + 'protocol'?: (_envoy_api_v2_core_SocketAddress_Protocol | keyof typeof _envoy_api_v2_core_SocketAddress_Protocol); + /** + * The address for this socket. :ref:`Listeners ` will bind + * to the address. An empty address is not allowed. Specify ``0.0.0.0`` or ``::`` + * to bind to any address. [#comment:TODO(zuercher) reinstate when implemented: + * It is possible to distinguish a Listener address via the prefix/suffix matching + * in :ref:`FilterChainMatch `.] When used + * within an upstream :ref:`BindConfig `, the address + * controls the source address of outbound connections. For :ref:`clusters + * `, the cluster type determines whether the + * address must be an IP (*STATIC* or *EDS* clusters) or a hostname resolved by DNS + * (*STRICT_DNS* or *LOGICAL_DNS* clusters). Address resolution can be customized + * via :ref:`resolver_name `. + */ + 'address'?: (string); + 'port_value'?: (number); + /** + * This is only valid if :ref:`resolver_name + * ` is specified below and the + * named resolver is capable of named port resolution. + */ + 'named_port'?: (string); + /** + * The name of the custom resolver. This must have been registered with Envoy. If + * this is empty, a context dependent default applies. If the address is a concrete + * IP address, no resolution will occur. If address is a hostname this + * should be set for resolution other than DNS. Specifying a custom resolver with + * *STRICT_DNS* or *LOGICAL_DNS* will generate an error at runtime. + */ + 'resolver_name'?: (string); + /** + * When binding to an IPv6 address above, this enables `IPv4 compatibility + * `_. Binding to ``::`` will + * allow both IPv4 and IPv6 connections, with peer IPv4 addresses mapped into + * IPv6 space as ``::FFFF:``. + */ + 'ipv4_compat'?: (boolean); + 'port_specifier'?: "port_value"|"named_port"; +} + +/** + * [#next-free-field: 7] + */ +export interface SocketAddress__Output { + 'protocol': (keyof typeof _envoy_api_v2_core_SocketAddress_Protocol); + /** + * The address for this socket. :ref:`Listeners ` will bind + * to the address. An empty address is not allowed. Specify ``0.0.0.0`` or ``::`` + * to bind to any address. [#comment:TODO(zuercher) reinstate when implemented: + * It is possible to distinguish a Listener address via the prefix/suffix matching + * in :ref:`FilterChainMatch `.] When used + * within an upstream :ref:`BindConfig `, the address + * controls the source address of outbound connections. For :ref:`clusters + * `, the cluster type determines whether the + * address must be an IP (*STATIC* or *EDS* clusters) or a hostname resolved by DNS + * (*STRICT_DNS* or *LOGICAL_DNS* clusters). Address resolution can be customized + * via :ref:`resolver_name `. + */ + 'address': (string); + 'port_value'?: (number); + /** + * This is only valid if :ref:`resolver_name + * ` is specified below and the + * named resolver is capable of named port resolution. + */ + 'named_port'?: (string); + /** + * The name of the custom resolver. This must have been registered with Envoy. If + * this is empty, a context dependent default applies. If the address is a concrete + * IP address, no resolution will occur. If address is a hostname this + * should be set for resolution other than DNS. Specifying a custom resolver with + * *STRICT_DNS* or *LOGICAL_DNS* will generate an error at runtime. + */ + 'resolver_name': (string); + /** + * When binding to an IPv6 address above, this enables `IPv4 compatibility + * `_. Binding to ``::`` will + * allow both IPv4 and IPv6 connections, with peer IPv4 addresses mapped into + * IPv6 space as ``::FFFF:``. + */ + 'ipv4_compat': (boolean); + 'port_specifier': "port_value"|"named_port"; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/SocketOption.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/SocketOption.ts new file mode 100644 index 000000000..0c4a4e1ca --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/SocketOption.ts @@ -0,0 +1,90 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/socket_option.proto + +import { Long } from '@grpc/proto-loader'; + +// Original file: deps/envoy-api/envoy/api/v2/core/socket_option.proto + +export enum _envoy_api_v2_core_SocketOption_SocketState { + /** + * Socket options are applied after socket creation but before binding the socket to a port + */ + STATE_PREBIND = 0, + /** + * Socket options are applied after binding the socket to a port but before calling listen() + */ + STATE_BOUND = 1, + /** + * Socket options are applied after calling listen() + */ + STATE_LISTENING = 2, +} + +/** + * Generic socket option message. This would be used to set socket options that + * might not exist in upstream kernels or precompiled Envoy binaries. + * [#next-free-field: 7] + */ +export interface SocketOption { + /** + * An optional name to give this socket option for debugging, etc. + * Uniqueness is not required and no special meaning is assumed. + */ + 'description'?: (string); + /** + * Corresponding to the level value passed to setsockopt, such as IPPROTO_TCP + */ + 'level'?: (number | string | Long); + /** + * The numeric name as passed to setsockopt + */ + 'name'?: (number | string | Long); + /** + * Because many sockopts take an int value. + */ + 'int_value'?: (number | string | Long); + /** + * Otherwise it's a byte buffer. + */ + 'buf_value'?: (Buffer | Uint8Array | string); + /** + * The state in which the option will be applied. When used in BindConfig + * STATE_PREBIND is currently the only valid value. + */ + 'state'?: (_envoy_api_v2_core_SocketOption_SocketState | keyof typeof _envoy_api_v2_core_SocketOption_SocketState); + 'value'?: "int_value"|"buf_value"; +} + +/** + * Generic socket option message. This would be used to set socket options that + * might not exist in upstream kernels or precompiled Envoy binaries. + * [#next-free-field: 7] + */ +export interface SocketOption__Output { + /** + * An optional name to give this socket option for debugging, etc. + * Uniqueness is not required and no special meaning is assumed. + */ + 'description': (string); + /** + * Corresponding to the level value passed to setsockopt, such as IPPROTO_TCP + */ + 'level': (string); + /** + * The numeric name as passed to setsockopt + */ + 'name': (string); + /** + * Because many sockopts take an int value. + */ + 'int_value'?: (string); + /** + * Otherwise it's a byte buffer. + */ + 'buf_value'?: (Buffer); + /** + * The state in which the option will be applied. When used in BindConfig + * STATE_PREBIND is currently the only valid value. + */ + 'state': (keyof typeof _envoy_api_v2_core_SocketOption_SocketState); + 'value': "int_value"|"buf_value"; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/TcpKeepalive.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/TcpKeepalive.ts new file mode 100644 index 000000000..e6c85ba44 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/TcpKeepalive.ts @@ -0,0 +1,43 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/address.proto + +import { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output as _google_protobuf_UInt32Value__Output } from '../../../../google/protobuf/UInt32Value'; + +export interface TcpKeepalive { + /** + * Maximum number of keepalive probes to send without response before deciding + * the connection is dead. Default is to use the OS level configuration (unless + * overridden, Linux defaults to 9.) + */ + 'keepalive_probes'?: (_google_protobuf_UInt32Value); + /** + * The number of seconds a connection needs to be idle before keep-alive probes + * start being sent. Default is to use the OS level configuration (unless + * overridden, Linux defaults to 7200s (i.e., 2 hours.) + */ + 'keepalive_time'?: (_google_protobuf_UInt32Value); + /** + * The number of seconds between keep-alive probes. Default is to use the OS + * level configuration (unless overridden, Linux defaults to 75s.) + */ + 'keepalive_interval'?: (_google_protobuf_UInt32Value); +} + +export interface TcpKeepalive__Output { + /** + * Maximum number of keepalive probes to send without response before deciding + * the connection is dead. Default is to use the OS level configuration (unless + * overridden, Linux defaults to 9.) + */ + 'keepalive_probes'?: (_google_protobuf_UInt32Value__Output); + /** + * The number of seconds a connection needs to be idle before keep-alive probes + * start being sent. Default is to use the OS level configuration (unless + * overridden, Linux defaults to 7200s (i.e., 2 hours.) + */ + 'keepalive_time'?: (_google_protobuf_UInt32Value__Output); + /** + * The number of seconds between keep-alive probes. Default is to use the OS + * level configuration (unless overridden, Linux defaults to 75s.) + */ + 'keepalive_interval'?: (_google_protobuf_UInt32Value__Output); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/TcpProtocolOptions.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/TcpProtocolOptions.ts new file mode 100644 index 000000000..bb7afc1d1 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/TcpProtocolOptions.ts @@ -0,0 +1,14 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/protocol.proto + + +/** + * [#not-implemented-hide:] + */ +export interface TcpProtocolOptions { +} + +/** + * [#not-implemented-hide:] + */ +export interface TcpProtocolOptions__Output { +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/TrafficDirection.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/TrafficDirection.ts new file mode 100644 index 000000000..41cf36523 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/TrafficDirection.ts @@ -0,0 +1,19 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/base.proto + +/** + * Identifies the direction of the traffic relative to the local Envoy. + */ +export enum TrafficDirection { + /** + * Default option is unspecified. + */ + UNSPECIFIED = 0, + /** + * The transport is used for incoming traffic. + */ + INBOUND = 1, + /** + * The transport is used for outgoing traffic. + */ + OUTBOUND = 2, +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/TransportSocket.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/TransportSocket.ts new file mode 100644 index 000000000..3034df987 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/TransportSocket.ts @@ -0,0 +1,46 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/base.proto + +import { Struct as _google_protobuf_Struct, Struct__Output as _google_protobuf_Struct__Output } from '../../../../google/protobuf/Struct'; +import { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../../google/protobuf/Any'; + +/** + * Configuration for transport socket in :ref:`listeners ` and + * :ref:`clusters `. If the configuration is + * empty, a default transport socket implementation and configuration will be + * chosen based on the platform and existence of tls_context. + */ +export interface TransportSocket { + /** + * The name of the transport socket to instantiate. The name must match a supported transport + * socket implementation. + */ + 'name'?: (string); + 'config'?: (_google_protobuf_Struct); + 'typed_config'?: (_google_protobuf_Any); + /** + * Implementation specific configuration which depends on the implementation being instantiated. + * See the supported transport socket implementations for further documentation. + */ + 'config_type'?: "config"|"typed_config"; +} + +/** + * Configuration for transport socket in :ref:`listeners ` and + * :ref:`clusters `. If the configuration is + * empty, a default transport socket implementation and configuration will be + * chosen based on the platform and existence of tls_context. + */ +export interface TransportSocket__Output { + /** + * The name of the transport socket to instantiate. The name must match a supported transport + * socket implementation. + */ + 'name': (string); + 'config'?: (_google_protobuf_Struct__Output); + 'typed_config'?: (_google_protobuf_Any__Output); + /** + * Implementation specific configuration which depends on the implementation being instantiated. + * See the supported transport socket implementations for further documentation. + */ + 'config_type': "config"|"typed_config"; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/core/UpstreamHttpProtocolOptions.ts b/packages/grpc-js/src/generated/envoy/api/v2/core/UpstreamHttpProtocolOptions.ts new file mode 100644 index 000000000..9c55560e8 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/core/UpstreamHttpProtocolOptions.ts @@ -0,0 +1,34 @@ +// Original file: deps/envoy-api/envoy/api/v2/core/protocol.proto + + +export interface UpstreamHttpProtocolOptions { + /** + * Set transport socket `SNI `_ for new + * upstream connections based on the downstream HTTP host/authority header, as seen by the + * :ref:`router filter `. + */ + 'auto_sni'?: (boolean); + /** + * Automatic validate upstream presented certificate for new upstream connections based on the + * downstream HTTP host/authority header, as seen by the + * :ref:`router filter `. + * This field is intended to set with `auto_sni` field. + */ + 'auto_san_validation'?: (boolean); +} + +export interface UpstreamHttpProtocolOptions__Output { + /** + * Set transport socket `SNI `_ for new + * upstream connections based on the downstream HTTP host/authority header, as seen by the + * :ref:`router filter `. + */ + 'auto_sni': (boolean); + /** + * Automatic validate upstream presented certificate for new upstream connections based on the + * downstream HTTP host/authority header, as seen by the + * :ref:`router filter `. + * This field is intended to set with `auto_sni` field. + */ + 'auto_san_validation': (boolean); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/endpoint/Endpoint.ts b/packages/grpc-js/src/generated/envoy/api/v2/endpoint/Endpoint.ts new file mode 100644 index 000000000..f9a69142a --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/endpoint/Endpoint.ts @@ -0,0 +1,119 @@ +// Original file: deps/envoy-api/envoy/api/v2/endpoint/endpoint_components.proto + +import { Address as _envoy_api_v2_core_Address, Address__Output as _envoy_api_v2_core_Address__Output } from '../../../../envoy/api/v2/core/Address'; + +/** + * The optional health check configuration. + */ +export interface _envoy_api_v2_endpoint_Endpoint_HealthCheckConfig { + /** + * Optional alternative health check port value. + * + * By default the health check address port of an upstream host is the same + * as the host's serving address port. This provides an alternative health + * check port. Setting this with a non-zero value allows an upstream host + * to have different health check address port. + */ + 'port_value'?: (number); + /** + * By default, the host header for L7 health checks is controlled by cluster level configuration + * (see: :ref:`host ` and + * :ref:`authority `). Setting this + * to a non-empty value allows overriding the cluster level configuration for a specific + * endpoint. + */ + 'hostname'?: (string); +} + +/** + * The optional health check configuration. + */ +export interface _envoy_api_v2_endpoint_Endpoint_HealthCheckConfig__Output { + /** + * Optional alternative health check port value. + * + * By default the health check address port of an upstream host is the same + * as the host's serving address port. This provides an alternative health + * check port. Setting this with a non-zero value allows an upstream host + * to have different health check address port. + */ + 'port_value': (number); + /** + * By default, the host header for L7 health checks is controlled by cluster level configuration + * (see: :ref:`host ` and + * :ref:`authority `). Setting this + * to a non-empty value allows overriding the cluster level configuration for a specific + * endpoint. + */ + 'hostname': (string); +} + +/** + * Upstream host identifier. + */ +export interface Endpoint { + /** + * The upstream host address. + * + * .. attention:: + * + * The form of host address depends on the given cluster type. For STATIC or EDS, + * it is expected to be a direct IP address (or something resolvable by the + * specified :ref:`resolver ` + * in the Address). For LOGICAL or STRICT DNS, it is expected to be hostname, + * and will be resolved via DNS. + */ + 'address'?: (_envoy_api_v2_core_Address); + /** + * The optional health check configuration is used as configuration for the + * health checker to contact the health checked host. + * + * .. attention:: + * + * This takes into effect only for upstream clusters with + * :ref:`active health checking ` enabled. + */ + 'health_check_config'?: (_envoy_api_v2_endpoint_Endpoint_HealthCheckConfig); + /** + * The hostname associated with this endpoint. This hostname is not used for routing or address + * resolution. If provided, it will be associated with the endpoint, and can be used for features + * that require a hostname, like + * :ref:`auto_host_rewrite `. + */ + 'hostname'?: (string); +} + +/** + * Upstream host identifier. + */ +export interface Endpoint__Output { + /** + * The upstream host address. + * + * .. attention:: + * + * The form of host address depends on the given cluster type. For STATIC or EDS, + * it is expected to be a direct IP address (or something resolvable by the + * specified :ref:`resolver ` + * in the Address). For LOGICAL or STRICT DNS, it is expected to be hostname, + * and will be resolved via DNS. + */ + 'address'?: (_envoy_api_v2_core_Address__Output); + /** + * The optional health check configuration is used as configuration for the + * health checker to contact the health checked host. + * + * .. attention:: + * + * This takes into effect only for upstream clusters with + * :ref:`active health checking ` enabled. + */ + 'health_check_config'?: (_envoy_api_v2_endpoint_Endpoint_HealthCheckConfig__Output); + /** + * The hostname associated with this endpoint. This hostname is not used for routing or address + * resolution. If provided, it will be associated with the endpoint, and can be used for features + * that require a hostname, like + * :ref:`auto_host_rewrite `. + */ + 'hostname': (string); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/endpoint/LbEndpoint.ts b/packages/grpc-js/src/generated/envoy/api/v2/endpoint/LbEndpoint.ts new file mode 100644 index 000000000..fa8e64999 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/endpoint/LbEndpoint.ts @@ -0,0 +1,90 @@ +// Original file: deps/envoy-api/envoy/api/v2/endpoint/endpoint_components.proto + +import { Endpoint as _envoy_api_v2_endpoint_Endpoint, Endpoint__Output as _envoy_api_v2_endpoint_Endpoint__Output } from '../../../../envoy/api/v2/endpoint/Endpoint'; +import { HealthStatus as _envoy_api_v2_core_HealthStatus } from '../../../../envoy/api/v2/core/HealthStatus'; +import { Metadata as _envoy_api_v2_core_Metadata, Metadata__Output as _envoy_api_v2_core_Metadata__Output } from '../../../../envoy/api/v2/core/Metadata'; +import { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output as _google_protobuf_UInt32Value__Output } from '../../../../google/protobuf/UInt32Value'; + +/** + * An Endpoint that Envoy can route traffic to. + * [#next-free-field: 6] + */ +export interface LbEndpoint { + 'endpoint'?: (_envoy_api_v2_endpoint_Endpoint); + /** + * Optional health status when known and supplied by EDS server. + */ + 'health_status'?: (_envoy_api_v2_core_HealthStatus | keyof typeof _envoy_api_v2_core_HealthStatus); + /** + * The endpoint metadata specifies values that may be used by the load + * balancer to select endpoints in a cluster for a given request. The filter + * name should be specified as *envoy.lb*. An example boolean key-value pair + * is *canary*, providing the optional canary status of the upstream host. + * This may be matched against in a route's + * :ref:`RouteAction ` metadata_match field + * to subset the endpoints considered in cluster load balancing. + */ + 'metadata'?: (_envoy_api_v2_core_Metadata); + /** + * The optional load balancing weight of the upstream host; at least 1. + * Envoy uses the load balancing weight in some of the built in load + * balancers. The load balancing weight for an endpoint is divided by the sum + * of the weights of all endpoints in the endpoint's locality to produce a + * percentage of traffic for the endpoint. This percentage is then further + * weighted by the endpoint's locality's load balancing weight from + * LocalityLbEndpoints. If unspecified, each host is presumed to have equal + * weight in a locality. The sum of the weights of all endpoints in the + * endpoint's locality must not exceed uint32_t maximal value (4294967295). + */ + 'load_balancing_weight'?: (_google_protobuf_UInt32Value); + /** + * [#not-implemented-hide:] + */ + 'endpoint_name'?: (string); + /** + * Upstream host identifier or a named reference. + */ + 'host_identifier'?: "endpoint"|"endpoint_name"; +} + +/** + * An Endpoint that Envoy can route traffic to. + * [#next-free-field: 6] + */ +export interface LbEndpoint__Output { + 'endpoint'?: (_envoy_api_v2_endpoint_Endpoint__Output); + /** + * Optional health status when known and supplied by EDS server. + */ + 'health_status': (keyof typeof _envoy_api_v2_core_HealthStatus); + /** + * The endpoint metadata specifies values that may be used by the load + * balancer to select endpoints in a cluster for a given request. The filter + * name should be specified as *envoy.lb*. An example boolean key-value pair + * is *canary*, providing the optional canary status of the upstream host. + * This may be matched against in a route's + * :ref:`RouteAction ` metadata_match field + * to subset the endpoints considered in cluster load balancing. + */ + 'metadata'?: (_envoy_api_v2_core_Metadata__Output); + /** + * The optional load balancing weight of the upstream host; at least 1. + * Envoy uses the load balancing weight in some of the built in load + * balancers. The load balancing weight for an endpoint is divided by the sum + * of the weights of all endpoints in the endpoint's locality to produce a + * percentage of traffic for the endpoint. This percentage is then further + * weighted by the endpoint's locality's load balancing weight from + * LocalityLbEndpoints. If unspecified, each host is presumed to have equal + * weight in a locality. The sum of the weights of all endpoints in the + * endpoint's locality must not exceed uint32_t maximal value (4294967295). + */ + 'load_balancing_weight'?: (_google_protobuf_UInt32Value__Output); + /** + * [#not-implemented-hide:] + */ + 'endpoint_name'?: (string); + /** + * Upstream host identifier or a named reference. + */ + 'host_identifier': "endpoint"|"endpoint_name"; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/endpoint/LocalityLbEndpoints.ts b/packages/grpc-js/src/generated/envoy/api/v2/endpoint/LocalityLbEndpoints.ts new file mode 100644 index 000000000..401ea7313 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/endpoint/LocalityLbEndpoints.ts @@ -0,0 +1,111 @@ +// Original file: deps/envoy-api/envoy/api/v2/endpoint/endpoint_components.proto + +import { Locality as _envoy_api_v2_core_Locality, Locality__Output as _envoy_api_v2_core_Locality__Output } from '../../../../envoy/api/v2/core/Locality'; +import { LbEndpoint as _envoy_api_v2_endpoint_LbEndpoint, LbEndpoint__Output as _envoy_api_v2_endpoint_LbEndpoint__Output } from '../../../../envoy/api/v2/endpoint/LbEndpoint'; +import { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output as _google_protobuf_UInt32Value__Output } from '../../../../google/protobuf/UInt32Value'; + +/** + * A group of endpoints belonging to a Locality. + * One can have multiple LocalityLbEndpoints for a locality, but this is + * generally only done if the different groups need to have different load + * balancing weights or different priorities. + * [#next-free-field: 7] + */ +export interface LocalityLbEndpoints { + /** + * Identifies location of where the upstream hosts run. + */ + 'locality'?: (_envoy_api_v2_core_Locality); + /** + * The group of endpoints belonging to the locality specified. + */ + 'lb_endpoints'?: (_envoy_api_v2_endpoint_LbEndpoint)[]; + /** + * Optional: Per priority/region/zone/sub_zone weight; at least 1. The load + * balancing weight for a locality is divided by the sum of the weights of all + * localities at the same priority level to produce the effective percentage + * of traffic for the locality. The sum of the weights of all localities at + * the same priority level must not exceed uint32_t maximal value (4294967295). + * + * Locality weights are only considered when :ref:`locality weighted load + * balancing ` is + * configured. These weights are ignored otherwise. If no weights are + * specified when locality weighted load balancing is enabled, the locality is + * assigned no load. + */ + 'load_balancing_weight'?: (_google_protobuf_UInt32Value); + /** + * Optional: the priority for this LocalityLbEndpoints. If unspecified this will + * default to the highest priority (0). + * + * Under usual circumstances, Envoy will only select endpoints for the highest + * priority (0). In the event all endpoints for a particular priority are + * unavailable/unhealthy, Envoy will fail over to selecting endpoints for the + * next highest priority group. + * + * Priorities should range from 0 (highest) to N (lowest) without skipping. + */ + 'priority'?: (number); + /** + * Optional: Per locality proximity value which indicates how close this + * locality is from the source locality. This value only provides ordering + * information (lower the value, closer it is to the source locality). + * This will be consumed by load balancing schemes that need proximity order + * to determine where to route the requests. + * [#not-implemented-hide:] + */ + 'proximity'?: (_google_protobuf_UInt32Value); +} + +/** + * A group of endpoints belonging to a Locality. + * One can have multiple LocalityLbEndpoints for a locality, but this is + * generally only done if the different groups need to have different load + * balancing weights or different priorities. + * [#next-free-field: 7] + */ +export interface LocalityLbEndpoints__Output { + /** + * Identifies location of where the upstream hosts run. + */ + 'locality'?: (_envoy_api_v2_core_Locality__Output); + /** + * The group of endpoints belonging to the locality specified. + */ + 'lb_endpoints': (_envoy_api_v2_endpoint_LbEndpoint__Output)[]; + /** + * Optional: Per priority/region/zone/sub_zone weight; at least 1. The load + * balancing weight for a locality is divided by the sum of the weights of all + * localities at the same priority level to produce the effective percentage + * of traffic for the locality. The sum of the weights of all localities at + * the same priority level must not exceed uint32_t maximal value (4294967295). + * + * Locality weights are only considered when :ref:`locality weighted load + * balancing ` is + * configured. These weights are ignored otherwise. If no weights are + * specified when locality weighted load balancing is enabled, the locality is + * assigned no load. + */ + 'load_balancing_weight'?: (_google_protobuf_UInt32Value__Output); + /** + * Optional: the priority for this LocalityLbEndpoints. If unspecified this will + * default to the highest priority (0). + * + * Under usual circumstances, Envoy will only select endpoints for the highest + * priority (0). In the event all endpoints for a particular priority are + * unavailable/unhealthy, Envoy will fail over to selecting endpoints for the + * next highest priority group. + * + * Priorities should range from 0 (highest) to N (lowest) without skipping. + */ + 'priority': (number); + /** + * Optional: Per locality proximity value which indicates how close this + * locality is from the source locality. This value only provides ordering + * information (lower the value, closer it is to the source locality). + * This will be consumed by load balancing schemes that need proximity order + * to determine where to route the requests. + * [#not-implemented-hide:] + */ + 'proximity'?: (_google_protobuf_UInt32Value__Output); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/listener/ActiveRawUdpListenerConfig.ts b/packages/grpc-js/src/generated/envoy/api/v2/listener/ActiveRawUdpListenerConfig.ts new file mode 100644 index 000000000..7bb47c26c --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/listener/ActiveRawUdpListenerConfig.ts @@ -0,0 +1,8 @@ +// Original file: deps/envoy-api/envoy/api/v2/listener/udp_listener_config.proto + + +export interface ActiveRawUdpListenerConfig { +} + +export interface ActiveRawUdpListenerConfig__Output { +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/listener/Filter.ts b/packages/grpc-js/src/generated/envoy/api/v2/listener/Filter.ts new file mode 100644 index 000000000..017302934 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/listener/Filter.ts @@ -0,0 +1,34 @@ +// Original file: deps/envoy-api/envoy/api/v2/listener/listener_components.proto + +import { Struct as _google_protobuf_Struct, Struct__Output as _google_protobuf_Struct__Output } from '../../../../google/protobuf/Struct'; +import { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../../google/protobuf/Any'; + +export interface Filter { + /** + * The name of the filter to instantiate. The name must match a + * :ref:`supported filter `. + */ + 'name'?: (string); + 'config'?: (_google_protobuf_Struct); + 'typed_config'?: (_google_protobuf_Any); + /** + * Filter specific configuration which depends on the filter being + * instantiated. See the supported filters for further documentation. + */ + 'config_type'?: "config"|"typed_config"; +} + +export interface Filter__Output { + /** + * The name of the filter to instantiate. The name must match a + * :ref:`supported filter `. + */ + 'name': (string); + 'config'?: (_google_protobuf_Struct__Output); + 'typed_config'?: (_google_protobuf_Any__Output); + /** + * Filter specific configuration which depends on the filter being + * instantiated. See the supported filters for further documentation. + */ + 'config_type': "config"|"typed_config"; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/listener/FilterChain.ts b/packages/grpc-js/src/generated/envoy/api/v2/listener/FilterChain.ts new file mode 100644 index 000000000..fa2c8ddbe --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/listener/FilterChain.ts @@ -0,0 +1,118 @@ +// Original file: deps/envoy-api/envoy/api/v2/listener/listener_components.proto + +import { FilterChainMatch as _envoy_api_v2_listener_FilterChainMatch, FilterChainMatch__Output as _envoy_api_v2_listener_FilterChainMatch__Output } from '../../../../envoy/api/v2/listener/FilterChainMatch'; +import { DownstreamTlsContext as _envoy_api_v2_auth_DownstreamTlsContext, DownstreamTlsContext__Output as _envoy_api_v2_auth_DownstreamTlsContext__Output } from '../../../../envoy/api/v2/auth/DownstreamTlsContext'; +import { Filter as _envoy_api_v2_listener_Filter, Filter__Output as _envoy_api_v2_listener_Filter__Output } from '../../../../envoy/api/v2/listener/Filter'; +import { BoolValue as _google_protobuf_BoolValue, BoolValue__Output as _google_protobuf_BoolValue__Output } from '../../../../google/protobuf/BoolValue'; +import { Metadata as _envoy_api_v2_core_Metadata, Metadata__Output as _envoy_api_v2_core_Metadata__Output } from '../../../../envoy/api/v2/core/Metadata'; +import { TransportSocket as _envoy_api_v2_core_TransportSocket, TransportSocket__Output as _envoy_api_v2_core_TransportSocket__Output } from '../../../../envoy/api/v2/core/TransportSocket'; + +/** + * A filter chain wraps a set of match criteria, an option TLS context, a set of filters, and + * various other parameters. + * [#next-free-field: 8] + */ +export interface FilterChain { + /** + * The criteria to use when matching a connection to this filter chain. + */ + 'filter_chain_match'?: (_envoy_api_v2_listener_FilterChainMatch); + /** + * The TLS context for this filter chain. + * + * .. attention:: + * + * **This field is deprecated**. Use `transport_socket` with name `tls` instead. If both are + * set, `transport_socket` takes priority. + */ + 'tls_context'?: (_envoy_api_v2_auth_DownstreamTlsContext); + /** + * A list of individual network filters that make up the filter chain for + * connections established with the listener. Order matters as the filters are + * processed sequentially as connection events happen. Note: If the filter + * list is empty, the connection will close by default. + */ + 'filters'?: (_envoy_api_v2_listener_Filter)[]; + /** + * Whether the listener should expect a PROXY protocol V1 header on new + * connections. If this option is enabled, the listener will assume that that + * remote address of the connection is the one specified in the header. Some + * load balancers including the AWS ELB support this option. If the option is + * absent or set to false, Envoy will use the physical peer address of the + * connection as the remote address. + */ + 'use_proxy_proto'?: (_google_protobuf_BoolValue); + /** + * [#not-implemented-hide:] filter chain metadata. + */ + 'metadata'?: (_envoy_api_v2_core_Metadata); + /** + * Optional custom transport socket implementation to use for downstream connections. + * To setup TLS, set a transport socket with name `tls` and + * :ref:`DownstreamTlsContext ` in the `typed_config`. + * If no transport socket configuration is specified, new connections + * will be set up with plaintext. + */ + 'transport_socket'?: (_envoy_api_v2_core_TransportSocket); + /** + * [#not-implemented-hide:] The unique name (or empty) by which this filter chain is known. If no + * name is provided, Envoy will allocate an internal UUID for the filter chain. If the filter + * chain is to be dynamically updated or removed via FCDS a unique name must be provided. + */ + 'name'?: (string); +} + +/** + * A filter chain wraps a set of match criteria, an option TLS context, a set of filters, and + * various other parameters. + * [#next-free-field: 8] + */ +export interface FilterChain__Output { + /** + * The criteria to use when matching a connection to this filter chain. + */ + 'filter_chain_match'?: (_envoy_api_v2_listener_FilterChainMatch__Output); + /** + * The TLS context for this filter chain. + * + * .. attention:: + * + * **This field is deprecated**. Use `transport_socket` with name `tls` instead. If both are + * set, `transport_socket` takes priority. + */ + 'tls_context'?: (_envoy_api_v2_auth_DownstreamTlsContext__Output); + /** + * A list of individual network filters that make up the filter chain for + * connections established with the listener. Order matters as the filters are + * processed sequentially as connection events happen. Note: If the filter + * list is empty, the connection will close by default. + */ + 'filters': (_envoy_api_v2_listener_Filter__Output)[]; + /** + * Whether the listener should expect a PROXY protocol V1 header on new + * connections. If this option is enabled, the listener will assume that that + * remote address of the connection is the one specified in the header. Some + * load balancers including the AWS ELB support this option. If the option is + * absent or set to false, Envoy will use the physical peer address of the + * connection as the remote address. + */ + 'use_proxy_proto'?: (_google_protobuf_BoolValue__Output); + /** + * [#not-implemented-hide:] filter chain metadata. + */ + 'metadata'?: (_envoy_api_v2_core_Metadata__Output); + /** + * Optional custom transport socket implementation to use for downstream connections. + * To setup TLS, set a transport socket with name `tls` and + * :ref:`DownstreamTlsContext ` in the `typed_config`. + * If no transport socket configuration is specified, new connections + * will be set up with plaintext. + */ + 'transport_socket'?: (_envoy_api_v2_core_TransportSocket__Output); + /** + * [#not-implemented-hide:] The unique name (or empty) by which this filter chain is known. If no + * name is provided, Envoy will allocate an internal UUID for the filter chain. If the filter + * chain is to be dynamically updated or removed via FCDS a unique name must be provided. + */ + 'name': (string); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/listener/FilterChainMatch.ts b/packages/grpc-js/src/generated/envoy/api/v2/listener/FilterChainMatch.ts new file mode 100644 index 000000000..cdf49bf0a --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/listener/FilterChainMatch.ts @@ -0,0 +1,263 @@ +// Original file: deps/envoy-api/envoy/api/v2/listener/listener_components.proto + +import { CidrRange as _envoy_api_v2_core_CidrRange, CidrRange__Output as _envoy_api_v2_core_CidrRange__Output } from '../../../../envoy/api/v2/core/CidrRange'; +import { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output as _google_protobuf_UInt32Value__Output } from '../../../../google/protobuf/UInt32Value'; + +// Original file: deps/envoy-api/envoy/api/v2/listener/listener_components.proto + +export enum _envoy_api_v2_listener_FilterChainMatch_ConnectionSourceType { + /** + * Any connection source matches. + */ + ANY = 0, + /** + * Match a connection originating from the same host. + */ + LOCAL = 1, + /** + * Match a connection originating from a different host. + */ + EXTERNAL = 2, +} + +/** + * Specifies the match criteria for selecting a specific filter chain for a + * listener. + * + * In order for a filter chain to be selected, *ALL* of its criteria must be + * fulfilled by the incoming connection, properties of which are set by the + * networking stack and/or listener filters. + * + * The following order applies: + * + * 1. Destination port. + * 2. Destination IP address. + * 3. Server name (e.g. SNI for TLS protocol), + * 4. Transport protocol. + * 5. Application protocols (e.g. ALPN for TLS protocol). + * 6. Source type (e.g. any, local or external network). + * 7. Source IP address. + * 8. Source port. + * + * For criteria that allow ranges or wildcards, the most specific value in any + * of the configured filter chains that matches the incoming connection is going + * to be used (e.g. for SNI ``www.example.com`` the most specific match would be + * ``www.example.com``, then ``*.example.com``, then ``*.com``, then any filter + * chain without ``server_names`` requirements). + * + * [#comment: Implemented rules are kept in the preference order, with deprecated fields + * listed at the end, because that's how we want to list them in the docs. + * + * [#comment:TODO(PiotrSikora): Add support for configurable precedence of the rules] + * [#next-free-field: 13] + */ +export interface FilterChainMatch { + /** + * If non-empty, an IP address and prefix length to match addresses when the + * listener is bound to 0.0.0.0/:: or when use_original_dst is specified. + */ + 'prefix_ranges'?: (_envoy_api_v2_core_CidrRange)[]; + /** + * If non-empty, an IP address and suffix length to match addresses when the + * listener is bound to 0.0.0.0/:: or when use_original_dst is specified. + * [#not-implemented-hide:] + */ + 'address_suffix'?: (string); + /** + * [#not-implemented-hide:] + */ + 'suffix_len'?: (_google_protobuf_UInt32Value); + /** + * The criteria is satisfied if the source IP address of the downstream + * connection is contained in at least one of the specified subnets. If the + * parameter is not specified or the list is empty, the source IP address is + * ignored. + */ + 'source_prefix_ranges'?: (_envoy_api_v2_core_CidrRange)[]; + /** + * The criteria is satisfied if the source port of the downstream connection + * is contained in at least one of the specified ports. If the parameter is + * not specified, the source port is ignored. + */ + 'source_ports'?: (number)[]; + /** + * Optional destination port to consider when use_original_dst is set on the + * listener in determining a filter chain match. + */ + 'destination_port'?: (_google_protobuf_UInt32Value); + /** + * If non-empty, a transport protocol to consider when determining a filter chain match. + * This value will be compared against the transport protocol of a new connection, when + * it's detected by one of the listener filters. + * + * Suggested values include: + * + * * ``raw_buffer`` - default, used when no transport protocol is detected, + * * ``tls`` - set by :ref:`envoy.filters.listener.tls_inspector ` + * when TLS protocol is detected. + */ + 'transport_protocol'?: (string); + /** + * If non-empty, a list of application protocols (e.g. ALPN for TLS protocol) to consider when + * determining a filter chain match. Those values will be compared against the application + * protocols of a new connection, when detected by one of the listener filters. + * + * Suggested values include: + * + * * ``http/1.1`` - set by :ref:`envoy.filters.listener.tls_inspector + * `, + * * ``h2`` - set by :ref:`envoy.filters.listener.tls_inspector ` + * + * .. attention:: + * + * Currently, only :ref:`TLS Inspector ` provides + * application protocol detection based on the requested + * `ALPN `_ values. + * + * However, the use of ALPN is pretty much limited to the HTTP/2 traffic on the Internet, + * and matching on values other than ``h2`` is going to lead to a lot of false negatives, + * unless all connecting clients are known to use ALPN. + */ + 'application_protocols'?: (string)[]; + /** + * If non-empty, a list of server names (e.g. SNI for TLS protocol) to consider when determining + * a filter chain match. Those values will be compared against the server names of a new + * connection, when detected by one of the listener filters. + * + * The server name will be matched against all wildcard domains, i.e. ``www.example.com`` + * will be first matched against ``www.example.com``, then ``*.example.com``, then ``*.com``. + * + * Note that partial wildcards are not supported, and values like ``*w.example.com`` are invalid. + * + * .. attention:: + * + * See the :ref:`FAQ entry ` on how to configure SNI for more + * information. + */ + 'server_names'?: (string)[]; + /** + * Specifies the connection source IP match type. Can be any, local or external network. + */ + 'source_type'?: (_envoy_api_v2_listener_FilterChainMatch_ConnectionSourceType | keyof typeof _envoy_api_v2_listener_FilterChainMatch_ConnectionSourceType); +} + +/** + * Specifies the match criteria for selecting a specific filter chain for a + * listener. + * + * In order for a filter chain to be selected, *ALL* of its criteria must be + * fulfilled by the incoming connection, properties of which are set by the + * networking stack and/or listener filters. + * + * The following order applies: + * + * 1. Destination port. + * 2. Destination IP address. + * 3. Server name (e.g. SNI for TLS protocol), + * 4. Transport protocol. + * 5. Application protocols (e.g. ALPN for TLS protocol). + * 6. Source type (e.g. any, local or external network). + * 7. Source IP address. + * 8. Source port. + * + * For criteria that allow ranges or wildcards, the most specific value in any + * of the configured filter chains that matches the incoming connection is going + * to be used (e.g. for SNI ``www.example.com`` the most specific match would be + * ``www.example.com``, then ``*.example.com``, then ``*.com``, then any filter + * chain without ``server_names`` requirements). + * + * [#comment: Implemented rules are kept in the preference order, with deprecated fields + * listed at the end, because that's how we want to list them in the docs. + * + * [#comment:TODO(PiotrSikora): Add support for configurable precedence of the rules] + * [#next-free-field: 13] + */ +export interface FilterChainMatch__Output { + /** + * If non-empty, an IP address and prefix length to match addresses when the + * listener is bound to 0.0.0.0/:: or when use_original_dst is specified. + */ + 'prefix_ranges': (_envoy_api_v2_core_CidrRange__Output)[]; + /** + * If non-empty, an IP address and suffix length to match addresses when the + * listener is bound to 0.0.0.0/:: or when use_original_dst is specified. + * [#not-implemented-hide:] + */ + 'address_suffix': (string); + /** + * [#not-implemented-hide:] + */ + 'suffix_len'?: (_google_protobuf_UInt32Value__Output); + /** + * The criteria is satisfied if the source IP address of the downstream + * connection is contained in at least one of the specified subnets. If the + * parameter is not specified or the list is empty, the source IP address is + * ignored. + */ + 'source_prefix_ranges': (_envoy_api_v2_core_CidrRange__Output)[]; + /** + * The criteria is satisfied if the source port of the downstream connection + * is contained in at least one of the specified ports. If the parameter is + * not specified, the source port is ignored. + */ + 'source_ports': (number)[]; + /** + * Optional destination port to consider when use_original_dst is set on the + * listener in determining a filter chain match. + */ + 'destination_port'?: (_google_protobuf_UInt32Value__Output); + /** + * If non-empty, a transport protocol to consider when determining a filter chain match. + * This value will be compared against the transport protocol of a new connection, when + * it's detected by one of the listener filters. + * + * Suggested values include: + * + * * ``raw_buffer`` - default, used when no transport protocol is detected, + * * ``tls`` - set by :ref:`envoy.filters.listener.tls_inspector ` + * when TLS protocol is detected. + */ + 'transport_protocol': (string); + /** + * If non-empty, a list of application protocols (e.g. ALPN for TLS protocol) to consider when + * determining a filter chain match. Those values will be compared against the application + * protocols of a new connection, when detected by one of the listener filters. + * + * Suggested values include: + * + * * ``http/1.1`` - set by :ref:`envoy.filters.listener.tls_inspector + * `, + * * ``h2`` - set by :ref:`envoy.filters.listener.tls_inspector ` + * + * .. attention:: + * + * Currently, only :ref:`TLS Inspector ` provides + * application protocol detection based on the requested + * `ALPN `_ values. + * + * However, the use of ALPN is pretty much limited to the HTTP/2 traffic on the Internet, + * and matching on values other than ``h2`` is going to lead to a lot of false negatives, + * unless all connecting clients are known to use ALPN. + */ + 'application_protocols': (string)[]; + /** + * If non-empty, a list of server names (e.g. SNI for TLS protocol) to consider when determining + * a filter chain match. Those values will be compared against the server names of a new + * connection, when detected by one of the listener filters. + * + * The server name will be matched against all wildcard domains, i.e. ``www.example.com`` + * will be first matched against ``www.example.com``, then ``*.example.com``, then ``*.com``. + * + * Note that partial wildcards are not supported, and values like ``*w.example.com`` are invalid. + * + * .. attention:: + * + * See the :ref:`FAQ entry ` on how to configure SNI for more + * information. + */ + 'server_names': (string)[]; + /** + * Specifies the connection source IP match type. Can be any, local or external network. + */ + 'source_type': (keyof typeof _envoy_api_v2_listener_FilterChainMatch_ConnectionSourceType); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/listener/ListenerFilter.ts b/packages/grpc-js/src/generated/envoy/api/v2/listener/ListenerFilter.ts new file mode 100644 index 000000000..75fc917e5 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/listener/ListenerFilter.ts @@ -0,0 +1,47 @@ +// Original file: deps/envoy-api/envoy/api/v2/listener/listener_components.proto + +import { Struct as _google_protobuf_Struct, Struct__Output as _google_protobuf_Struct__Output } from '../../../../google/protobuf/Struct'; +import { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../../google/protobuf/Any'; +import { ListenerFilterChainMatchPredicate as _envoy_api_v2_listener_ListenerFilterChainMatchPredicate, ListenerFilterChainMatchPredicate__Output as _envoy_api_v2_listener_ListenerFilterChainMatchPredicate__Output } from '../../../../envoy/api/v2/listener/ListenerFilterChainMatchPredicate'; + +export interface ListenerFilter { + /** + * The name of the filter to instantiate. The name must match a + * :ref:`supported filter `. + */ + 'name'?: (string); + 'config'?: (_google_protobuf_Struct); + 'typed_config'?: (_google_protobuf_Any); + /** + * Optional match predicate used to disable the filter. The filter is enabled when this field is empty. + * See :ref:`ListenerFilterChainMatchPredicate ` + * for further examples. + */ + 'filter_disabled'?: (_envoy_api_v2_listener_ListenerFilterChainMatchPredicate); + /** + * Filter specific configuration which depends on the filter being instantiated. + * See the supported filters for further documentation. + */ + 'config_type'?: "config"|"typed_config"; +} + +export interface ListenerFilter__Output { + /** + * The name of the filter to instantiate. The name must match a + * :ref:`supported filter `. + */ + 'name': (string); + 'config'?: (_google_protobuf_Struct__Output); + 'typed_config'?: (_google_protobuf_Any__Output); + /** + * Optional match predicate used to disable the filter. The filter is enabled when this field is empty. + * See :ref:`ListenerFilterChainMatchPredicate ` + * for further examples. + */ + 'filter_disabled'?: (_envoy_api_v2_listener_ListenerFilterChainMatchPredicate__Output); + /** + * Filter specific configuration which depends on the filter being instantiated. + * See the supported filters for further documentation. + */ + 'config_type': "config"|"typed_config"; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/listener/ListenerFilterChainMatchPredicate.ts b/packages/grpc-js/src/generated/envoy/api/v2/listener/ListenerFilterChainMatchPredicate.ts new file mode 100644 index 000000000..547e74d11 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/listener/ListenerFilterChainMatchPredicate.ts @@ -0,0 +1,136 @@ +// Original file: deps/envoy-api/envoy/api/v2/listener/listener_components.proto + +import { ListenerFilterChainMatchPredicate as _envoy_api_v2_listener_ListenerFilterChainMatchPredicate, ListenerFilterChainMatchPredicate__Output as _envoy_api_v2_listener_ListenerFilterChainMatchPredicate__Output } from '../../../../envoy/api/v2/listener/ListenerFilterChainMatchPredicate'; +import { Int32Range as _envoy_type_Int32Range, Int32Range__Output as _envoy_type_Int32Range__Output } from '../../../../envoy/type/Int32Range'; + +/** + * A set of match configurations used for logical operations. + */ +export interface _envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet { + /** + * The list of rules that make up the set. + */ + 'rules'?: (_envoy_api_v2_listener_ListenerFilterChainMatchPredicate)[]; +} + +/** + * A set of match configurations used for logical operations. + */ +export interface _envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet__Output { + /** + * The list of rules that make up the set. + */ + 'rules': (_envoy_api_v2_listener_ListenerFilterChainMatchPredicate__Output)[]; +} + +/** + * Listener filter chain match configuration. This is a recursive structure which allows complex + * nested match configurations to be built using various logical operators. + * + * Examples: + * + * * Matches if the destination port is 3306. + * + * .. code-block:: yaml + * + * destination_port_range: + * start: 3306 + * end: 3307 + * + * * Matches if the destination port is 3306 or 15000. + * + * .. code-block:: yaml + * + * or_match: + * rules: + * - destination_port_range: + * start: 3306 + * end: 3306 + * - destination_port_range: + * start: 15000 + * end: 15001 + * + * [#next-free-field: 6] + */ +export interface ListenerFilterChainMatchPredicate { + /** + * A set that describes a logical OR. If any member of the set matches, the match configuration + * matches. + */ + 'or_match'?: (_envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet); + /** + * A set that describes a logical AND. If all members of the set match, the match configuration + * matches. + */ + 'and_match'?: (_envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet); + /** + * A negation match. The match configuration will match if the negated match condition matches. + */ + 'not_match'?: (_envoy_api_v2_listener_ListenerFilterChainMatchPredicate); + /** + * The match configuration will always match. + */ + 'any_match'?: (boolean); + /** + * Match destination port. Particularly, the match evaluation must use the recovered local port if + * the owning listener filter is after :ref:`an original_dst listener filter `. + */ + 'destination_port_range'?: (_envoy_type_Int32Range); + 'rule'?: "or_match"|"and_match"|"not_match"|"any_match"|"destination_port_range"; +} + +/** + * Listener filter chain match configuration. This is a recursive structure which allows complex + * nested match configurations to be built using various logical operators. + * + * Examples: + * + * * Matches if the destination port is 3306. + * + * .. code-block:: yaml + * + * destination_port_range: + * start: 3306 + * end: 3307 + * + * * Matches if the destination port is 3306 or 15000. + * + * .. code-block:: yaml + * + * or_match: + * rules: + * - destination_port_range: + * start: 3306 + * end: 3306 + * - destination_port_range: + * start: 15000 + * end: 15001 + * + * [#next-free-field: 6] + */ +export interface ListenerFilterChainMatchPredicate__Output { + /** + * A set that describes a logical OR. If any member of the set matches, the match configuration + * matches. + */ + 'or_match'?: (_envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet__Output); + /** + * A set that describes a logical AND. If all members of the set match, the match configuration + * matches. + */ + 'and_match'?: (_envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet__Output); + /** + * A negation match. The match configuration will match if the negated match condition matches. + */ + 'not_match'?: (_envoy_api_v2_listener_ListenerFilterChainMatchPredicate__Output); + /** + * The match configuration will always match. + */ + 'any_match'?: (boolean); + /** + * Match destination port. Particularly, the match evaluation must use the recovered local port if + * the owning listener filter is after :ref:`an original_dst listener filter `. + */ + 'destination_port_range'?: (_envoy_type_Int32Range__Output); + 'rule': "or_match"|"and_match"|"not_match"|"any_match"|"destination_port_range"; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/listener/UdpListenerConfig.ts b/packages/grpc-js/src/generated/envoy/api/v2/listener/UdpListenerConfig.ts new file mode 100644 index 000000000..34a710b14 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/listener/UdpListenerConfig.ts @@ -0,0 +1,36 @@ +// Original file: deps/envoy-api/envoy/api/v2/listener/udp_listener_config.proto + +import { Struct as _google_protobuf_Struct, Struct__Output as _google_protobuf_Struct__Output } from '../../../../google/protobuf/Struct'; +import { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../../google/protobuf/Any'; + +export interface UdpListenerConfig { + /** + * Used to look up UDP listener factory, matches "raw_udp_listener" or + * "quic_listener" to create a specific udp listener. + * If not specified, treat as "raw_udp_listener". + */ + 'udp_listener_name'?: (string); + 'config'?: (_google_protobuf_Struct); + 'typed_config'?: (_google_protobuf_Any); + /** + * Used to create a specific listener factory. To some factory, e.g. + * "raw_udp_listener", config is not needed. + */ + 'config_type'?: "config"|"typed_config"; +} + +export interface UdpListenerConfig__Output { + /** + * Used to look up UDP listener factory, matches "raw_udp_listener" or + * "quic_listener" to create a specific udp listener. + * If not specified, treat as "raw_udp_listener". + */ + 'udp_listener_name': (string); + 'config'?: (_google_protobuf_Struct__Output); + 'typed_config'?: (_google_protobuf_Any__Output); + /** + * Used to create a specific listener factory. To some factory, e.g. + * "raw_udp_listener", config is not needed. + */ + 'config_type': "config"|"typed_config"; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/route/CorsPolicy.ts b/packages/grpc-js/src/generated/envoy/api/v2/route/CorsPolicy.ts new file mode 100644 index 000000000..b2429e5e2 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/route/CorsPolicy.ts @@ -0,0 +1,169 @@ +// Original file: deps/envoy-api/envoy/api/v2/route/route_components.proto + +import { BoolValue as _google_protobuf_BoolValue, BoolValue__Output as _google_protobuf_BoolValue__Output } from '../../../../google/protobuf/BoolValue'; +import { RuntimeFractionalPercent as _envoy_api_v2_core_RuntimeFractionalPercent, RuntimeFractionalPercent__Output as _envoy_api_v2_core_RuntimeFractionalPercent__Output } from '../../../../envoy/api/v2/core/RuntimeFractionalPercent'; +import { StringMatcher as _envoy_type_matcher_StringMatcher, StringMatcher__Output as _envoy_type_matcher_StringMatcher__Output } from '../../../../envoy/type/matcher/StringMatcher'; + +/** + * [#next-free-field: 12] + */ +export interface CorsPolicy { + /** + * Specifies the origins that will be allowed to do CORS requests. + * + * An origin is allowed if either allow_origin or allow_origin_regex match. + * + * .. attention:: + * This field has been deprecated in favor of `allow_origin_string_match`. + */ + 'allow_origin'?: (string)[]; + /** + * Specifies the content for the *access-control-allow-methods* header. + */ + 'allow_methods'?: (string); + /** + * Specifies the content for the *access-control-allow-headers* header. + */ + 'allow_headers'?: (string); + /** + * Specifies the content for the *access-control-expose-headers* header. + */ + 'expose_headers'?: (string); + /** + * Specifies the content for the *access-control-max-age* header. + */ + 'max_age'?: (string); + /** + * Specifies whether the resource allows credentials. + */ + 'allow_credentials'?: (_google_protobuf_BoolValue); + /** + * Specifies if the CORS filter is enabled. Defaults to true. Only effective on route. + * + * .. attention:: + * + * **This field is deprecated**. Set the + * :ref:`filter_enabled` field instead. + */ + 'enabled'?: (_google_protobuf_BoolValue); + /** + * Specifies regex patterns that match allowed origins. + * + * An origin is allowed if either allow_origin or allow_origin_regex match. + * + * .. attention:: + * This field has been deprecated in favor of `allow_origin_string_match` as it is not safe for + * use with untrusted input in all cases. + */ + 'allow_origin_regex'?: (string)[]; + /** + * Specifies the % of requests for which the CORS filter is enabled. + * + * If neither ``enabled``, ``filter_enabled``, nor ``shadow_enabled`` are specified, the CORS + * filter will be enabled for 100% of the requests. + * + * If :ref:`runtime_key ` is + * specified, Envoy will lookup the runtime key to get the percentage of requests to filter. + */ + 'filter_enabled'?: (_envoy_api_v2_core_RuntimeFractionalPercent); + /** + * Specifies the % of requests for which the CORS policies will be evaluated and tracked, but not + * enforced. + * + * This field is intended to be used when ``filter_enabled`` and ``enabled`` are off. One of those + * fields have to explicitly disable the filter in order for this setting to take effect. + * + * If :ref:`runtime_key ` is specified, + * Envoy will lookup the runtime key to get the percentage of requests for which it will evaluate + * and track the request's *Origin* to determine if it's valid but will not enforce any policies. + */ + 'shadow_enabled'?: (_envoy_api_v2_core_RuntimeFractionalPercent); + /** + * Specifies string patterns that match allowed origins. An origin is allowed if any of the + * string matchers match. + */ + 'allow_origin_string_match'?: (_envoy_type_matcher_StringMatcher)[]; + 'enabled_specifier'?: "enabled"|"filter_enabled"; +} + +/** + * [#next-free-field: 12] + */ +export interface CorsPolicy__Output { + /** + * Specifies the origins that will be allowed to do CORS requests. + * + * An origin is allowed if either allow_origin or allow_origin_regex match. + * + * .. attention:: + * This field has been deprecated in favor of `allow_origin_string_match`. + */ + 'allow_origin': (string)[]; + /** + * Specifies the content for the *access-control-allow-methods* header. + */ + 'allow_methods': (string); + /** + * Specifies the content for the *access-control-allow-headers* header. + */ + 'allow_headers': (string); + /** + * Specifies the content for the *access-control-expose-headers* header. + */ + 'expose_headers': (string); + /** + * Specifies the content for the *access-control-max-age* header. + */ + 'max_age': (string); + /** + * Specifies whether the resource allows credentials. + */ + 'allow_credentials'?: (_google_protobuf_BoolValue__Output); + /** + * Specifies if the CORS filter is enabled. Defaults to true. Only effective on route. + * + * .. attention:: + * + * **This field is deprecated**. Set the + * :ref:`filter_enabled` field instead. + */ + 'enabled'?: (_google_protobuf_BoolValue__Output); + /** + * Specifies regex patterns that match allowed origins. + * + * An origin is allowed if either allow_origin or allow_origin_regex match. + * + * .. attention:: + * This field has been deprecated in favor of `allow_origin_string_match` as it is not safe for + * use with untrusted input in all cases. + */ + 'allow_origin_regex': (string)[]; + /** + * Specifies the % of requests for which the CORS filter is enabled. + * + * If neither ``enabled``, ``filter_enabled``, nor ``shadow_enabled`` are specified, the CORS + * filter will be enabled for 100% of the requests. + * + * If :ref:`runtime_key ` is + * specified, Envoy will lookup the runtime key to get the percentage of requests to filter. + */ + 'filter_enabled'?: (_envoy_api_v2_core_RuntimeFractionalPercent__Output); + /** + * Specifies the % of requests for which the CORS policies will be evaluated and tracked, but not + * enforced. + * + * This field is intended to be used when ``filter_enabled`` and ``enabled`` are off. One of those + * fields have to explicitly disable the filter in order for this setting to take effect. + * + * If :ref:`runtime_key ` is specified, + * Envoy will lookup the runtime key to get the percentage of requests for which it will evaluate + * and track the request's *Origin* to determine if it's valid but will not enforce any policies. + */ + 'shadow_enabled'?: (_envoy_api_v2_core_RuntimeFractionalPercent__Output); + /** + * Specifies string patterns that match allowed origins. An origin is allowed if any of the + * string matchers match. + */ + 'allow_origin_string_match': (_envoy_type_matcher_StringMatcher__Output)[]; + 'enabled_specifier': "enabled"|"filter_enabled"; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/route/Decorator.ts b/packages/grpc-js/src/generated/envoy/api/v2/route/Decorator.ts new file mode 100644 index 000000000..d1a2fa25f --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/route/Decorator.ts @@ -0,0 +1,39 @@ +// Original file: deps/envoy-api/envoy/api/v2/route/route_components.proto + +import { BoolValue as _google_protobuf_BoolValue, BoolValue__Output as _google_protobuf_BoolValue__Output } from '../../../../google/protobuf/BoolValue'; + +export interface Decorator { + /** + * The operation name associated with the request matched to this route. If tracing is + * enabled, this information will be used as the span name reported for this request. + * + * .. note:: + * + * For ingress (inbound) requests, or egress (outbound) responses, this value may be overridden + * by the :ref:`x-envoy-decorator-operation + * ` header. + */ + 'operation'?: (string); + /** + * Whether the decorated details should be propagated to the other party. The default is true. + */ + 'propagate'?: (_google_protobuf_BoolValue); +} + +export interface Decorator__Output { + /** + * The operation name associated with the request matched to this route. If tracing is + * enabled, this information will be used as the span name reported for this request. + * + * .. note:: + * + * For ingress (inbound) requests, or egress (outbound) responses, this value may be overridden + * by the :ref:`x-envoy-decorator-operation + * ` header. + */ + 'operation': (string); + /** + * Whether the decorated details should be propagated to the other party. The default is true. + */ + 'propagate'?: (_google_protobuf_BoolValue__Output); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/route/DirectResponseAction.ts b/packages/grpc-js/src/generated/envoy/api/v2/route/DirectResponseAction.ts new file mode 100644 index 000000000..6e9ed7cae --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/route/DirectResponseAction.ts @@ -0,0 +1,39 @@ +// Original file: deps/envoy-api/envoy/api/v2/route/route_components.proto + +import { DataSource as _envoy_api_v2_core_DataSource, DataSource__Output as _envoy_api_v2_core_DataSource__Output } from '../../../../envoy/api/v2/core/DataSource'; + +export interface DirectResponseAction { + /** + * Specifies the HTTP response status to be returned. + */ + 'status'?: (number); + /** + * Specifies the content of the response body. If this setting is omitted, + * no body is included in the generated response. + * + * .. note:: + * + * Headers can be specified using *response_headers_to_add* in the enclosing + * :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_RouteConfiguration` or + * :ref:`envoy_api_msg_route.VirtualHost`. + */ + 'body'?: (_envoy_api_v2_core_DataSource); +} + +export interface DirectResponseAction__Output { + /** + * Specifies the HTTP response status to be returned. + */ + 'status': (number); + /** + * Specifies the content of the response body. If this setting is omitted, + * no body is included in the generated response. + * + * .. note:: + * + * Headers can be specified using *response_headers_to_add* in the enclosing + * :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_RouteConfiguration` or + * :ref:`envoy_api_msg_route.VirtualHost`. + */ + 'body'?: (_envoy_api_v2_core_DataSource__Output); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/route/FilterAction.ts b/packages/grpc-js/src/generated/envoy/api/v2/route/FilterAction.ts new file mode 100644 index 000000000..ca626cfaf --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/route/FilterAction.ts @@ -0,0 +1,17 @@ +// Original file: deps/envoy-api/envoy/api/v2/route/route_components.proto + +import { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../../google/protobuf/Any'; + +/** + * A filter-defined action type. + */ +export interface FilterAction { + 'action'?: (_google_protobuf_Any); +} + +/** + * A filter-defined action type. + */ +export interface FilterAction__Output { + 'action'?: (_google_protobuf_Any__Output); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/route/HeaderMatcher.ts b/packages/grpc-js/src/generated/envoy/api/v2/route/HeaderMatcher.ts new file mode 100644 index 000000000..3e9793649 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/route/HeaderMatcher.ts @@ -0,0 +1,227 @@ +// Original file: deps/envoy-api/envoy/api/v2/route/route_components.proto + +import { Int64Range as _envoy_type_Int64Range, Int64Range__Output as _envoy_type_Int64Range__Output } from '../../../../envoy/type/Int64Range'; +import { RegexMatcher as _envoy_type_matcher_RegexMatcher, RegexMatcher__Output as _envoy_type_matcher_RegexMatcher__Output } from '../../../../envoy/type/matcher/RegexMatcher'; +import { Long } from '@grpc/proto-loader'; + +/** + * .. attention:: + * + * Internally, Envoy always uses the HTTP/2 *:authority* header to represent the HTTP/1 *Host* + * header. Thus, if attempting to match on *Host*, match on *:authority* instead. + * + * .. attention:: + * + * To route on HTTP method, use the special HTTP/2 *:method* header. This works for both + * HTTP/1 and HTTP/2 as Envoy normalizes headers. E.g., + * + * .. code-block:: json + * + * { + * "name": ":method", + * "exact_match": "POST" + * } + * + * .. attention:: + * In the absence of any header match specifier, match will default to :ref:`present_match + * `. i.e, a request that has the :ref:`name + * ` header will match, regardless of the header's + * value. + * + * [#next-major-version: HeaderMatcher should be refactored to use StringMatcher.] + * [#next-free-field: 12] + */ +export interface HeaderMatcher { + /** + * Specifies the name of the header in the request. + */ + 'name'?: (string); + /** + * If specified, header match will be performed based on the value of the header. + */ + 'exact_match'?: (string); + /** + * If specified, this regex string is a regular expression rule which implies the entire request + * header value must match the regex. The rule will not match if only a subsequence of the + * request header value matches the regex. The regex grammar used in the value field is defined + * `here `_. + * + * Examples: + * + * * The regex ``\d{3}`` matches the value *123* + * * The regex ``\d{3}`` does not match the value *1234* + * * The regex ``\d{3}`` does not match the value *123.456* + * + * .. attention:: + * This field has been deprecated in favor of `safe_regex_match` as it is not safe for use + * with untrusted input in all cases. + */ + 'regex_match'?: (string); + /** + * If specified, header match will be performed based on range. + * The rule will match if the request header value is within this range. + * The entire request header value must represent an integer in base 10 notation: consisting of + * an optional plus or minus sign followed by a sequence of digits. The rule will not match if + * the header value does not represent an integer. Match will fail for empty values, floating + * point numbers or if only a subsequence of the header value is an integer. + * + * Examples: + * + * * For range [-10,0), route will match for header value -1, but not for 0, "somestring", 10.9, + * "-1somestring" + */ + 'range_match'?: (_envoy_type_Int64Range); + /** + * If specified, header match will be performed based on whether the header is in the + * request. + */ + 'present_match'?: (boolean); + /** + * If specified, the match result will be inverted before checking. Defaults to false. + * + * Examples: + * + * * The regex ``\d{3}`` does not match the value *1234*, so it will match when inverted. + * * The range [-10,0) will match the value -1, so it will not match when inverted. + */ + 'invert_match'?: (boolean); + /** + * If specified, header match will be performed based on the prefix of the header value. + * Note: empty prefix is not allowed, please use present_match instead. + * + * Examples: + * + * * The prefix *abcd* matches the value *abcdxyz*, but not for *abcxyz*. + */ + 'prefix_match'?: (string); + /** + * If specified, header match will be performed based on the suffix of the header value. + * Note: empty suffix is not allowed, please use present_match instead. + * + * Examples: + * + * * The suffix *abcd* matches the value *xyzabcd*, but not for *xyzbcd*. + */ + 'suffix_match'?: (string); + /** + * If specified, this regex string is a regular expression rule which implies the entire request + * header value must match the regex. The rule will not match if only a subsequence of the + * request header value matches the regex. + */ + 'safe_regex_match'?: (_envoy_type_matcher_RegexMatcher); + /** + * Specifies how the header match will be performed to route the request. + */ + 'header_match_specifier'?: "exact_match"|"regex_match"|"safe_regex_match"|"range_match"|"present_match"|"prefix_match"|"suffix_match"; +} + +/** + * .. attention:: + * + * Internally, Envoy always uses the HTTP/2 *:authority* header to represent the HTTP/1 *Host* + * header. Thus, if attempting to match on *Host*, match on *:authority* instead. + * + * .. attention:: + * + * To route on HTTP method, use the special HTTP/2 *:method* header. This works for both + * HTTP/1 and HTTP/2 as Envoy normalizes headers. E.g., + * + * .. code-block:: json + * + * { + * "name": ":method", + * "exact_match": "POST" + * } + * + * .. attention:: + * In the absence of any header match specifier, match will default to :ref:`present_match + * `. i.e, a request that has the :ref:`name + * ` header will match, regardless of the header's + * value. + * + * [#next-major-version: HeaderMatcher should be refactored to use StringMatcher.] + * [#next-free-field: 12] + */ +export interface HeaderMatcher__Output { + /** + * Specifies the name of the header in the request. + */ + 'name': (string); + /** + * If specified, header match will be performed based on the value of the header. + */ + 'exact_match'?: (string); + /** + * If specified, this regex string is a regular expression rule which implies the entire request + * header value must match the regex. The rule will not match if only a subsequence of the + * request header value matches the regex. The regex grammar used in the value field is defined + * `here `_. + * + * Examples: + * + * * The regex ``\d{3}`` matches the value *123* + * * The regex ``\d{3}`` does not match the value *1234* + * * The regex ``\d{3}`` does not match the value *123.456* + * + * .. attention:: + * This field has been deprecated in favor of `safe_regex_match` as it is not safe for use + * with untrusted input in all cases. + */ + 'regex_match'?: (string); + /** + * If specified, header match will be performed based on range. + * The rule will match if the request header value is within this range. + * The entire request header value must represent an integer in base 10 notation: consisting of + * an optional plus or minus sign followed by a sequence of digits. The rule will not match if + * the header value does not represent an integer. Match will fail for empty values, floating + * point numbers or if only a subsequence of the header value is an integer. + * + * Examples: + * + * * For range [-10,0), route will match for header value -1, but not for 0, "somestring", 10.9, + * "-1somestring" + */ + 'range_match'?: (_envoy_type_Int64Range__Output); + /** + * If specified, header match will be performed based on whether the header is in the + * request. + */ + 'present_match'?: (boolean); + /** + * If specified, the match result will be inverted before checking. Defaults to false. + * + * Examples: + * + * * The regex ``\d{3}`` does not match the value *1234*, so it will match when inverted. + * * The range [-10,0) will match the value -1, so it will not match when inverted. + */ + 'invert_match': (boolean); + /** + * If specified, header match will be performed based on the prefix of the header value. + * Note: empty prefix is not allowed, please use present_match instead. + * + * Examples: + * + * * The prefix *abcd* matches the value *abcdxyz*, but not for *abcxyz*. + */ + 'prefix_match'?: (string); + /** + * If specified, header match will be performed based on the suffix of the header value. + * Note: empty suffix is not allowed, please use present_match instead. + * + * Examples: + * + * * The suffix *abcd* matches the value *xyzabcd*, but not for *xyzbcd*. + */ + 'suffix_match'?: (string); + /** + * If specified, this regex string is a regular expression rule which implies the entire request + * header value must match the regex. The rule will not match if only a subsequence of the + * request header value matches the regex. + */ + 'safe_regex_match'?: (_envoy_type_matcher_RegexMatcher__Output); + /** + * Specifies how the header match will be performed to route the request. + */ + 'header_match_specifier': "exact_match"|"regex_match"|"safe_regex_match"|"range_match"|"present_match"|"prefix_match"|"suffix_match"; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/route/HedgePolicy.ts b/packages/grpc-js/src/generated/envoy/api/v2/route/HedgePolicy.ts new file mode 100644 index 000000000..c362bdc52 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/route/HedgePolicy.ts @@ -0,0 +1,66 @@ +// Original file: deps/envoy-api/envoy/api/v2/route/route_components.proto + +import { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output as _google_protobuf_UInt32Value__Output } from '../../../../google/protobuf/UInt32Value'; +import { FractionalPercent as _envoy_type_FractionalPercent, FractionalPercent__Output as _envoy_type_FractionalPercent__Output } from '../../../../envoy/type/FractionalPercent'; + +/** + * HTTP request hedging :ref:`architecture overview `. + */ +export interface HedgePolicy { + /** + * Specifies the number of initial requests that should be sent upstream. + * Must be at least 1. + * Defaults to 1. + * [#not-implemented-hide:] + */ + 'initial_requests'?: (_google_protobuf_UInt32Value); + /** + * Specifies a probability that an additional upstream request should be sent + * on top of what is specified by initial_requests. + * Defaults to 0. + * [#not-implemented-hide:] + */ + 'additional_request_chance'?: (_envoy_type_FractionalPercent); + /** + * Indicates that a hedged request should be sent when the per-try timeout + * is hit. This will only occur if the retry policy also indicates that a + * timed out request should be retried. + * Once a timed out request is retried due to per try timeout, the router + * filter will ensure that it is not retried again even if the returned + * response headers would otherwise be retried according the specified + * :ref:`RetryPolicy `. + * Defaults to false. + */ + 'hedge_on_per_try_timeout'?: (boolean); +} + +/** + * HTTP request hedging :ref:`architecture overview `. + */ +export interface HedgePolicy__Output { + /** + * Specifies the number of initial requests that should be sent upstream. + * Must be at least 1. + * Defaults to 1. + * [#not-implemented-hide:] + */ + 'initial_requests'?: (_google_protobuf_UInt32Value__Output); + /** + * Specifies a probability that an additional upstream request should be sent + * on top of what is specified by initial_requests. + * Defaults to 0. + * [#not-implemented-hide:] + */ + 'additional_request_chance'?: (_envoy_type_FractionalPercent__Output); + /** + * Indicates that a hedged request should be sent when the per-try timeout + * is hit. This will only occur if the retry policy also indicates that a + * timed out request should be retried. + * Once a timed out request is retried due to per try timeout, the router + * filter will ensure that it is not retried again even if the returned + * response headers would otherwise be retried according the specified + * :ref:`RetryPolicy `. + * Defaults to false. + */ + 'hedge_on_per_try_timeout': (boolean); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/route/QueryParameterMatcher.ts b/packages/grpc-js/src/generated/envoy/api/v2/route/QueryParameterMatcher.ts new file mode 100644 index 000000000..eeed23abe --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/route/QueryParameterMatcher.ts @@ -0,0 +1,86 @@ +// Original file: deps/envoy-api/envoy/api/v2/route/route_components.proto + +import { BoolValue as _google_protobuf_BoolValue, BoolValue__Output as _google_protobuf_BoolValue__Output } from '../../../../google/protobuf/BoolValue'; +import { StringMatcher as _envoy_type_matcher_StringMatcher, StringMatcher__Output as _envoy_type_matcher_StringMatcher__Output } from '../../../../envoy/type/matcher/StringMatcher'; + +/** + * Query parameter matching treats the query string of a request's :path header + * as an ampersand-separated list of keys and/or key=value elements. + * [#next-free-field: 7] + */ +export interface QueryParameterMatcher { + /** + * Specifies the name of a key that must be present in the requested + * *path*'s query string. + */ + 'name'?: (string); + /** + * Specifies the value of the key. If the value is absent, a request + * that contains the key in its query string will match, whether the + * key appears with a value (e.g., "?debug=true") or not (e.g., "?debug") + * + * ..attention:: + * This field is deprecated. Use an `exact` match inside the `string_match` field. + */ + 'value'?: (string); + /** + * Specifies whether the query parameter value is a regular expression. + * Defaults to false. The entire query parameter value (i.e., the part to + * the right of the equals sign in "key=value") must match the regex. + * E.g., the regex ``\d+$`` will match *123* but not *a123* or *123a*. + * + * ..attention:: + * This field is deprecated. Use a `safe_regex` match inside the `string_match` field. + */ + 'regex'?: (_google_protobuf_BoolValue); + /** + * Specifies whether a query parameter value should match against a string. + */ + 'string_match'?: (_envoy_type_matcher_StringMatcher); + /** + * Specifies whether a query parameter should be present. + */ + 'present_match'?: (boolean); + 'query_parameter_match_specifier'?: "string_match"|"present_match"; +} + +/** + * Query parameter matching treats the query string of a request's :path header + * as an ampersand-separated list of keys and/or key=value elements. + * [#next-free-field: 7] + */ +export interface QueryParameterMatcher__Output { + /** + * Specifies the name of a key that must be present in the requested + * *path*'s query string. + */ + 'name': (string); + /** + * Specifies the value of the key. If the value is absent, a request + * that contains the key in its query string will match, whether the + * key appears with a value (e.g., "?debug=true") or not (e.g., "?debug") + * + * ..attention:: + * This field is deprecated. Use an `exact` match inside the `string_match` field. + */ + 'value': (string); + /** + * Specifies whether the query parameter value is a regular expression. + * Defaults to false. The entire query parameter value (i.e., the part to + * the right of the equals sign in "key=value") must match the regex. + * E.g., the regex ``\d+$`` will match *123* but not *a123* or *123a*. + * + * ..attention:: + * This field is deprecated. Use a `safe_regex` match inside the `string_match` field. + */ + 'regex'?: (_google_protobuf_BoolValue__Output); + /** + * Specifies whether a query parameter value should match against a string. + */ + 'string_match'?: (_envoy_type_matcher_StringMatcher__Output); + /** + * Specifies whether a query parameter should be present. + */ + 'present_match'?: (boolean); + 'query_parameter_match_specifier': "string_match"|"present_match"; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/route/RateLimit.ts b/packages/grpc-js/src/generated/envoy/api/v2/route/RateLimit.ts new file mode 100644 index 000000000..385dad6f6 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/route/RateLimit.ts @@ -0,0 +1,341 @@ +// Original file: deps/envoy-api/envoy/api/v2/route/route_components.proto + +import { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output as _google_protobuf_UInt32Value__Output } from '../../../../google/protobuf/UInt32Value'; +import { BoolValue as _google_protobuf_BoolValue, BoolValue__Output as _google_protobuf_BoolValue__Output } from '../../../../google/protobuf/BoolValue'; +import { HeaderMatcher as _envoy_api_v2_route_HeaderMatcher, HeaderMatcher__Output as _envoy_api_v2_route_HeaderMatcher__Output } from '../../../../envoy/api/v2/route/HeaderMatcher'; + +/** + * [#next-free-field: 7] + */ +export interface _envoy_api_v2_route_RateLimit_Action { + /** + * Rate limit on source cluster. + */ + 'source_cluster'?: (_envoy_api_v2_route_RateLimit_Action_SourceCluster); + /** + * Rate limit on destination cluster. + */ + 'destination_cluster'?: (_envoy_api_v2_route_RateLimit_Action_DestinationCluster); + /** + * Rate limit on request headers. + */ + 'request_headers'?: (_envoy_api_v2_route_RateLimit_Action_RequestHeaders); + /** + * Rate limit on remote address. + */ + 'remote_address'?: (_envoy_api_v2_route_RateLimit_Action_RemoteAddress); + /** + * Rate limit on a generic key. + */ + 'generic_key'?: (_envoy_api_v2_route_RateLimit_Action_GenericKey); + /** + * Rate limit on the existence of request headers. + */ + 'header_value_match'?: (_envoy_api_v2_route_RateLimit_Action_HeaderValueMatch); + 'action_specifier'?: "source_cluster"|"destination_cluster"|"request_headers"|"remote_address"|"generic_key"|"header_value_match"; +} + +/** + * [#next-free-field: 7] + */ +export interface _envoy_api_v2_route_RateLimit_Action__Output { + /** + * Rate limit on source cluster. + */ + 'source_cluster'?: (_envoy_api_v2_route_RateLimit_Action_SourceCluster__Output); + /** + * Rate limit on destination cluster. + */ + 'destination_cluster'?: (_envoy_api_v2_route_RateLimit_Action_DestinationCluster__Output); + /** + * Rate limit on request headers. + */ + 'request_headers'?: (_envoy_api_v2_route_RateLimit_Action_RequestHeaders__Output); + /** + * Rate limit on remote address. + */ + 'remote_address'?: (_envoy_api_v2_route_RateLimit_Action_RemoteAddress__Output); + /** + * Rate limit on a generic key. + */ + 'generic_key'?: (_envoy_api_v2_route_RateLimit_Action_GenericKey__Output); + /** + * Rate limit on the existence of request headers. + */ + 'header_value_match'?: (_envoy_api_v2_route_RateLimit_Action_HeaderValueMatch__Output); + 'action_specifier': "source_cluster"|"destination_cluster"|"request_headers"|"remote_address"|"generic_key"|"header_value_match"; +} + +/** + * The following descriptor entry is appended to the descriptor: + * + * .. code-block:: cpp + * + * ("destination_cluster", "") + * + * Once a request matches against a route table rule, a routed cluster is determined by one of + * the following :ref:`route table configuration ` + * settings: + * + * * :ref:`cluster ` indicates the upstream cluster + * to route to. + * * :ref:`weighted_clusters ` + * chooses a cluster randomly from a set of clusters with attributed weight. + * * :ref:`cluster_header ` indicates which + * header in the request contains the target cluster. + */ +export interface _envoy_api_v2_route_RateLimit_Action_DestinationCluster { +} + +/** + * The following descriptor entry is appended to the descriptor: + * + * .. code-block:: cpp + * + * ("destination_cluster", "") + * + * Once a request matches against a route table rule, a routed cluster is determined by one of + * the following :ref:`route table configuration ` + * settings: + * + * * :ref:`cluster ` indicates the upstream cluster + * to route to. + * * :ref:`weighted_clusters ` + * chooses a cluster randomly from a set of clusters with attributed weight. + * * :ref:`cluster_header ` indicates which + * header in the request contains the target cluster. + */ +export interface _envoy_api_v2_route_RateLimit_Action_DestinationCluster__Output { +} + +/** + * The following descriptor entry is appended to the descriptor: + * + * .. code-block:: cpp + * + * ("generic_key", "") + */ +export interface _envoy_api_v2_route_RateLimit_Action_GenericKey { + /** + * The value to use in the descriptor entry. + */ + 'descriptor_value'?: (string); +} + +/** + * The following descriptor entry is appended to the descriptor: + * + * .. code-block:: cpp + * + * ("generic_key", "") + */ +export interface _envoy_api_v2_route_RateLimit_Action_GenericKey__Output { + /** + * The value to use in the descriptor entry. + */ + 'descriptor_value': (string); +} + +/** + * The following descriptor entry is appended to the descriptor: + * + * .. code-block:: cpp + * + * ("header_match", "") + */ +export interface _envoy_api_v2_route_RateLimit_Action_HeaderValueMatch { + /** + * The value to use in the descriptor entry. + */ + 'descriptor_value'?: (string); + /** + * If set to true, the action will append a descriptor entry when the + * request matches the headers. If set to false, the action will append a + * descriptor entry when the request does not match the headers. The + * default value is true. + */ + 'expect_match'?: (_google_protobuf_BoolValue); + /** + * Specifies a set of headers that the rate limit action should match + * on. The action will check the request’s headers against all the + * specified headers in the config. A match will happen if all the + * headers in the config are present in the request with the same values + * (or based on presence if the value field is not in the config). + */ + 'headers'?: (_envoy_api_v2_route_HeaderMatcher)[]; +} + +/** + * The following descriptor entry is appended to the descriptor: + * + * .. code-block:: cpp + * + * ("header_match", "") + */ +export interface _envoy_api_v2_route_RateLimit_Action_HeaderValueMatch__Output { + /** + * The value to use in the descriptor entry. + */ + 'descriptor_value': (string); + /** + * If set to true, the action will append a descriptor entry when the + * request matches the headers. If set to false, the action will append a + * descriptor entry when the request does not match the headers. The + * default value is true. + */ + 'expect_match'?: (_google_protobuf_BoolValue__Output); + /** + * Specifies a set of headers that the rate limit action should match + * on. The action will check the request’s headers against all the + * specified headers in the config. A match will happen if all the + * headers in the config are present in the request with the same values + * (or based on presence if the value field is not in the config). + */ + 'headers': (_envoy_api_v2_route_HeaderMatcher__Output)[]; +} + +/** + * The following descriptor entry is appended to the descriptor and is populated using the + * trusted address from :ref:`x-forwarded-for `: + * + * .. code-block:: cpp + * + * ("remote_address", "") + */ +export interface _envoy_api_v2_route_RateLimit_Action_RemoteAddress { +} + +/** + * The following descriptor entry is appended to the descriptor and is populated using the + * trusted address from :ref:`x-forwarded-for `: + * + * .. code-block:: cpp + * + * ("remote_address", "") + */ +export interface _envoy_api_v2_route_RateLimit_Action_RemoteAddress__Output { +} + +/** + * The following descriptor entry is appended when a header contains a key that matches the + * *header_name*: + * + * .. code-block:: cpp + * + * ("", "") + */ +export interface _envoy_api_v2_route_RateLimit_Action_RequestHeaders { + /** + * The header name to be queried from the request headers. The header’s + * value is used to populate the value of the descriptor entry for the + * descriptor_key. + */ + 'header_name'?: (string); + /** + * The key to use in the descriptor entry. + */ + 'descriptor_key'?: (string); +} + +/** + * The following descriptor entry is appended when a header contains a key that matches the + * *header_name*: + * + * .. code-block:: cpp + * + * ("", "") + */ +export interface _envoy_api_v2_route_RateLimit_Action_RequestHeaders__Output { + /** + * The header name to be queried from the request headers. The header’s + * value is used to populate the value of the descriptor entry for the + * descriptor_key. + */ + 'header_name': (string); + /** + * The key to use in the descriptor entry. + */ + 'descriptor_key': (string); +} + +/** + * The following descriptor entry is appended to the descriptor: + * + * .. code-block:: cpp + * + * ("source_cluster", "") + * + * is derived from the :option:`--service-cluster` option. + */ +export interface _envoy_api_v2_route_RateLimit_Action_SourceCluster { +} + +/** + * The following descriptor entry is appended to the descriptor: + * + * .. code-block:: cpp + * + * ("source_cluster", "") + * + * is derived from the :option:`--service-cluster` option. + */ +export interface _envoy_api_v2_route_RateLimit_Action_SourceCluster__Output { +} + +/** + * Global rate limiting :ref:`architecture overview `. + */ +export interface RateLimit { + /** + * Refers to the stage set in the filter. The rate limit configuration only + * applies to filters with the same stage number. The default stage number is + * 0. + * + * .. note:: + * + * The filter supports a range of 0 - 10 inclusively for stage numbers. + */ + 'stage'?: (_google_protobuf_UInt32Value); + /** + * The key to be set in runtime to disable this rate limit configuration. + */ + 'disable_key'?: (string); + /** + * A list of actions that are to be applied for this rate limit configuration. + * Order matters as the actions are processed sequentially and the descriptor + * is composed by appending descriptor entries in that sequence. If an action + * cannot append a descriptor entry, no descriptor is generated for the + * configuration. See :ref:`composing actions + * ` for additional documentation. + */ + 'actions'?: (_envoy_api_v2_route_RateLimit_Action)[]; +} + +/** + * Global rate limiting :ref:`architecture overview `. + */ +export interface RateLimit__Output { + /** + * Refers to the stage set in the filter. The rate limit configuration only + * applies to filters with the same stage number. The default stage number is + * 0. + * + * .. note:: + * + * The filter supports a range of 0 - 10 inclusively for stage numbers. + */ + 'stage'?: (_google_protobuf_UInt32Value__Output); + /** + * The key to be set in runtime to disable this rate limit configuration. + */ + 'disable_key': (string); + /** + * A list of actions that are to be applied for this rate limit configuration. + * Order matters as the actions are processed sequentially and the descriptor + * is composed by appending descriptor entries in that sequence. If an action + * cannot append a descriptor entry, no descriptor is generated for the + * configuration. See :ref:`composing actions + * ` for additional documentation. + */ + 'actions': (_envoy_api_v2_route_RateLimit_Action__Output)[]; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/route/RedirectAction.ts b/packages/grpc-js/src/generated/envoy/api/v2/route/RedirectAction.ts new file mode 100644 index 000000000..de7105a54 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/route/RedirectAction.ts @@ -0,0 +1,139 @@ +// Original file: deps/envoy-api/envoy/api/v2/route/route_components.proto + + +// Original file: deps/envoy-api/envoy/api/v2/route/route_components.proto + +export enum _envoy_api_v2_route_RedirectAction_RedirectResponseCode { + /** + * Moved Permanently HTTP Status Code - 301. + */ + MOVED_PERMANENTLY = 0, + /** + * Found HTTP Status Code - 302. + */ + FOUND = 1, + /** + * See Other HTTP Status Code - 303. + */ + SEE_OTHER = 2, + /** + * Temporary Redirect HTTP Status Code - 307. + */ + TEMPORARY_REDIRECT = 3, + /** + * Permanent Redirect HTTP Status Code - 308. + */ + PERMANENT_REDIRECT = 4, +} + +/** + * [#next-free-field: 9] + */ +export interface RedirectAction { + /** + * The host portion of the URL will be swapped with this value. + */ + 'host_redirect'?: (string); + /** + * The path portion of the URL will be swapped with this value. + */ + 'path_redirect'?: (string); + /** + * The HTTP status code to use in the redirect response. The default response + * code is MOVED_PERMANENTLY (301). + */ + 'response_code'?: (_envoy_api_v2_route_RedirectAction_RedirectResponseCode | keyof typeof _envoy_api_v2_route_RedirectAction_RedirectResponseCode); + /** + * The scheme portion of the URL will be swapped with "https". + */ + 'https_redirect'?: (boolean); + /** + * Indicates that during redirection, the matched prefix (or path) + * should be swapped with this value. This option allows redirect URLs be dynamically created + * based on the request. + * + * .. attention:: + * + * Pay attention to the use of trailing slashes as mentioned in + * :ref:`RouteAction's prefix_rewrite `. + */ + 'prefix_rewrite'?: (string); + /** + * Indicates that during redirection, the query portion of the URL will + * be removed. Default value is false. + */ + 'strip_query'?: (boolean); + /** + * The scheme portion of the URL will be swapped with this value. + */ + 'scheme_redirect'?: (string); + /** + * The port value of the URL will be swapped with this value. + */ + 'port_redirect'?: (number); + /** + * When the scheme redirection take place, the following rules apply: + * 1. If the source URI scheme is `http` and the port is explicitly + * set to `:80`, the port will be removed after the redirection + * 2. If the source URI scheme is `https` and the port is explicitly + * set to `:443`, the port will be removed after the redirection + */ + 'scheme_rewrite_specifier'?: "https_redirect"|"scheme_redirect"; + 'path_rewrite_specifier'?: "path_redirect"|"prefix_rewrite"; +} + +/** + * [#next-free-field: 9] + */ +export interface RedirectAction__Output { + /** + * The host portion of the URL will be swapped with this value. + */ + 'host_redirect': (string); + /** + * The path portion of the URL will be swapped with this value. + */ + 'path_redirect'?: (string); + /** + * The HTTP status code to use in the redirect response. The default response + * code is MOVED_PERMANENTLY (301). + */ + 'response_code': (keyof typeof _envoy_api_v2_route_RedirectAction_RedirectResponseCode); + /** + * The scheme portion of the URL will be swapped with "https". + */ + 'https_redirect'?: (boolean); + /** + * Indicates that during redirection, the matched prefix (or path) + * should be swapped with this value. This option allows redirect URLs be dynamically created + * based on the request. + * + * .. attention:: + * + * Pay attention to the use of trailing slashes as mentioned in + * :ref:`RouteAction's prefix_rewrite `. + */ + 'prefix_rewrite'?: (string); + /** + * Indicates that during redirection, the query portion of the URL will + * be removed. Default value is false. + */ + 'strip_query': (boolean); + /** + * The scheme portion of the URL will be swapped with this value. + */ + 'scheme_redirect'?: (string); + /** + * The port value of the URL will be swapped with this value. + */ + 'port_redirect': (number); + /** + * When the scheme redirection take place, the following rules apply: + * 1. If the source URI scheme is `http` and the port is explicitly + * set to `:80`, the port will be removed after the redirection + * 2. If the source URI scheme is `https` and the port is explicitly + * set to `:443`, the port will be removed after the redirection + */ + 'scheme_rewrite_specifier': "https_redirect"|"scheme_redirect"; + 'path_rewrite_specifier': "path_redirect"|"prefix_rewrite"; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/route/RetryPolicy.ts b/packages/grpc-js/src/generated/envoy/api/v2/route/RetryPolicy.ts new file mode 100644 index 000000000..24bdd2814 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/route/RetryPolicy.ts @@ -0,0 +1,218 @@ +// Original file: deps/envoy-api/envoy/api/v2/route/route_components.proto + +import { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output as _google_protobuf_UInt32Value__Output } from '../../../../google/protobuf/UInt32Value'; +import { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from '../../../../google/protobuf/Duration'; +import { HeaderMatcher as _envoy_api_v2_route_HeaderMatcher, HeaderMatcher__Output as _envoy_api_v2_route_HeaderMatcher__Output } from '../../../../envoy/api/v2/route/HeaderMatcher'; +import { Struct as _google_protobuf_Struct, Struct__Output as _google_protobuf_Struct__Output } from '../../../../google/protobuf/Struct'; +import { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../../google/protobuf/Any'; +import { Long } from '@grpc/proto-loader'; + +export interface _envoy_api_v2_route_RetryPolicy_RetryBackOff { + /** + * Specifies the base interval between retries. This parameter is required and must be greater + * than zero. Values less than 1 ms are rounded up to 1 ms. + * See :ref:`config_http_filters_router_x-envoy-max-retries` for a discussion of Envoy's + * back-off algorithm. + */ + 'base_interval'?: (_google_protobuf_Duration); + /** + * Specifies the maximum interval between retries. This parameter is optional, but must be + * greater than or equal to the `base_interval` if set. The default is 10 times the + * `base_interval`. See :ref:`config_http_filters_router_x-envoy-max-retries` for a discussion + * of Envoy's back-off algorithm. + */ + 'max_interval'?: (_google_protobuf_Duration); +} + +export interface _envoy_api_v2_route_RetryPolicy_RetryBackOff__Output { + /** + * Specifies the base interval between retries. This parameter is required and must be greater + * than zero. Values less than 1 ms are rounded up to 1 ms. + * See :ref:`config_http_filters_router_x-envoy-max-retries` for a discussion of Envoy's + * back-off algorithm. + */ + 'base_interval'?: (_google_protobuf_Duration__Output); + /** + * Specifies the maximum interval between retries. This parameter is optional, but must be + * greater than or equal to the `base_interval` if set. The default is 10 times the + * `base_interval`. See :ref:`config_http_filters_router_x-envoy-max-retries` for a discussion + * of Envoy's back-off algorithm. + */ + 'max_interval'?: (_google_protobuf_Duration__Output); +} + +export interface _envoy_api_v2_route_RetryPolicy_RetryHostPredicate { + 'name'?: (string); + 'config'?: (_google_protobuf_Struct); + 'typed_config'?: (_google_protobuf_Any); + 'config_type'?: "config"|"typed_config"; +} + +export interface _envoy_api_v2_route_RetryPolicy_RetryHostPredicate__Output { + 'name': (string); + 'config'?: (_google_protobuf_Struct__Output); + 'typed_config'?: (_google_protobuf_Any__Output); + 'config_type': "config"|"typed_config"; +} + +export interface _envoy_api_v2_route_RetryPolicy_RetryPriority { + 'name'?: (string); + 'config'?: (_google_protobuf_Struct); + 'typed_config'?: (_google_protobuf_Any); + 'config_type'?: "config"|"typed_config"; +} + +export interface _envoy_api_v2_route_RetryPolicy_RetryPriority__Output { + 'name': (string); + 'config'?: (_google_protobuf_Struct__Output); + 'typed_config'?: (_google_protobuf_Any__Output); + 'config_type': "config"|"typed_config"; +} + +/** + * HTTP retry :ref:`architecture overview `. + * [#next-free-field: 11] + */ +export interface RetryPolicy { + /** + * Specifies the conditions under which retry takes place. These are the same + * conditions documented for :ref:`config_http_filters_router_x-envoy-retry-on` and + * :ref:`config_http_filters_router_x-envoy-retry-grpc-on`. + */ + 'retry_on'?: (string); + /** + * Specifies the allowed number of retries. This parameter is optional and + * defaults to 1. These are the same conditions documented for + * :ref:`config_http_filters_router_x-envoy-max-retries`. + */ + 'num_retries'?: (_google_protobuf_UInt32Value); + /** + * Specifies a non-zero upstream timeout per retry attempt. This parameter is optional. The + * same conditions documented for + * :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms` apply. + * + * .. note:: + * + * If left unspecified, Envoy will use the global + * :ref:`route timeout ` for the request. + * Consequently, when using a :ref:`5xx ` based + * retry policy, a request that times out will not be retried as the total timeout budget + * would have been exhausted. + */ + 'per_try_timeout'?: (_google_protobuf_Duration); + /** + * Specifies an implementation of a RetryPriority which is used to determine the + * distribution of load across priorities used for retries. Refer to + * :ref:`retry plugin configuration ` for more details. + */ + 'retry_priority'?: (_envoy_api_v2_route_RetryPolicy_RetryPriority); + /** + * Specifies a collection of RetryHostPredicates that will be consulted when selecting a host + * for retries. If any of the predicates reject the host, host selection will be reattempted. + * Refer to :ref:`retry plugin configuration ` for more + * details. + */ + 'retry_host_predicate'?: (_envoy_api_v2_route_RetryPolicy_RetryHostPredicate)[]; + /** + * The maximum number of times host selection will be reattempted before giving up, at which + * point the host that was last selected will be routed to. If unspecified, this will default to + * retrying once. + */ + 'host_selection_retry_max_attempts'?: (number | string | Long); + /** + * HTTP status codes that should trigger a retry in addition to those specified by retry_on. + */ + 'retriable_status_codes'?: (number)[]; + /** + * Specifies parameters that control retry back off. This parameter is optional, in which case the + * default base interval is 25 milliseconds or, if set, the current value of the + * `upstream.base_retry_backoff_ms` runtime parameter. The default maximum interval is 10 times + * the base interval. The documentation for :ref:`config_http_filters_router_x-envoy-max-retries` + * describes Envoy's back-off algorithm. + */ + 'retry_back_off'?: (_envoy_api_v2_route_RetryPolicy_RetryBackOff); + /** + * HTTP response headers that trigger a retry if present in the response. A retry will be + * triggered if any of the header matches match the upstream response headers. + * The field is only consulted if 'retriable-headers' retry policy is active. + */ + 'retriable_headers'?: (_envoy_api_v2_route_HeaderMatcher)[]; + /** + * HTTP headers which must be present in the request for retries to be attempted. + */ + 'retriable_request_headers'?: (_envoy_api_v2_route_HeaderMatcher)[]; +} + +/** + * HTTP retry :ref:`architecture overview `. + * [#next-free-field: 11] + */ +export interface RetryPolicy__Output { + /** + * Specifies the conditions under which retry takes place. These are the same + * conditions documented for :ref:`config_http_filters_router_x-envoy-retry-on` and + * :ref:`config_http_filters_router_x-envoy-retry-grpc-on`. + */ + 'retry_on': (string); + /** + * Specifies the allowed number of retries. This parameter is optional and + * defaults to 1. These are the same conditions documented for + * :ref:`config_http_filters_router_x-envoy-max-retries`. + */ + 'num_retries'?: (_google_protobuf_UInt32Value__Output); + /** + * Specifies a non-zero upstream timeout per retry attempt. This parameter is optional. The + * same conditions documented for + * :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms` apply. + * + * .. note:: + * + * If left unspecified, Envoy will use the global + * :ref:`route timeout ` for the request. + * Consequently, when using a :ref:`5xx ` based + * retry policy, a request that times out will not be retried as the total timeout budget + * would have been exhausted. + */ + 'per_try_timeout'?: (_google_protobuf_Duration__Output); + /** + * Specifies an implementation of a RetryPriority which is used to determine the + * distribution of load across priorities used for retries. Refer to + * :ref:`retry plugin configuration ` for more details. + */ + 'retry_priority'?: (_envoy_api_v2_route_RetryPolicy_RetryPriority__Output); + /** + * Specifies a collection of RetryHostPredicates that will be consulted when selecting a host + * for retries. If any of the predicates reject the host, host selection will be reattempted. + * Refer to :ref:`retry plugin configuration ` for more + * details. + */ + 'retry_host_predicate': (_envoy_api_v2_route_RetryPolicy_RetryHostPredicate__Output)[]; + /** + * The maximum number of times host selection will be reattempted before giving up, at which + * point the host that was last selected will be routed to. If unspecified, this will default to + * retrying once. + */ + 'host_selection_retry_max_attempts': (string); + /** + * HTTP status codes that should trigger a retry in addition to those specified by retry_on. + */ + 'retriable_status_codes': (number)[]; + /** + * Specifies parameters that control retry back off. This parameter is optional, in which case the + * default base interval is 25 milliseconds or, if set, the current value of the + * `upstream.base_retry_backoff_ms` runtime parameter. The default maximum interval is 10 times + * the base interval. The documentation for :ref:`config_http_filters_router_x-envoy-max-retries` + * describes Envoy's back-off algorithm. + */ + 'retry_back_off'?: (_envoy_api_v2_route_RetryPolicy_RetryBackOff__Output); + /** + * HTTP response headers that trigger a retry if present in the response. A retry will be + * triggered if any of the header matches match the upstream response headers. + * The field is only consulted if 'retriable-headers' retry policy is active. + */ + 'retriable_headers': (_envoy_api_v2_route_HeaderMatcher__Output)[]; + /** + * HTTP headers which must be present in the request for retries to be attempted. + */ + 'retriable_request_headers': (_envoy_api_v2_route_HeaderMatcher__Output)[]; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/route/Route.ts b/packages/grpc-js/src/generated/envoy/api/v2/route/Route.ts new file mode 100644 index 000000000..7d0ff8bd8 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/route/Route.ts @@ -0,0 +1,228 @@ +// Original file: deps/envoy-api/envoy/api/v2/route/route_components.proto + +import { RouteMatch as _envoy_api_v2_route_RouteMatch, RouteMatch__Output as _envoy_api_v2_route_RouteMatch__Output } from '../../../../envoy/api/v2/route/RouteMatch'; +import { RouteAction as _envoy_api_v2_route_RouteAction, RouteAction__Output as _envoy_api_v2_route_RouteAction__Output } from '../../../../envoy/api/v2/route/RouteAction'; +import { RedirectAction as _envoy_api_v2_route_RedirectAction, RedirectAction__Output as _envoy_api_v2_route_RedirectAction__Output } from '../../../../envoy/api/v2/route/RedirectAction'; +import { Metadata as _envoy_api_v2_core_Metadata, Metadata__Output as _envoy_api_v2_core_Metadata__Output } from '../../../../envoy/api/v2/core/Metadata'; +import { Decorator as _envoy_api_v2_route_Decorator, Decorator__Output as _envoy_api_v2_route_Decorator__Output } from '../../../../envoy/api/v2/route/Decorator'; +import { DirectResponseAction as _envoy_api_v2_route_DirectResponseAction, DirectResponseAction__Output as _envoy_api_v2_route_DirectResponseAction__Output } from '../../../../envoy/api/v2/route/DirectResponseAction'; +import { Struct as _google_protobuf_Struct, Struct__Output as _google_protobuf_Struct__Output } from '../../../../google/protobuf/Struct'; +import { HeaderValueOption as _envoy_api_v2_core_HeaderValueOption, HeaderValueOption__Output as _envoy_api_v2_core_HeaderValueOption__Output } from '../../../../envoy/api/v2/core/HeaderValueOption'; +import { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../../google/protobuf/Any'; +import { Tracing as _envoy_api_v2_route_Tracing, Tracing__Output as _envoy_api_v2_route_Tracing__Output } from '../../../../envoy/api/v2/route/Tracing'; +import { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output as _google_protobuf_UInt32Value__Output } from '../../../../google/protobuf/UInt32Value'; +import { FilterAction as _envoy_api_v2_route_FilterAction, FilterAction__Output as _envoy_api_v2_route_FilterAction__Output } from '../../../../envoy/api/v2/route/FilterAction'; + +/** + * A route is both a specification of how to match a request as well as an indication of what to do + * next (e.g., redirect, forward, rewrite, etc.). + * + * .. attention:: + * + * Envoy supports routing on HTTP method via :ref:`header matching + * `. + * [#next-free-field: 18] + */ +export interface Route { + /** + * Route matching parameters. + */ + 'match'?: (_envoy_api_v2_route_RouteMatch); + /** + * Route request to some upstream cluster. + */ + 'route'?: (_envoy_api_v2_route_RouteAction); + /** + * Return a redirect. + */ + 'redirect'?: (_envoy_api_v2_route_RedirectAction); + /** + * The Metadata field can be used to provide additional information + * about the route. It can be used for configuration, stats, and logging. + * The metadata should go under the filter namespace that will need it. + * For instance, if the metadata is intended for the Router filter, + * the filter name should be specified as *envoy.filters.http.router*. + */ + 'metadata'?: (_envoy_api_v2_core_Metadata); + /** + * Decorator for the matched route. + */ + 'decorator'?: (_envoy_api_v2_route_Decorator); + /** + * Return an arbitrary HTTP response directly, without proxying. + */ + 'direct_response'?: (_envoy_api_v2_route_DirectResponseAction); + /** + * The per_filter_config field can be used to provide route-specific + * configurations for filters. The key should match the filter name, such as + * *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter + * specific; see the :ref:`HTTP filter documentation ` for + * if and how it is utilized. + */ + 'per_filter_config'?: ({[key: string]: _google_protobuf_Struct}); + /** + * Specifies a set of headers that will be added to requests matching this + * route. Headers specified at this level are applied before headers from the + * enclosing :ref:`envoy_api_msg_route.VirtualHost` and + * :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on + * header value syntax, see the documentation on :ref:`custom request headers + * `. + */ + 'request_headers_to_add'?: (_envoy_api_v2_core_HeaderValueOption)[]; + /** + * Specifies a set of headers that will be added to responses to requests + * matching this route. Headers specified at this level are applied before + * headers from the enclosing :ref:`envoy_api_msg_route.VirtualHost` and + * :ref:`envoy_api_msg_RouteConfiguration`. For more information, including + * details on header value syntax, see the documentation on + * :ref:`custom request headers `. + */ + 'response_headers_to_add'?: (_envoy_api_v2_core_HeaderValueOption)[]; + /** + * Specifies a list of HTTP headers that should be removed from each response + * to requests matching this route. + */ + 'response_headers_to_remove'?: (string)[]; + /** + * Specifies a list of HTTP headers that should be removed from each request + * matching this route. + */ + 'request_headers_to_remove'?: (string)[]; + /** + * The typed_per_filter_config field can be used to provide route-specific + * configurations for filters. The key should match the filter name, such as + * *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter + * specific; see the :ref:`HTTP filter documentation ` for + * if and how it is utilized. + */ + 'typed_per_filter_config'?: ({[key: string]: _google_protobuf_Any}); + /** + * Name for the route. + */ + 'name'?: (string); + /** + * Presence of the object defines whether the connection manager's tracing configuration + * is overridden by this route specific instance. + */ + 'tracing'?: (_envoy_api_v2_route_Tracing); + /** + * The maximum bytes which will be buffered for retries and shadowing. + * If set, the bytes actually buffered will be the minimum value of this and the + * listener per_connection_buffer_limit_bytes. + */ + 'per_request_buffer_limit_bytes'?: (_google_protobuf_UInt32Value); + /** + * [#not-implemented-hide:] + * If true, a filter will define the action (e.g., it could dynamically generate the + * RouteAction). + */ + 'filter_action'?: (_envoy_api_v2_route_FilterAction); + 'action'?: "route"|"redirect"|"direct_response"|"filter_action"; +} + +/** + * A route is both a specification of how to match a request as well as an indication of what to do + * next (e.g., redirect, forward, rewrite, etc.). + * + * .. attention:: + * + * Envoy supports routing on HTTP method via :ref:`header matching + * `. + * [#next-free-field: 18] + */ +export interface Route__Output { + /** + * Route matching parameters. + */ + 'match'?: (_envoy_api_v2_route_RouteMatch__Output); + /** + * Route request to some upstream cluster. + */ + 'route'?: (_envoy_api_v2_route_RouteAction__Output); + /** + * Return a redirect. + */ + 'redirect'?: (_envoy_api_v2_route_RedirectAction__Output); + /** + * The Metadata field can be used to provide additional information + * about the route. It can be used for configuration, stats, and logging. + * The metadata should go under the filter namespace that will need it. + * For instance, if the metadata is intended for the Router filter, + * the filter name should be specified as *envoy.filters.http.router*. + */ + 'metadata'?: (_envoy_api_v2_core_Metadata__Output); + /** + * Decorator for the matched route. + */ + 'decorator'?: (_envoy_api_v2_route_Decorator__Output); + /** + * Return an arbitrary HTTP response directly, without proxying. + */ + 'direct_response'?: (_envoy_api_v2_route_DirectResponseAction__Output); + /** + * The per_filter_config field can be used to provide route-specific + * configurations for filters. The key should match the filter name, such as + * *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter + * specific; see the :ref:`HTTP filter documentation ` for + * if and how it is utilized. + */ + 'per_filter_config'?: ({[key: string]: _google_protobuf_Struct__Output}); + /** + * Specifies a set of headers that will be added to requests matching this + * route. Headers specified at this level are applied before headers from the + * enclosing :ref:`envoy_api_msg_route.VirtualHost` and + * :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on + * header value syntax, see the documentation on :ref:`custom request headers + * `. + */ + 'request_headers_to_add': (_envoy_api_v2_core_HeaderValueOption__Output)[]; + /** + * Specifies a set of headers that will be added to responses to requests + * matching this route. Headers specified at this level are applied before + * headers from the enclosing :ref:`envoy_api_msg_route.VirtualHost` and + * :ref:`envoy_api_msg_RouteConfiguration`. For more information, including + * details on header value syntax, see the documentation on + * :ref:`custom request headers `. + */ + 'response_headers_to_add': (_envoy_api_v2_core_HeaderValueOption__Output)[]; + /** + * Specifies a list of HTTP headers that should be removed from each response + * to requests matching this route. + */ + 'response_headers_to_remove': (string)[]; + /** + * Specifies a list of HTTP headers that should be removed from each request + * matching this route. + */ + 'request_headers_to_remove': (string)[]; + /** + * The typed_per_filter_config field can be used to provide route-specific + * configurations for filters. The key should match the filter name, such as + * *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter + * specific; see the :ref:`HTTP filter documentation ` for + * if and how it is utilized. + */ + 'typed_per_filter_config'?: ({[key: string]: _google_protobuf_Any__Output}); + /** + * Name for the route. + */ + 'name': (string); + /** + * Presence of the object defines whether the connection manager's tracing configuration + * is overridden by this route specific instance. + */ + 'tracing'?: (_envoy_api_v2_route_Tracing__Output); + /** + * The maximum bytes which will be buffered for retries and shadowing. + * If set, the bytes actually buffered will be the minimum value of this and the + * listener per_connection_buffer_limit_bytes. + */ + 'per_request_buffer_limit_bytes'?: (_google_protobuf_UInt32Value__Output); + /** + * [#not-implemented-hide:] + * If true, a filter will define the action (e.g., it could dynamically generate the + * RouteAction). + */ + 'filter_action'?: (_envoy_api_v2_route_FilterAction__Output); + 'action': "route"|"redirect"|"direct_response"|"filter_action"; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/route/RouteAction.ts b/packages/grpc-js/src/generated/envoy/api/v2/route/RouteAction.ts new file mode 100644 index 000000000..94e769deb --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/route/RouteAction.ts @@ -0,0 +1,1004 @@ +// Original file: deps/envoy-api/envoy/api/v2/route/route_components.proto + +import { WeightedCluster as _envoy_api_v2_route_WeightedCluster, WeightedCluster__Output as _envoy_api_v2_route_WeightedCluster__Output } from '../../../../envoy/api/v2/route/WeightedCluster'; +import { Metadata as _envoy_api_v2_core_Metadata, Metadata__Output as _envoy_api_v2_core_Metadata__Output } from '../../../../envoy/api/v2/core/Metadata'; +import { BoolValue as _google_protobuf_BoolValue, BoolValue__Output as _google_protobuf_BoolValue__Output } from '../../../../google/protobuf/BoolValue'; +import { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from '../../../../google/protobuf/Duration'; +import { RetryPolicy as _envoy_api_v2_route_RetryPolicy, RetryPolicy__Output as _envoy_api_v2_route_RetryPolicy__Output } from '../../../../envoy/api/v2/route/RetryPolicy'; +import { RoutingPriority as _envoy_api_v2_core_RoutingPriority } from '../../../../envoy/api/v2/core/RoutingPriority'; +import { RateLimit as _envoy_api_v2_route_RateLimit, RateLimit__Output as _envoy_api_v2_route_RateLimit__Output } from '../../../../envoy/api/v2/route/RateLimit'; +import { CorsPolicy as _envoy_api_v2_route_CorsPolicy, CorsPolicy__Output as _envoy_api_v2_route_CorsPolicy__Output } from '../../../../envoy/api/v2/route/CorsPolicy'; +import { HedgePolicy as _envoy_api_v2_route_HedgePolicy, HedgePolicy__Output as _envoy_api_v2_route_HedgePolicy__Output } from '../../../../envoy/api/v2/route/HedgePolicy'; +import { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output as _google_protobuf_UInt32Value__Output } from '../../../../google/protobuf/UInt32Value'; +import { RegexMatchAndSubstitute as _envoy_type_matcher_RegexMatchAndSubstitute, RegexMatchAndSubstitute__Output as _envoy_type_matcher_RegexMatchAndSubstitute__Output } from '../../../../envoy/type/matcher/RegexMatchAndSubstitute'; +import { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../../google/protobuf/Any'; +import { RuntimeFractionalPercent as _envoy_api_v2_core_RuntimeFractionalPercent, RuntimeFractionalPercent__Output as _envoy_api_v2_core_RuntimeFractionalPercent__Output } from '../../../../envoy/api/v2/core/RuntimeFractionalPercent'; + +// Original file: deps/envoy-api/envoy/api/v2/route/route_components.proto + +export enum _envoy_api_v2_route_RouteAction_ClusterNotFoundResponseCode { + /** + * HTTP status code - 503 Service Unavailable. + */ + SERVICE_UNAVAILABLE = 0, + /** + * HTTP status code - 404 Not Found. + */ + NOT_FOUND = 1, +} + +export interface _envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties { + /** + * Hash on source IP address. + */ + 'source_ip'?: (boolean); +} + +export interface _envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties__Output { + /** + * Hash on source IP address. + */ + 'source_ip': (boolean); +} + +/** + * Envoy supports two types of cookie affinity: + * + * 1. Passive. Envoy takes a cookie that's present in the cookies header and + * hashes on its value. + * + * 2. Generated. Envoy generates and sets a cookie with an expiration (TTL) + * on the first request from the client in its response to the client, + * based on the endpoint the request gets sent to. The client then + * presents this on the next and all subsequent requests. The hash of + * this is sufficient to ensure these requests get sent to the same + * endpoint. The cookie is generated by hashing the source and + * destination ports and addresses so that multiple independent HTTP2 + * streams on the same connection will independently receive the same + * cookie, even if they arrive at the Envoy simultaneously. + */ +export interface _envoy_api_v2_route_RouteAction_HashPolicy_Cookie { + /** + * The name of the cookie that will be used to obtain the hash key. If the + * cookie is not present and ttl below is not set, no hash will be + * produced. + */ + 'name'?: (string); + /** + * If specified, a cookie with the TTL will be generated if the cookie is + * not present. If the TTL is present and zero, the generated cookie will + * be a session cookie. + */ + 'ttl'?: (_google_protobuf_Duration); + /** + * The name of the path for the cookie. If no path is specified here, no path + * will be set for the cookie. + */ + 'path'?: (string); +} + +/** + * Envoy supports two types of cookie affinity: + * + * 1. Passive. Envoy takes a cookie that's present in the cookies header and + * hashes on its value. + * + * 2. Generated. Envoy generates and sets a cookie with an expiration (TTL) + * on the first request from the client in its response to the client, + * based on the endpoint the request gets sent to. The client then + * presents this on the next and all subsequent requests. The hash of + * this is sufficient to ensure these requests get sent to the same + * endpoint. The cookie is generated by hashing the source and + * destination ports and addresses so that multiple independent HTTP2 + * streams on the same connection will independently receive the same + * cookie, even if they arrive at the Envoy simultaneously. + */ +export interface _envoy_api_v2_route_RouteAction_HashPolicy_Cookie__Output { + /** + * The name of the cookie that will be used to obtain the hash key. If the + * cookie is not present and ttl below is not set, no hash will be + * produced. + */ + 'name': (string); + /** + * If specified, a cookie with the TTL will be generated if the cookie is + * not present. If the TTL is present and zero, the generated cookie will + * be a session cookie. + */ + 'ttl'?: (_google_protobuf_Duration__Output); + /** + * The name of the path for the cookie. If no path is specified here, no path + * will be set for the cookie. + */ + 'path': (string); +} + +export interface _envoy_api_v2_route_RouteAction_HashPolicy_FilterState { + /** + * The name of the Object in the per-request filterState, which is an + * Envoy::Http::Hashable object. If there is no data associated with the key, + * or the stored object is not Envoy::Http::Hashable, no hash will be produced. + */ + 'key'?: (string); +} + +export interface _envoy_api_v2_route_RouteAction_HashPolicy_FilterState__Output { + /** + * The name of the Object in the per-request filterState, which is an + * Envoy::Http::Hashable object. If there is no data associated with the key, + * or the stored object is not Envoy::Http::Hashable, no hash will be produced. + */ + 'key': (string); +} + +/** + * Specifies the route's hashing policy if the upstream cluster uses a hashing :ref:`load balancer + * `. + * [#next-free-field: 7] + */ +export interface _envoy_api_v2_route_RouteAction_HashPolicy { + /** + * Header hash policy. + */ + 'header'?: (_envoy_api_v2_route_RouteAction_HashPolicy_Header); + /** + * Cookie hash policy. + */ + 'cookie'?: (_envoy_api_v2_route_RouteAction_HashPolicy_Cookie); + /** + * Connection properties hash policy. + */ + 'connection_properties'?: (_envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties); + /** + * Query parameter hash policy. + */ + 'query_parameter'?: (_envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter); + /** + * Filter state hash policy. + */ + 'filter_state'?: (_envoy_api_v2_route_RouteAction_HashPolicy_FilterState); + /** + * The flag that short-circuits the hash computing. This field provides a + * 'fallback' style of configuration: "if a terminal policy doesn't work, + * fallback to rest of the policy list", it saves time when the terminal + * policy works. + * + * If true, and there is already a hash computed, ignore rest of the + * list of hash polices. + * For example, if the following hash methods are configured: + * + * ========= ======== + * specifier terminal + * ========= ======== + * Header A true + * Header B false + * Header C false + * ========= ======== + * + * The generateHash process ends if policy "header A" generates a hash, as + * it's a terminal policy. + */ + 'terminal'?: (boolean); + 'policy_specifier'?: "header"|"cookie"|"connection_properties"|"query_parameter"|"filter_state"; +} + +/** + * Specifies the route's hashing policy if the upstream cluster uses a hashing :ref:`load balancer + * `. + * [#next-free-field: 7] + */ +export interface _envoy_api_v2_route_RouteAction_HashPolicy__Output { + /** + * Header hash policy. + */ + 'header'?: (_envoy_api_v2_route_RouteAction_HashPolicy_Header__Output); + /** + * Cookie hash policy. + */ + 'cookie'?: (_envoy_api_v2_route_RouteAction_HashPolicy_Cookie__Output); + /** + * Connection properties hash policy. + */ + 'connection_properties'?: (_envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties__Output); + /** + * Query parameter hash policy. + */ + 'query_parameter'?: (_envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter__Output); + /** + * Filter state hash policy. + */ + 'filter_state'?: (_envoy_api_v2_route_RouteAction_HashPolicy_FilterState__Output); + /** + * The flag that short-circuits the hash computing. This field provides a + * 'fallback' style of configuration: "if a terminal policy doesn't work, + * fallback to rest of the policy list", it saves time when the terminal + * policy works. + * + * If true, and there is already a hash computed, ignore rest of the + * list of hash polices. + * For example, if the following hash methods are configured: + * + * ========= ======== + * specifier terminal + * ========= ======== + * Header A true + * Header B false + * Header C false + * ========= ======== + * + * The generateHash process ends if policy "header A" generates a hash, as + * it's a terminal policy. + */ + 'terminal': (boolean); + 'policy_specifier': "header"|"cookie"|"connection_properties"|"query_parameter"|"filter_state"; +} + +export interface _envoy_api_v2_route_RouteAction_HashPolicy_Header { + /** + * The name of the request header that will be used to obtain the hash + * key. If the request header is not present, no hash will be produced. + */ + 'header_name'?: (string); +} + +export interface _envoy_api_v2_route_RouteAction_HashPolicy_Header__Output { + /** + * The name of the request header that will be used to obtain the hash + * key. If the request header is not present, no hash will be produced. + */ + 'header_name': (string); +} + +// Original file: deps/envoy-api/envoy/api/v2/route/route_components.proto + +/** + * Configures :ref:`internal redirect ` behavior. + */ +export enum _envoy_api_v2_route_RouteAction_InternalRedirectAction { + PASS_THROUGH_INTERNAL_REDIRECT = 0, + HANDLE_INTERNAL_REDIRECT = 1, +} + +export interface _envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter { + /** + * The name of the URL query parameter that will be used to obtain the hash + * key. If the parameter is not present, no hash will be produced. Query + * parameter names are case-sensitive. + */ + 'name'?: (string); +} + +export interface _envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter__Output { + /** + * The name of the URL query parameter that will be used to obtain the hash + * key. If the parameter is not present, no hash will be produced. Query + * parameter names are case-sensitive. + */ + 'name': (string); +} + +/** + * The router is capable of shadowing traffic from one cluster to another. The current + * implementation is "fire and forget," meaning Envoy will not wait for the shadow cluster to + * respond before returning the response from the primary cluster. All normal statistics are + * collected for the shadow cluster making this feature useful for testing. + * + * During shadowing, the host/authority header is altered such that *-shadow* is appended. This is + * useful for logging. For example, *cluster1* becomes *cluster1-shadow*. + * + * .. note:: + * + * Shadowing will not be triggered if the primary cluster does not exist. + */ +export interface _envoy_api_v2_route_RouteAction_RequestMirrorPolicy { + /** + * Specifies the cluster that requests will be mirrored to. The cluster must + * exist in the cluster manager configuration. + */ + 'cluster'?: (string); + /** + * If not specified, all requests to the target cluster will be mirrored. If + * specified, Envoy will lookup the runtime key to get the % of requests to + * mirror. Valid values are from 0 to 10000, allowing for increments of + * 0.01% of requests to be mirrored. If the runtime key is specified in the + * configuration but not present in runtime, 0 is the default and thus 0% of + * requests will be mirrored. + * + * .. attention:: + * + * **This field is deprecated**. Set the + * :ref:`runtime_fraction + * ` + * field instead. Mirroring occurs if both this and + * ` + * are not set. + */ + 'runtime_key'?: (string); + /** + * If not specified, all requests to the target cluster will be mirrored. + * + * If specified, this field takes precedence over the `runtime_key` field and requests must also + * fall under the percentage of matches indicated by this field. + * + * For some fraction N/D, a random number in the range [0,D) is selected. If the + * number is <= the value of the numerator N, or if the key is not present, the default + * value, the request will be mirrored. + */ + 'runtime_fraction'?: (_envoy_api_v2_core_RuntimeFractionalPercent); + /** + * Determines if the trace span should be sampled. Defaults to true. + */ + 'trace_sampled'?: (_google_protobuf_BoolValue); +} + +/** + * The router is capable of shadowing traffic from one cluster to another. The current + * implementation is "fire and forget," meaning Envoy will not wait for the shadow cluster to + * respond before returning the response from the primary cluster. All normal statistics are + * collected for the shadow cluster making this feature useful for testing. + * + * During shadowing, the host/authority header is altered such that *-shadow* is appended. This is + * useful for logging. For example, *cluster1* becomes *cluster1-shadow*. + * + * .. note:: + * + * Shadowing will not be triggered if the primary cluster does not exist. + */ +export interface _envoy_api_v2_route_RouteAction_RequestMirrorPolicy__Output { + /** + * Specifies the cluster that requests will be mirrored to. The cluster must + * exist in the cluster manager configuration. + */ + 'cluster': (string); + /** + * If not specified, all requests to the target cluster will be mirrored. If + * specified, Envoy will lookup the runtime key to get the % of requests to + * mirror. Valid values are from 0 to 10000, allowing for increments of + * 0.01% of requests to be mirrored. If the runtime key is specified in the + * configuration but not present in runtime, 0 is the default and thus 0% of + * requests will be mirrored. + * + * .. attention:: + * + * **This field is deprecated**. Set the + * :ref:`runtime_fraction + * ` + * field instead. Mirroring occurs if both this and + * ` + * are not set. + */ + 'runtime_key': (string); + /** + * If not specified, all requests to the target cluster will be mirrored. + * + * If specified, this field takes precedence over the `runtime_key` field and requests must also + * fall under the percentage of matches indicated by this field. + * + * For some fraction N/D, a random number in the range [0,D) is selected. If the + * number is <= the value of the numerator N, or if the key is not present, the default + * value, the request will be mirrored. + */ + 'runtime_fraction'?: (_envoy_api_v2_core_RuntimeFractionalPercent__Output); + /** + * Determines if the trace span should be sampled. Defaults to true. + */ + 'trace_sampled'?: (_google_protobuf_BoolValue__Output); +} + +/** + * Allows enabling and disabling upgrades on a per-route basis. + * This overrides any enabled/disabled upgrade filter chain specified in the + * HttpConnectionManager + * :ref:`upgrade_configs + * ` + * but does not affect any custom filter chain specified there. + */ +export interface _envoy_api_v2_route_RouteAction_UpgradeConfig { + /** + * The case-insensitive name of this upgrade, e.g. "websocket". + * For each upgrade type present in upgrade_configs, requests with + * Upgrade: [upgrade_type] will be proxied upstream. + */ + 'upgrade_type'?: (string); + /** + * Determines if upgrades are available on this route. Defaults to true. + */ + 'enabled'?: (_google_protobuf_BoolValue); +} + +/** + * Allows enabling and disabling upgrades on a per-route basis. + * This overrides any enabled/disabled upgrade filter chain specified in the + * HttpConnectionManager + * :ref:`upgrade_configs + * ` + * but does not affect any custom filter chain specified there. + */ +export interface _envoy_api_v2_route_RouteAction_UpgradeConfig__Output { + /** + * The case-insensitive name of this upgrade, e.g. "websocket". + * For each upgrade type present in upgrade_configs, requests with + * Upgrade: [upgrade_type] will be proxied upstream. + */ + 'upgrade_type': (string); + /** + * Determines if upgrades are available on this route. Defaults to true. + */ + 'enabled'?: (_google_protobuf_BoolValue__Output); +} + +/** + * [#next-free-field: 34] + */ +export interface RouteAction { + /** + * Indicates the upstream cluster to which the request should be routed + * to. + */ + 'cluster'?: (string); + /** + * Envoy will determine the cluster to route to by reading the value of the + * HTTP header named by cluster_header from the request headers. If the + * header is not found or the referenced cluster does not exist, Envoy will + * return a 404 response. + * + * .. attention:: + * + * Internally, Envoy always uses the HTTP/2 *:authority* header to represent the HTTP/1 + * *Host* header. Thus, if attempting to match on *Host*, match on *:authority* instead. + */ + 'cluster_header'?: (string); + /** + * Multiple upstream clusters can be specified for a given route. The + * request is routed to one of the upstream clusters based on weights + * assigned to each cluster. See + * :ref:`traffic splitting ` + * for additional documentation. + */ + 'weighted_clusters'?: (_envoy_api_v2_route_WeightedCluster); + /** + * Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints + * in the upstream cluster with metadata matching what's set in this field will be considered + * for load balancing. If using :ref:`weighted_clusters + * `, metadata will be merged, with values + * provided there taking precedence. The filter name should be specified as *envoy.lb*. + */ + 'metadata_match'?: (_envoy_api_v2_core_Metadata); + /** + * Indicates that during forwarding, the matched prefix (or path) should be + * swapped with this value. This option allows application URLs to be rooted + * at a different path from those exposed at the reverse proxy layer. The router filter will + * place the original path before rewrite into the :ref:`x-envoy-original-path + * ` header. + * + * Only one of *prefix_rewrite* or + * :ref:`regex_rewrite ` + * may be specified. + * + * .. attention:: + * + * Pay careful attention to the use of trailing slashes in the + * :ref:`route's match ` prefix value. + * Stripping a prefix from a path requires multiple Routes to handle all cases. For example, + * rewriting * /prefix* to * /* and * /prefix/etc* to * /etc* cannot be done in a single + * :ref:`Route `, as shown by the below config entries: + * + * .. code-block:: yaml + * + * - match: + * prefix: "/prefix/" + * route: + * prefix_rewrite: "/" + * - match: + * prefix: "/prefix" + * route: + * prefix_rewrite: "/" + * + * Having above entries in the config, requests to * /prefix* will be stripped to * /*, while + * requests to * /prefix/etc* will be stripped to * /etc*. + */ + 'prefix_rewrite'?: (string); + /** + * Indicates that during forwarding, the host header will be swapped with + * this value. + */ + 'host_rewrite'?: (string); + /** + * Indicates that during forwarding, the host header will be swapped with + * the hostname of the upstream host chosen by the cluster manager. This + * option is applicable only when the destination cluster for a route is of + * type *strict_dns* or *logical_dns*. Setting this to true with other cluster + * types has no effect. + */ + 'auto_host_rewrite'?: (_google_protobuf_BoolValue); + /** + * Specifies the upstream timeout for the route. If not specified, the default is 15s. This + * spans between the point at which the entire downstream request (i.e. end-of-stream) has been + * processed and when the upstream response has been completely processed. A value of 0 will + * disable the route's timeout. + * + * .. note:: + * + * This timeout includes all retries. See also + * :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`, + * :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the + * :ref:`retry overview `. + */ + 'timeout'?: (_google_protobuf_Duration); + /** + * Indicates that the route has a retry policy. Note that if this is set, + * it'll take precedence over the virtual host level retry policy entirely + * (e.g.: policies are not merged, most internal one becomes the enforced policy). + */ + 'retry_policy'?: (_envoy_api_v2_route_RetryPolicy); + /** + * Indicates that the route has a request mirroring policy. + * + * .. attention:: + * This field has been deprecated in favor of `request_mirror_policies` which supports one or + * more mirroring policies. + */ + 'request_mirror_policy'?: (_envoy_api_v2_route_RouteAction_RequestMirrorPolicy); + /** + * Optionally specifies the :ref:`routing priority `. + */ + 'priority'?: (_envoy_api_v2_core_RoutingPriority | keyof typeof _envoy_api_v2_core_RoutingPriority); + /** + * Specifies a set of rate limit configurations that could be applied to the + * route. + */ + 'rate_limits'?: (_envoy_api_v2_route_RateLimit)[]; + /** + * Specifies if the rate limit filter should include the virtual host rate + * limits. By default, if the route configured rate limits, the virtual host + * :ref:`rate_limits ` are not applied to the + * request. + */ + 'include_vh_rate_limits'?: (_google_protobuf_BoolValue); + /** + * Specifies a list of hash policies to use for ring hash load balancing. Each + * hash policy is evaluated individually and the combined result is used to + * route the request. The method of combination is deterministic such that + * identical lists of hash policies will produce the same hash. Since a hash + * policy examines specific parts of a request, it can fail to produce a hash + * (i.e. if the hashed header is not present). If (and only if) all configured + * hash policies fail to generate a hash, no hash will be produced for + * the route. In this case, the behavior is the same as if no hash policies + * were specified (i.e. the ring hash load balancer will choose a random + * backend). If a hash policy has the "terminal" attribute set to true, and + * there is already a hash generated, the hash is returned immediately, + * ignoring the rest of the hash policy list. + */ + 'hash_policy'?: (_envoy_api_v2_route_RouteAction_HashPolicy)[]; + /** + * Indicates that the route has a CORS policy. + */ + 'cors'?: (_envoy_api_v2_route_CorsPolicy); + /** + * The HTTP status code to use when configured cluster is not found. + * The default response code is 503 Service Unavailable. + */ + 'cluster_not_found_response_code'?: (_envoy_api_v2_route_RouteAction_ClusterNotFoundResponseCode | keyof typeof _envoy_api_v2_route_RouteAction_ClusterNotFoundResponseCode); + /** + * If present, and the request is a gRPC request, use the + * `grpc-timeout header `_, + * or its default value (infinity) instead of + * :ref:`timeout `, but limit the applied timeout + * to the maximum value specified here. If configured as 0, the maximum allowed timeout for + * gRPC requests is infinity. If not configured at all, the `grpc-timeout` header is not used + * and gRPC requests time out like any other requests using + * :ref:`timeout ` or its default. + * This can be used to prevent unexpected upstream request timeouts due to potentially long + * time gaps between gRPC request and response in gRPC streaming mode. + * + * .. note:: + * + * If a timeout is specified using :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`, it takes + * precedence over `grpc-timeout header `_, when + * both are present. See also + * :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`, + * :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the + * :ref:`retry overview `. + */ + 'max_grpc_timeout'?: (_google_protobuf_Duration); + /** + * Specifies the idle timeout for the route. If not specified, there is no per-route idle timeout, + * although the connection manager wide :ref:`stream_idle_timeout + * ` + * will still apply. A value of 0 will completely disable the route's idle timeout, even if a + * connection manager stream idle timeout is configured. + * + * The idle timeout is distinct to :ref:`timeout + * `, which provides an upper bound + * on the upstream response time; :ref:`idle_timeout + * ` instead bounds the amount + * of time the request's stream may be idle. + * + * After header decoding, the idle timeout will apply on downstream and + * upstream request events. Each time an encode/decode event for headers or + * data is processed for the stream, the timer will be reset. If the timeout + * fires, the stream is terminated with a 408 Request Timeout error code if no + * upstream response header has been received, otherwise a stream reset + * occurs. + */ + 'idle_timeout'?: (_google_protobuf_Duration); + 'upgrade_configs'?: (_envoy_api_v2_route_RouteAction_UpgradeConfig)[]; + 'internal_redirect_action'?: (_envoy_api_v2_route_RouteAction_InternalRedirectAction | keyof typeof _envoy_api_v2_route_RouteAction_InternalRedirectAction); + /** + * Indicates that the route has a hedge policy. Note that if this is set, + * it'll take precedence over the virtual host level hedge policy entirely + * (e.g.: policies are not merged, most internal one becomes the enforced policy). + */ + 'hedge_policy'?: (_envoy_api_v2_route_HedgePolicy); + /** + * If present, Envoy will adjust the timeout provided by the `grpc-timeout` header by subtracting + * the provided duration from the header. This is useful in allowing Envoy to set its global + * timeout to be less than that of the deadline imposed by the calling client, which makes it more + * likely that Envoy will handle the timeout instead of having the call canceled by the client. + * The offset will only be applied if the provided grpc_timeout is greater than the offset. This + * ensures that the offset will only ever decrease the timeout and never set it to 0 (meaning + * infinity). + */ + 'grpc_timeout_offset'?: (_google_protobuf_Duration); + /** + * Indicates that during forwarding, the host header will be swapped with the content of given + * downstream or :ref:`custom ` header. + * If header value is empty, host header is left intact. + * + * .. attention:: + * + * Pay attention to the potential security implications of using this option. Provided header + * must come from trusted source. + */ + 'auto_host_rewrite_header'?: (string); + /** + * Indicates that the route has request mirroring policies. + */ + 'request_mirror_policies'?: (_envoy_api_v2_route_RouteAction_RequestMirrorPolicy)[]; + /** + * An internal redirect is handled, iff the number of previous internal redirects that a + * downstream request has encountered is lower than this value, and + * :ref:`internal_redirect_action ` + * is set to :ref:`HANDLE_INTERNAL_REDIRECT + * ` + * In the case where a downstream request is bounced among multiple routes by internal redirect, + * the first route that hits this threshold, or has + * :ref:`internal_redirect_action ` + * set to + * :ref:`PASS_THROUGH_INTERNAL_REDIRECT + * ` + * will pass the redirect back to downstream. + * + * If not specified, at most one redirect will be followed. + */ + 'max_internal_redirects'?: (_google_protobuf_UInt32Value); + /** + * Indicates that during forwarding, portions of the path that match the + * pattern should be rewritten, even allowing the substitution of capture + * groups from the pattern into the new path as specified by the rewrite + * substitution string. This is useful to allow application paths to be + * rewritten in a way that is aware of segments with variable content like + * identifiers. The router filter will place the original path as it was + * before the rewrite into the :ref:`x-envoy-original-path + * ` header. + * + * Only one of :ref:`prefix_rewrite ` + * or *regex_rewrite* may be specified. + * + * Examples using Google's `RE2 `_ engine: + * + * * The path pattern ``^/service/([^/]+)(/.*)$`` paired with a substitution + * string of ``\2/instance/\1`` would transform ``/service/foo/v1/api`` + * into ``/v1/api/instance/foo``. + * + * * The pattern ``one`` paired with a substitution string of ``two`` would + * transform ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/two/zzz``. + * + * * The pattern ``^(.*?)one(.*)$`` paired with a substitution string of + * ``\1two\2`` would replace only the first occurrence of ``one``, + * transforming path ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/one/zzz``. + * + * * The pattern ``(?i)/xxx/`` paired with a substitution string of ``/yyy/`` + * would do a case-insensitive match and transform path ``/aaa/XxX/bbb`` to + * ``/aaa/yyy/bbb``. + */ + 'regex_rewrite'?: (_envoy_type_matcher_RegexMatchAndSubstitute); + /** + * [#not-implemented-hide:] + * Specifies the configuration for retry policy extension. Note that if this is set, it'll take + * precedence over the virtual host level retry policy entirely (e.g.: policies are not merged, + * most internal one becomes the enforced policy). :ref:`Retry policy ` + * should not be set if this field is used. + */ + 'retry_policy_typed_config'?: (_google_protobuf_Any); + 'cluster_specifier'?: "cluster"|"cluster_header"|"weighted_clusters"; + 'host_rewrite_specifier'?: "host_rewrite"|"auto_host_rewrite"|"auto_host_rewrite_header"; +} + +/** + * [#next-free-field: 34] + */ +export interface RouteAction__Output { + /** + * Indicates the upstream cluster to which the request should be routed + * to. + */ + 'cluster'?: (string); + /** + * Envoy will determine the cluster to route to by reading the value of the + * HTTP header named by cluster_header from the request headers. If the + * header is not found or the referenced cluster does not exist, Envoy will + * return a 404 response. + * + * .. attention:: + * + * Internally, Envoy always uses the HTTP/2 *:authority* header to represent the HTTP/1 + * *Host* header. Thus, if attempting to match on *Host*, match on *:authority* instead. + */ + 'cluster_header'?: (string); + /** + * Multiple upstream clusters can be specified for a given route. The + * request is routed to one of the upstream clusters based on weights + * assigned to each cluster. See + * :ref:`traffic splitting ` + * for additional documentation. + */ + 'weighted_clusters'?: (_envoy_api_v2_route_WeightedCluster__Output); + /** + * Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints + * in the upstream cluster with metadata matching what's set in this field will be considered + * for load balancing. If using :ref:`weighted_clusters + * `, metadata will be merged, with values + * provided there taking precedence. The filter name should be specified as *envoy.lb*. + */ + 'metadata_match'?: (_envoy_api_v2_core_Metadata__Output); + /** + * Indicates that during forwarding, the matched prefix (or path) should be + * swapped with this value. This option allows application URLs to be rooted + * at a different path from those exposed at the reverse proxy layer. The router filter will + * place the original path before rewrite into the :ref:`x-envoy-original-path + * ` header. + * + * Only one of *prefix_rewrite* or + * :ref:`regex_rewrite ` + * may be specified. + * + * .. attention:: + * + * Pay careful attention to the use of trailing slashes in the + * :ref:`route's match ` prefix value. + * Stripping a prefix from a path requires multiple Routes to handle all cases. For example, + * rewriting * /prefix* to * /* and * /prefix/etc* to * /etc* cannot be done in a single + * :ref:`Route `, as shown by the below config entries: + * + * .. code-block:: yaml + * + * - match: + * prefix: "/prefix/" + * route: + * prefix_rewrite: "/" + * - match: + * prefix: "/prefix" + * route: + * prefix_rewrite: "/" + * + * Having above entries in the config, requests to * /prefix* will be stripped to * /*, while + * requests to * /prefix/etc* will be stripped to * /etc*. + */ + 'prefix_rewrite': (string); + /** + * Indicates that during forwarding, the host header will be swapped with + * this value. + */ + 'host_rewrite'?: (string); + /** + * Indicates that during forwarding, the host header will be swapped with + * the hostname of the upstream host chosen by the cluster manager. This + * option is applicable only when the destination cluster for a route is of + * type *strict_dns* or *logical_dns*. Setting this to true with other cluster + * types has no effect. + */ + 'auto_host_rewrite'?: (_google_protobuf_BoolValue__Output); + /** + * Specifies the upstream timeout for the route. If not specified, the default is 15s. This + * spans between the point at which the entire downstream request (i.e. end-of-stream) has been + * processed and when the upstream response has been completely processed. A value of 0 will + * disable the route's timeout. + * + * .. note:: + * + * This timeout includes all retries. See also + * :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`, + * :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the + * :ref:`retry overview `. + */ + 'timeout'?: (_google_protobuf_Duration__Output); + /** + * Indicates that the route has a retry policy. Note that if this is set, + * it'll take precedence over the virtual host level retry policy entirely + * (e.g.: policies are not merged, most internal one becomes the enforced policy). + */ + 'retry_policy'?: (_envoy_api_v2_route_RetryPolicy__Output); + /** + * Indicates that the route has a request mirroring policy. + * + * .. attention:: + * This field has been deprecated in favor of `request_mirror_policies` which supports one or + * more mirroring policies. + */ + 'request_mirror_policy'?: (_envoy_api_v2_route_RouteAction_RequestMirrorPolicy__Output); + /** + * Optionally specifies the :ref:`routing priority `. + */ + 'priority': (keyof typeof _envoy_api_v2_core_RoutingPriority); + /** + * Specifies a set of rate limit configurations that could be applied to the + * route. + */ + 'rate_limits': (_envoy_api_v2_route_RateLimit__Output)[]; + /** + * Specifies if the rate limit filter should include the virtual host rate + * limits. By default, if the route configured rate limits, the virtual host + * :ref:`rate_limits ` are not applied to the + * request. + */ + 'include_vh_rate_limits'?: (_google_protobuf_BoolValue__Output); + /** + * Specifies a list of hash policies to use for ring hash load balancing. Each + * hash policy is evaluated individually and the combined result is used to + * route the request. The method of combination is deterministic such that + * identical lists of hash policies will produce the same hash. Since a hash + * policy examines specific parts of a request, it can fail to produce a hash + * (i.e. if the hashed header is not present). If (and only if) all configured + * hash policies fail to generate a hash, no hash will be produced for + * the route. In this case, the behavior is the same as if no hash policies + * were specified (i.e. the ring hash load balancer will choose a random + * backend). If a hash policy has the "terminal" attribute set to true, and + * there is already a hash generated, the hash is returned immediately, + * ignoring the rest of the hash policy list. + */ + 'hash_policy': (_envoy_api_v2_route_RouteAction_HashPolicy__Output)[]; + /** + * Indicates that the route has a CORS policy. + */ + 'cors'?: (_envoy_api_v2_route_CorsPolicy__Output); + /** + * The HTTP status code to use when configured cluster is not found. + * The default response code is 503 Service Unavailable. + */ + 'cluster_not_found_response_code': (keyof typeof _envoy_api_v2_route_RouteAction_ClusterNotFoundResponseCode); + /** + * If present, and the request is a gRPC request, use the + * `grpc-timeout header `_, + * or its default value (infinity) instead of + * :ref:`timeout `, but limit the applied timeout + * to the maximum value specified here. If configured as 0, the maximum allowed timeout for + * gRPC requests is infinity. If not configured at all, the `grpc-timeout` header is not used + * and gRPC requests time out like any other requests using + * :ref:`timeout ` or its default. + * This can be used to prevent unexpected upstream request timeouts due to potentially long + * time gaps between gRPC request and response in gRPC streaming mode. + * + * .. note:: + * + * If a timeout is specified using :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`, it takes + * precedence over `grpc-timeout header `_, when + * both are present. See also + * :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`, + * :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the + * :ref:`retry overview `. + */ + 'max_grpc_timeout'?: (_google_protobuf_Duration__Output); + /** + * Specifies the idle timeout for the route. If not specified, there is no per-route idle timeout, + * although the connection manager wide :ref:`stream_idle_timeout + * ` + * will still apply. A value of 0 will completely disable the route's idle timeout, even if a + * connection manager stream idle timeout is configured. + * + * The idle timeout is distinct to :ref:`timeout + * `, which provides an upper bound + * on the upstream response time; :ref:`idle_timeout + * ` instead bounds the amount + * of time the request's stream may be idle. + * + * After header decoding, the idle timeout will apply on downstream and + * upstream request events. Each time an encode/decode event for headers or + * data is processed for the stream, the timer will be reset. If the timeout + * fires, the stream is terminated with a 408 Request Timeout error code if no + * upstream response header has been received, otherwise a stream reset + * occurs. + */ + 'idle_timeout'?: (_google_protobuf_Duration__Output); + 'upgrade_configs': (_envoy_api_v2_route_RouteAction_UpgradeConfig__Output)[]; + 'internal_redirect_action': (keyof typeof _envoy_api_v2_route_RouteAction_InternalRedirectAction); + /** + * Indicates that the route has a hedge policy. Note that if this is set, + * it'll take precedence over the virtual host level hedge policy entirely + * (e.g.: policies are not merged, most internal one becomes the enforced policy). + */ + 'hedge_policy'?: (_envoy_api_v2_route_HedgePolicy__Output); + /** + * If present, Envoy will adjust the timeout provided by the `grpc-timeout` header by subtracting + * the provided duration from the header. This is useful in allowing Envoy to set its global + * timeout to be less than that of the deadline imposed by the calling client, which makes it more + * likely that Envoy will handle the timeout instead of having the call canceled by the client. + * The offset will only be applied if the provided grpc_timeout is greater than the offset. This + * ensures that the offset will only ever decrease the timeout and never set it to 0 (meaning + * infinity). + */ + 'grpc_timeout_offset'?: (_google_protobuf_Duration__Output); + /** + * Indicates that during forwarding, the host header will be swapped with the content of given + * downstream or :ref:`custom ` header. + * If header value is empty, host header is left intact. + * + * .. attention:: + * + * Pay attention to the potential security implications of using this option. Provided header + * must come from trusted source. + */ + 'auto_host_rewrite_header'?: (string); + /** + * Indicates that the route has request mirroring policies. + */ + 'request_mirror_policies': (_envoy_api_v2_route_RouteAction_RequestMirrorPolicy__Output)[]; + /** + * An internal redirect is handled, iff the number of previous internal redirects that a + * downstream request has encountered is lower than this value, and + * :ref:`internal_redirect_action ` + * is set to :ref:`HANDLE_INTERNAL_REDIRECT + * ` + * In the case where a downstream request is bounced among multiple routes by internal redirect, + * the first route that hits this threshold, or has + * :ref:`internal_redirect_action ` + * set to + * :ref:`PASS_THROUGH_INTERNAL_REDIRECT + * ` + * will pass the redirect back to downstream. + * + * If not specified, at most one redirect will be followed. + */ + 'max_internal_redirects'?: (_google_protobuf_UInt32Value__Output); + /** + * Indicates that during forwarding, portions of the path that match the + * pattern should be rewritten, even allowing the substitution of capture + * groups from the pattern into the new path as specified by the rewrite + * substitution string. This is useful to allow application paths to be + * rewritten in a way that is aware of segments with variable content like + * identifiers. The router filter will place the original path as it was + * before the rewrite into the :ref:`x-envoy-original-path + * ` header. + * + * Only one of :ref:`prefix_rewrite ` + * or *regex_rewrite* may be specified. + * + * Examples using Google's `RE2 `_ engine: + * + * * The path pattern ``^/service/([^/]+)(/.*)$`` paired with a substitution + * string of ``\2/instance/\1`` would transform ``/service/foo/v1/api`` + * into ``/v1/api/instance/foo``. + * + * * The pattern ``one`` paired with a substitution string of ``two`` would + * transform ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/two/zzz``. + * + * * The pattern ``^(.*?)one(.*)$`` paired with a substitution string of + * ``\1two\2`` would replace only the first occurrence of ``one``, + * transforming path ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/one/zzz``. + * + * * The pattern ``(?i)/xxx/`` paired with a substitution string of ``/yyy/`` + * would do a case-insensitive match and transform path ``/aaa/XxX/bbb`` to + * ``/aaa/yyy/bbb``. + */ + 'regex_rewrite'?: (_envoy_type_matcher_RegexMatchAndSubstitute__Output); + /** + * [#not-implemented-hide:] + * Specifies the configuration for retry policy extension. Note that if this is set, it'll take + * precedence over the virtual host level retry policy entirely (e.g.: policies are not merged, + * most internal one becomes the enforced policy). :ref:`Retry policy ` + * should not be set if this field is used. + */ + 'retry_policy_typed_config'?: (_google_protobuf_Any__Output); + 'cluster_specifier': "cluster"|"cluster_header"|"weighted_clusters"; + 'host_rewrite_specifier': "host_rewrite"|"auto_host_rewrite"|"auto_host_rewrite_header"; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/route/RouteMatch.ts b/packages/grpc-js/src/generated/envoy/api/v2/route/RouteMatch.ts new file mode 100644 index 000000000..b4af4adf2 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/route/RouteMatch.ts @@ -0,0 +1,247 @@ +// Original file: deps/envoy-api/envoy/api/v2/route/route_components.proto + +import { BoolValue as _google_protobuf_BoolValue, BoolValue__Output as _google_protobuf_BoolValue__Output } from '../../../../google/protobuf/BoolValue'; +import { HeaderMatcher as _envoy_api_v2_route_HeaderMatcher, HeaderMatcher__Output as _envoy_api_v2_route_HeaderMatcher__Output } from '../../../../envoy/api/v2/route/HeaderMatcher'; +import { QueryParameterMatcher as _envoy_api_v2_route_QueryParameterMatcher, QueryParameterMatcher__Output as _envoy_api_v2_route_QueryParameterMatcher__Output } from '../../../../envoy/api/v2/route/QueryParameterMatcher'; +import { RuntimeFractionalPercent as _envoy_api_v2_core_RuntimeFractionalPercent, RuntimeFractionalPercent__Output as _envoy_api_v2_core_RuntimeFractionalPercent__Output } from '../../../../envoy/api/v2/core/RuntimeFractionalPercent'; +import { RegexMatcher as _envoy_type_matcher_RegexMatcher, RegexMatcher__Output as _envoy_type_matcher_RegexMatcher__Output } from '../../../../envoy/type/matcher/RegexMatcher'; + +export interface _envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions { +} + +export interface _envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions__Output { +} + +export interface _envoy_api_v2_route_RouteMatch_TlsContextMatchOptions { + /** + * If specified, the route will match against whether or not a certificate is presented. + * If not specified, certificate presentation status (true or false) will not be considered when route matching. + */ + 'presented'?: (_google_protobuf_BoolValue); + /** + * If specified, the route will match against whether or not a certificate is validated. + * If not specified, certificate validation status (true or false) will not be considered when route matching. + */ + 'validated'?: (_google_protobuf_BoolValue); +} + +export interface _envoy_api_v2_route_RouteMatch_TlsContextMatchOptions__Output { + /** + * If specified, the route will match against whether or not a certificate is presented. + * If not specified, certificate presentation status (true or false) will not be considered when route matching. + */ + 'presented'?: (_google_protobuf_BoolValue__Output); + /** + * If specified, the route will match against whether or not a certificate is validated. + * If not specified, certificate validation status (true or false) will not be considered when route matching. + */ + 'validated'?: (_google_protobuf_BoolValue__Output); +} + +/** + * [#next-free-field: 12] + */ +export interface RouteMatch { + /** + * If specified, the route is a prefix rule meaning that the prefix must + * match the beginning of the *:path* header. + */ + 'prefix'?: (string); + /** + * If specified, the route is an exact path rule meaning that the path must + * exactly match the *:path* header once the query string is removed. + */ + 'path'?: (string); + /** + * If specified, the route is a regular expression rule meaning that the + * regex must match the *:path* header once the query string is removed. The entire path + * (without the query string) must match the regex. The rule will not match if only a + * subsequence of the *:path* header matches the regex. The regex grammar is defined `here + * `_. + * + * Examples: + * + * * The regex ``/b[io]t`` matches the path * /bit* + * * The regex ``/b[io]t`` matches the path * /bot* + * * The regex ``/b[io]t`` does not match the path * /bite* + * * The regex ``/b[io]t`` does not match the path * /bit/bot* + * + * .. attention:: + * This field has been deprecated in favor of `safe_regex` as it is not safe for use with + * untrusted input in all cases. + */ + 'regex'?: (string); + /** + * Indicates that prefix/path matching should be case insensitive. The default + * is true. + */ + 'case_sensitive'?: (_google_protobuf_BoolValue); + /** + * Specifies a set of headers that the route should match on. The router will + * check the request’s headers against all the specified headers in the route + * config. A match will happen if all the headers in the route are present in + * the request with the same values (or based on presence if the value field + * is not in the config). + */ + 'headers'?: (_envoy_api_v2_route_HeaderMatcher)[]; + /** + * Specifies a set of URL query parameters on which the route should + * match. The router will check the query string from the *path* header + * against all the specified query parameters. If the number of specified + * query parameters is nonzero, they all must match the *path* header's + * query string for a match to occur. + */ + 'query_parameters'?: (_envoy_api_v2_route_QueryParameterMatcher)[]; + /** + * If specified, only gRPC requests will be matched. The router will check + * that the content-type header has a application/grpc or one of the various + * application/grpc+ values. + */ + 'grpc'?: (_envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions); + /** + * Indicates that the route should additionally match on a runtime key. Every time the route + * is considered for a match, it must also fall under the percentage of matches indicated by + * this field. For some fraction N/D, a random number in the range [0,D) is selected. If the + * number is <= the value of the numerator N, or if the key is not present, the default + * value, the router continues to evaluate the remaining match criteria. A runtime_fraction + * route configuration can be used to roll out route changes in a gradual manner without full + * code/config deploys. Refer to the :ref:`traffic shifting + * ` docs for additional documentation. + * + * .. note:: + * + * Parsing this field is implemented such that the runtime key's data may be represented + * as a FractionalPercent proto represented as JSON/YAML and may also be represented as an + * integer with the assumption that the value is an integral percentage out of 100. For + * instance, a runtime key lookup returning the value "42" would parse as a FractionalPercent + * whose numerator is 42 and denominator is HUNDRED. This preserves legacy semantics. + */ + 'runtime_fraction'?: (_envoy_api_v2_core_RuntimeFractionalPercent); + /** + * If specified, the route is a regular expression rule meaning that the + * regex must match the *:path* header once the query string is removed. The entire path + * (without the query string) must match the regex. The rule will not match if only a + * subsequence of the *:path* header matches the regex. + * + * [#next-major-version: In the v3 API we should redo how path specification works such + * that we utilize StringMatcher, and additionally have consistent options around whether we + * strip query strings, do a case sensitive match, etc. In the interim it will be too disruptive + * to deprecate the existing options. We should even consider whether we want to do away with + * path_specifier entirely and just rely on a set of header matchers which can already match + * on :path, etc. The issue with that is it is unclear how to generically deal with query string + * stripping. This needs more thought.] + */ + 'safe_regex'?: (_envoy_type_matcher_RegexMatcher); + /** + * If specified, the client tls context will be matched against the defined + * match options. + * + * [#next-major-version: unify with RBAC] + */ + 'tls_context'?: (_envoy_api_v2_route_RouteMatch_TlsContextMatchOptions); + 'path_specifier'?: "prefix"|"path"|"regex"|"safe_regex"; +} + +/** + * [#next-free-field: 12] + */ +export interface RouteMatch__Output { + /** + * If specified, the route is a prefix rule meaning that the prefix must + * match the beginning of the *:path* header. + */ + 'prefix'?: (string); + /** + * If specified, the route is an exact path rule meaning that the path must + * exactly match the *:path* header once the query string is removed. + */ + 'path'?: (string); + /** + * If specified, the route is a regular expression rule meaning that the + * regex must match the *:path* header once the query string is removed. The entire path + * (without the query string) must match the regex. The rule will not match if only a + * subsequence of the *:path* header matches the regex. The regex grammar is defined `here + * `_. + * + * Examples: + * + * * The regex ``/b[io]t`` matches the path * /bit* + * * The regex ``/b[io]t`` matches the path * /bot* + * * The regex ``/b[io]t`` does not match the path * /bite* + * * The regex ``/b[io]t`` does not match the path * /bit/bot* + * + * .. attention:: + * This field has been deprecated in favor of `safe_regex` as it is not safe for use with + * untrusted input in all cases. + */ + 'regex'?: (string); + /** + * Indicates that prefix/path matching should be case insensitive. The default + * is true. + */ + 'case_sensitive'?: (_google_protobuf_BoolValue__Output); + /** + * Specifies a set of headers that the route should match on. The router will + * check the request’s headers against all the specified headers in the route + * config. A match will happen if all the headers in the route are present in + * the request with the same values (or based on presence if the value field + * is not in the config). + */ + 'headers': (_envoy_api_v2_route_HeaderMatcher__Output)[]; + /** + * Specifies a set of URL query parameters on which the route should + * match. The router will check the query string from the *path* header + * against all the specified query parameters. If the number of specified + * query parameters is nonzero, they all must match the *path* header's + * query string for a match to occur. + */ + 'query_parameters': (_envoy_api_v2_route_QueryParameterMatcher__Output)[]; + /** + * If specified, only gRPC requests will be matched. The router will check + * that the content-type header has a application/grpc or one of the various + * application/grpc+ values. + */ + 'grpc'?: (_envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions__Output); + /** + * Indicates that the route should additionally match on a runtime key. Every time the route + * is considered for a match, it must also fall under the percentage of matches indicated by + * this field. For some fraction N/D, a random number in the range [0,D) is selected. If the + * number is <= the value of the numerator N, or if the key is not present, the default + * value, the router continues to evaluate the remaining match criteria. A runtime_fraction + * route configuration can be used to roll out route changes in a gradual manner without full + * code/config deploys. Refer to the :ref:`traffic shifting + * ` docs for additional documentation. + * + * .. note:: + * + * Parsing this field is implemented such that the runtime key's data may be represented + * as a FractionalPercent proto represented as JSON/YAML and may also be represented as an + * integer with the assumption that the value is an integral percentage out of 100. For + * instance, a runtime key lookup returning the value "42" would parse as a FractionalPercent + * whose numerator is 42 and denominator is HUNDRED. This preserves legacy semantics. + */ + 'runtime_fraction'?: (_envoy_api_v2_core_RuntimeFractionalPercent__Output); + /** + * If specified, the route is a regular expression rule meaning that the + * regex must match the *:path* header once the query string is removed. The entire path + * (without the query string) must match the regex. The rule will not match if only a + * subsequence of the *:path* header matches the regex. + * + * [#next-major-version: In the v3 API we should redo how path specification works such + * that we utilize StringMatcher, and additionally have consistent options around whether we + * strip query strings, do a case sensitive match, etc. In the interim it will be too disruptive + * to deprecate the existing options. We should even consider whether we want to do away with + * path_specifier entirely and just rely on a set of header matchers which can already match + * on :path, etc. The issue with that is it is unclear how to generically deal with query string + * stripping. This needs more thought.] + */ + 'safe_regex'?: (_envoy_type_matcher_RegexMatcher__Output); + /** + * If specified, the client tls context will be matched against the defined + * match options. + * + * [#next-major-version: unify with RBAC] + */ + 'tls_context'?: (_envoy_api_v2_route_RouteMatch_TlsContextMatchOptions__Output); + 'path_specifier': "prefix"|"path"|"regex"|"safe_regex"; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/route/Tracing.ts b/packages/grpc-js/src/generated/envoy/api/v2/route/Tracing.ts new file mode 100644 index 000000000..d60486314 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/route/Tracing.ts @@ -0,0 +1,84 @@ +// Original file: deps/envoy-api/envoy/api/v2/route/route_components.proto + +import { FractionalPercent as _envoy_type_FractionalPercent, FractionalPercent__Output as _envoy_type_FractionalPercent__Output } from '../../../../envoy/type/FractionalPercent'; +import { CustomTag as _envoy_type_tracing_v2_CustomTag, CustomTag__Output as _envoy_type_tracing_v2_CustomTag__Output } from '../../../../envoy/type/tracing/v2/CustomTag'; + +export interface Tracing { + /** + * Target percentage of requests managed by this HTTP connection manager that will be force + * traced if the :ref:`x-client-trace-id ` + * header is set. This field is a direct analog for the runtime variable + * 'tracing.client_sampling' in the :ref:`HTTP Connection Manager + * `. + * Default: 100% + */ + 'client_sampling'?: (_envoy_type_FractionalPercent); + /** + * Target percentage of requests managed by this HTTP connection manager that will be randomly + * selected for trace generation, if not requested by the client or not forced. This field is + * a direct analog for the runtime variable 'tracing.random_sampling' in the + * :ref:`HTTP Connection Manager `. + * Default: 100% + */ + 'random_sampling'?: (_envoy_type_FractionalPercent); + /** + * Target percentage of requests managed by this HTTP connection manager that will be traced + * after all other sampling checks have been applied (client-directed, force tracing, random + * sampling). This field functions as an upper limit on the total configured sampling rate. For + * instance, setting client_sampling to 100% but overall_sampling to 1% will result in only 1% + * of client requests with the appropriate headers to be force traced. This field is a direct + * analog for the runtime variable 'tracing.global_enabled' in the + * :ref:`HTTP Connection Manager `. + * Default: 100% + */ + 'overall_sampling'?: (_envoy_type_FractionalPercent); + /** + * A list of custom tags with unique tag name to create tags for the active span. + * It will take effect after merging with the :ref:`corresponding configuration + * ` + * configured in the HTTP connection manager. If two tags with the same name are configured + * each in the HTTP connection manager and the route level, the one configured here takes + * priority. + */ + 'custom_tags'?: (_envoy_type_tracing_v2_CustomTag)[]; +} + +export interface Tracing__Output { + /** + * Target percentage of requests managed by this HTTP connection manager that will be force + * traced if the :ref:`x-client-trace-id ` + * header is set. This field is a direct analog for the runtime variable + * 'tracing.client_sampling' in the :ref:`HTTP Connection Manager + * `. + * Default: 100% + */ + 'client_sampling'?: (_envoy_type_FractionalPercent__Output); + /** + * Target percentage of requests managed by this HTTP connection manager that will be randomly + * selected for trace generation, if not requested by the client or not forced. This field is + * a direct analog for the runtime variable 'tracing.random_sampling' in the + * :ref:`HTTP Connection Manager `. + * Default: 100% + */ + 'random_sampling'?: (_envoy_type_FractionalPercent__Output); + /** + * Target percentage of requests managed by this HTTP connection manager that will be traced + * after all other sampling checks have been applied (client-directed, force tracing, random + * sampling). This field functions as an upper limit on the total configured sampling rate. For + * instance, setting client_sampling to 100% but overall_sampling to 1% will result in only 1% + * of client requests with the appropriate headers to be force traced. This field is a direct + * analog for the runtime variable 'tracing.global_enabled' in the + * :ref:`HTTP Connection Manager `. + * Default: 100% + */ + 'overall_sampling'?: (_envoy_type_FractionalPercent__Output); + /** + * A list of custom tags with unique tag name to create tags for the active span. + * It will take effect after merging with the :ref:`corresponding configuration + * ` + * configured in the HTTP connection manager. If two tags with the same name are configured + * each in the HTTP connection manager and the route level, the one configured here takes + * priority. + */ + 'custom_tags': (_envoy_type_tracing_v2_CustomTag__Output)[]; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/route/VirtualCluster.ts b/packages/grpc-js/src/generated/envoy/api/v2/route/VirtualCluster.ts new file mode 100644 index 000000000..fb62d9a51 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/route/VirtualCluster.ts @@ -0,0 +1,120 @@ +// Original file: deps/envoy-api/envoy/api/v2/route/route_components.proto + +import { RequestMethod as _envoy_api_v2_core_RequestMethod } from '../../../../envoy/api/v2/core/RequestMethod'; +import { HeaderMatcher as _envoy_api_v2_route_HeaderMatcher, HeaderMatcher__Output as _envoy_api_v2_route_HeaderMatcher__Output } from '../../../../envoy/api/v2/route/HeaderMatcher'; + +/** + * A virtual cluster is a way of specifying a regex matching rule against + * certain important endpoints such that statistics are generated explicitly for + * the matched requests. The reason this is useful is that when doing + * prefix/path matching Envoy does not always know what the application + * considers to be an endpoint. Thus, it’s impossible for Envoy to generically + * emit per endpoint statistics. However, often systems have highly critical + * endpoints that they wish to get “perfect” statistics on. Virtual cluster + * statistics are perfect in the sense that they are emitted on the downstream + * side such that they include network level failures. + * + * Documentation for :ref:`virtual cluster statistics `. + * + * .. note:: + * + * Virtual clusters are a useful tool, but we do not recommend setting up a virtual cluster for + * every application endpoint. This is both not easily maintainable and as well the matching and + * statistics output are not free. + */ +export interface VirtualCluster { + /** + * Specifies a regex pattern to use for matching requests. The entire path of the request + * must match the regex. The regex grammar used is defined `here + * `_. + * + * Examples: + * + * * The regex ``/rides/\d+`` matches the path * /rides/0* + * * The regex ``/rides/\d+`` matches the path * /rides/123* + * * The regex ``/rides/\d+`` does not match the path * /rides/123/456* + * + * .. attention:: + * This field has been deprecated in favor of `headers` as it is not safe for use with + * untrusted input in all cases. + */ + 'pattern'?: (string); + /** + * Specifies the name of the virtual cluster. The virtual cluster name as well + * as the virtual host name are used when emitting statistics. The statistics are emitted by the + * router filter and are documented :ref:`here `. + */ + 'name'?: (string); + /** + * Optionally specifies the HTTP method to match on. For example GET, PUT, + * etc. + * + * .. attention:: + * This field has been deprecated in favor of `headers`. + */ + 'method'?: (_envoy_api_v2_core_RequestMethod | keyof typeof _envoy_api_v2_core_RequestMethod); + /** + * Specifies a list of header matchers to use for matching requests. Each specified header must + * match. The pseudo-headers `:path` and `:method` can be used to match the request path and + * method, respectively. + */ + 'headers'?: (_envoy_api_v2_route_HeaderMatcher)[]; +} + +/** + * A virtual cluster is a way of specifying a regex matching rule against + * certain important endpoints such that statistics are generated explicitly for + * the matched requests. The reason this is useful is that when doing + * prefix/path matching Envoy does not always know what the application + * considers to be an endpoint. Thus, it’s impossible for Envoy to generically + * emit per endpoint statistics. However, often systems have highly critical + * endpoints that they wish to get “perfect” statistics on. Virtual cluster + * statistics are perfect in the sense that they are emitted on the downstream + * side such that they include network level failures. + * + * Documentation for :ref:`virtual cluster statistics `. + * + * .. note:: + * + * Virtual clusters are a useful tool, but we do not recommend setting up a virtual cluster for + * every application endpoint. This is both not easily maintainable and as well the matching and + * statistics output are not free. + */ +export interface VirtualCluster__Output { + /** + * Specifies a regex pattern to use for matching requests. The entire path of the request + * must match the regex. The regex grammar used is defined `here + * `_. + * + * Examples: + * + * * The regex ``/rides/\d+`` matches the path * /rides/0* + * * The regex ``/rides/\d+`` matches the path * /rides/123* + * * The regex ``/rides/\d+`` does not match the path * /rides/123/456* + * + * .. attention:: + * This field has been deprecated in favor of `headers` as it is not safe for use with + * untrusted input in all cases. + */ + 'pattern': (string); + /** + * Specifies the name of the virtual cluster. The virtual cluster name as well + * as the virtual host name are used when emitting statistics. The statistics are emitted by the + * router filter and are documented :ref:`here `. + */ + 'name': (string); + /** + * Optionally specifies the HTTP method to match on. For example GET, PUT, + * etc. + * + * .. attention:: + * This field has been deprecated in favor of `headers`. + */ + 'method': (keyof typeof _envoy_api_v2_core_RequestMethod); + /** + * Specifies a list of header matchers to use for matching requests. Each specified header must + * match. The pseudo-headers `:path` and `:method` can be used to match the request path and + * method, respectively. + */ + 'headers': (_envoy_api_v2_route_HeaderMatcher__Output)[]; +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/route/VirtualHost.ts b/packages/grpc-js/src/generated/envoy/api/v2/route/VirtualHost.ts new file mode 100644 index 000000000..5c8c6cfa6 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/route/VirtualHost.ts @@ -0,0 +1,341 @@ +// Original file: deps/envoy-api/envoy/api/v2/route/route_components.proto + +import { Route as _envoy_api_v2_route_Route, Route__Output as _envoy_api_v2_route_Route__Output } from '../../../../envoy/api/v2/route/Route'; +import { VirtualCluster as _envoy_api_v2_route_VirtualCluster, VirtualCluster__Output as _envoy_api_v2_route_VirtualCluster__Output } from '../../../../envoy/api/v2/route/VirtualCluster'; +import { RateLimit as _envoy_api_v2_route_RateLimit, RateLimit__Output as _envoy_api_v2_route_RateLimit__Output } from '../../../../envoy/api/v2/route/RateLimit'; +import { HeaderValueOption as _envoy_api_v2_core_HeaderValueOption, HeaderValueOption__Output as _envoy_api_v2_core_HeaderValueOption__Output } from '../../../../envoy/api/v2/core/HeaderValueOption'; +import { CorsPolicy as _envoy_api_v2_route_CorsPolicy, CorsPolicy__Output as _envoy_api_v2_route_CorsPolicy__Output } from '../../../../envoy/api/v2/route/CorsPolicy'; +import { Struct as _google_protobuf_Struct, Struct__Output as _google_protobuf_Struct__Output } from '../../../../google/protobuf/Struct'; +import { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../../google/protobuf/Any'; +import { RetryPolicy as _envoy_api_v2_route_RetryPolicy, RetryPolicy__Output as _envoy_api_v2_route_RetryPolicy__Output } from '../../../../envoy/api/v2/route/RetryPolicy'; +import { HedgePolicy as _envoy_api_v2_route_HedgePolicy, HedgePolicy__Output as _envoy_api_v2_route_HedgePolicy__Output } from '../../../../envoy/api/v2/route/HedgePolicy'; +import { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output as _google_protobuf_UInt32Value__Output } from '../../../../google/protobuf/UInt32Value'; + +// Original file: deps/envoy-api/envoy/api/v2/route/route_components.proto + +export enum _envoy_api_v2_route_VirtualHost_TlsRequirementType { + /** + * No TLS requirement for the virtual host. + */ + NONE = 0, + /** + * External requests must use TLS. If a request is external and it is not + * using TLS, a 301 redirect will be sent telling the client to use HTTPS. + */ + EXTERNAL_ONLY = 1, + /** + * All requests must use TLS. If a request is not using TLS, a 301 redirect + * will be sent telling the client to use HTTPS. + */ + ALL = 2, +} + +/** + * The top level element in the routing configuration is a virtual host. Each virtual host has + * a logical name as well as a set of domains that get routed to it based on the incoming request's + * host header. This allows a single listener to service multiple top level domain path trees. Once + * a virtual host is selected based on the domain, the routes are processed in order to see which + * upstream cluster to route to or whether to perform a redirect. + * [#next-free-field: 21] + */ +export interface VirtualHost { + /** + * The logical name of the virtual host. This is used when emitting certain + * statistics but is not relevant for routing. + */ + 'name'?: (string); + /** + * A list of domains (host/authority header) that will be matched to this + * virtual host. Wildcard hosts are supported in the suffix or prefix form. + * + * Domain search order: + * 1. Exact domain names: ``www.foo.com``. + * 2. Suffix domain wildcards: ``*.foo.com`` or ``*-bar.foo.com``. + * 3. Prefix domain wildcards: ``foo.*`` or ``foo-*``. + * 4. Special wildcard ``*`` matching any domain. + * + * .. note:: + * + * The wildcard will not match the empty string. + * e.g. ``*-bar.foo.com`` will match ``baz-bar.foo.com`` but not ``-bar.foo.com``. + * The longest wildcards match first. + * Only a single virtual host in the entire route configuration can match on ``*``. A domain + * must be unique across all virtual hosts or the config will fail to load. + * + * Domains cannot contain control characters. This is validated by the well_known_regex HTTP_HEADER_VALUE. + */ + 'domains'?: (string)[]; + /** + * The list of routes that will be matched, in order, for incoming requests. + * The first route that matches will be used. + */ + 'routes'?: (_envoy_api_v2_route_Route)[]; + /** + * Specifies the type of TLS enforcement the virtual host expects. If this option is not + * specified, there is no TLS requirement for the virtual host. + */ + 'require_tls'?: (_envoy_api_v2_route_VirtualHost_TlsRequirementType | keyof typeof _envoy_api_v2_route_VirtualHost_TlsRequirementType); + /** + * A list of virtual clusters defined for this virtual host. Virtual clusters + * are used for additional statistics gathering. + */ + 'virtual_clusters'?: (_envoy_api_v2_route_VirtualCluster)[]; + /** + * Specifies a set of rate limit configurations that will be applied to the + * virtual host. + */ + 'rate_limits'?: (_envoy_api_v2_route_RateLimit)[]; + /** + * Specifies a list of HTTP headers that should be added to each request + * handled by this virtual host. Headers specified at this level are applied + * after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the + * enclosing :ref:`envoy_api_msg_RouteConfiguration`. For more information, including + * details on header value syntax, see the documentation on :ref:`custom request headers + * `. + */ + 'request_headers_to_add'?: (_envoy_api_v2_core_HeaderValueOption)[]; + /** + * Indicates that the virtual host has a CORS policy. + */ + 'cors'?: (_envoy_api_v2_route_CorsPolicy); + /** + * Specifies a list of HTTP headers that should be added to each response + * handled by this virtual host. Headers specified at this level are applied + * after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the + * enclosing :ref:`envoy_api_msg_RouteConfiguration`. For more information, including + * details on header value syntax, see the documentation on :ref:`custom request headers + * `. + */ + 'response_headers_to_add'?: (_envoy_api_v2_core_HeaderValueOption)[]; + /** + * Specifies a list of HTTP headers that should be removed from each response + * handled by this virtual host. + */ + 'response_headers_to_remove'?: (string)[]; + /** + * The per_filter_config field can be used to provide virtual host-specific + * configurations for filters. The key should match the filter name, such as + * *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter + * specific; see the :ref:`HTTP filter documentation ` + * for if and how it is utilized. + */ + 'per_filter_config'?: ({[key: string]: _google_protobuf_Struct}); + /** + * Specifies a list of HTTP headers that should be removed from each request + * handled by this virtual host. + */ + 'request_headers_to_remove'?: (string)[]; + /** + * Decides whether the :ref:`x-envoy-attempt-count + * ` header should be included + * in the upstream request. Setting this option will cause it to override any existing header + * value, so in the case of two Envoys on the request path with this option enabled, the upstream + * will see the attempt count as perceived by the second Envoy. Defaults to false. + * This header is unaffected by the + * :ref:`suppress_envoy_headers + * ` flag. + * + * [#next-major-version: rename to include_attempt_count_in_request.] + */ + 'include_request_attempt_count'?: (boolean); + /** + * The per_filter_config field can be used to provide virtual host-specific + * configurations for filters. The key should match the filter name, such as + * *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter + * specific; see the :ref:`HTTP filter documentation ` + * for if and how it is utilized. + */ + 'typed_per_filter_config'?: ({[key: string]: _google_protobuf_Any}); + /** + * Indicates the retry policy for all routes in this virtual host. Note that setting a + * route level entry will take precedence over this config and it'll be treated + * independently (e.g.: values are not inherited). + */ + 'retry_policy'?: (_envoy_api_v2_route_RetryPolicy); + /** + * Indicates the hedge policy for all routes in this virtual host. Note that setting a + * route level entry will take precedence over this config and it'll be treated + * independently (e.g.: values are not inherited). + */ + 'hedge_policy'?: (_envoy_api_v2_route_HedgePolicy); + /** + * The maximum bytes which will be buffered for retries and shadowing. + * If set and a route-specific limit is not set, the bytes actually buffered will be the minimum + * value of this and the listener per_connection_buffer_limit_bytes. + */ + 'per_request_buffer_limit_bytes'?: (_google_protobuf_UInt32Value); + /** + * Decides whether the :ref:`x-envoy-attempt-count + * ` header should be included + * in the downstream response. Setting this option will cause the router to override any existing header + * value, so in the case of two Envoys on the request path with this option enabled, the downstream + * will see the attempt count as perceived by the Envoy closest upstream from itself. Defaults to false. + * This header is unaffected by the + * :ref:`suppress_envoy_headers + * ` flag. + */ + 'include_attempt_count_in_response'?: (boolean); + /** + * [#not-implemented-hide:] + * Specifies the configuration for retry policy extension. Note that setting a route level entry + * will take precedence over this config and it'll be treated independently (e.g.: values are not + * inherited). :ref:`Retry policy ` should not be + * set if this field is used. + */ + 'retry_policy_typed_config'?: (_google_protobuf_Any); +} + +/** + * The top level element in the routing configuration is a virtual host. Each virtual host has + * a logical name as well as a set of domains that get routed to it based on the incoming request's + * host header. This allows a single listener to service multiple top level domain path trees. Once + * a virtual host is selected based on the domain, the routes are processed in order to see which + * upstream cluster to route to or whether to perform a redirect. + * [#next-free-field: 21] + */ +export interface VirtualHost__Output { + /** + * The logical name of the virtual host. This is used when emitting certain + * statistics but is not relevant for routing. + */ + 'name': (string); + /** + * A list of domains (host/authority header) that will be matched to this + * virtual host. Wildcard hosts are supported in the suffix or prefix form. + * + * Domain search order: + * 1. Exact domain names: ``www.foo.com``. + * 2. Suffix domain wildcards: ``*.foo.com`` or ``*-bar.foo.com``. + * 3. Prefix domain wildcards: ``foo.*`` or ``foo-*``. + * 4. Special wildcard ``*`` matching any domain. + * + * .. note:: + * + * The wildcard will not match the empty string. + * e.g. ``*-bar.foo.com`` will match ``baz-bar.foo.com`` but not ``-bar.foo.com``. + * The longest wildcards match first. + * Only a single virtual host in the entire route configuration can match on ``*``. A domain + * must be unique across all virtual hosts or the config will fail to load. + * + * Domains cannot contain control characters. This is validated by the well_known_regex HTTP_HEADER_VALUE. + */ + 'domains': (string)[]; + /** + * The list of routes that will be matched, in order, for incoming requests. + * The first route that matches will be used. + */ + 'routes': (_envoy_api_v2_route_Route__Output)[]; + /** + * Specifies the type of TLS enforcement the virtual host expects. If this option is not + * specified, there is no TLS requirement for the virtual host. + */ + 'require_tls': (keyof typeof _envoy_api_v2_route_VirtualHost_TlsRequirementType); + /** + * A list of virtual clusters defined for this virtual host. Virtual clusters + * are used for additional statistics gathering. + */ + 'virtual_clusters': (_envoy_api_v2_route_VirtualCluster__Output)[]; + /** + * Specifies a set of rate limit configurations that will be applied to the + * virtual host. + */ + 'rate_limits': (_envoy_api_v2_route_RateLimit__Output)[]; + /** + * Specifies a list of HTTP headers that should be added to each request + * handled by this virtual host. Headers specified at this level are applied + * after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the + * enclosing :ref:`envoy_api_msg_RouteConfiguration`. For more information, including + * details on header value syntax, see the documentation on :ref:`custom request headers + * `. + */ + 'request_headers_to_add': (_envoy_api_v2_core_HeaderValueOption__Output)[]; + /** + * Indicates that the virtual host has a CORS policy. + */ + 'cors'?: (_envoy_api_v2_route_CorsPolicy__Output); + /** + * Specifies a list of HTTP headers that should be added to each response + * handled by this virtual host. Headers specified at this level are applied + * after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the + * enclosing :ref:`envoy_api_msg_RouteConfiguration`. For more information, including + * details on header value syntax, see the documentation on :ref:`custom request headers + * `. + */ + 'response_headers_to_add': (_envoy_api_v2_core_HeaderValueOption__Output)[]; + /** + * Specifies a list of HTTP headers that should be removed from each response + * handled by this virtual host. + */ + 'response_headers_to_remove': (string)[]; + /** + * The per_filter_config field can be used to provide virtual host-specific + * configurations for filters. The key should match the filter name, such as + * *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter + * specific; see the :ref:`HTTP filter documentation ` + * for if and how it is utilized. + */ + 'per_filter_config'?: ({[key: string]: _google_protobuf_Struct__Output}); + /** + * Specifies a list of HTTP headers that should be removed from each request + * handled by this virtual host. + */ + 'request_headers_to_remove': (string)[]; + /** + * Decides whether the :ref:`x-envoy-attempt-count + * ` header should be included + * in the upstream request. Setting this option will cause it to override any existing header + * value, so in the case of two Envoys on the request path with this option enabled, the upstream + * will see the attempt count as perceived by the second Envoy. Defaults to false. + * This header is unaffected by the + * :ref:`suppress_envoy_headers + * ` flag. + * + * [#next-major-version: rename to include_attempt_count_in_request.] + */ + 'include_request_attempt_count': (boolean); + /** + * The per_filter_config field can be used to provide virtual host-specific + * configurations for filters. The key should match the filter name, such as + * *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter + * specific; see the :ref:`HTTP filter documentation ` + * for if and how it is utilized. + */ + 'typed_per_filter_config'?: ({[key: string]: _google_protobuf_Any__Output}); + /** + * Indicates the retry policy for all routes in this virtual host. Note that setting a + * route level entry will take precedence over this config and it'll be treated + * independently (e.g.: values are not inherited). + */ + 'retry_policy'?: (_envoy_api_v2_route_RetryPolicy__Output); + /** + * Indicates the hedge policy for all routes in this virtual host. Note that setting a + * route level entry will take precedence over this config and it'll be treated + * independently (e.g.: values are not inherited). + */ + 'hedge_policy'?: (_envoy_api_v2_route_HedgePolicy__Output); + /** + * The maximum bytes which will be buffered for retries and shadowing. + * If set and a route-specific limit is not set, the bytes actually buffered will be the minimum + * value of this and the listener per_connection_buffer_limit_bytes. + */ + 'per_request_buffer_limit_bytes'?: (_google_protobuf_UInt32Value__Output); + /** + * Decides whether the :ref:`x-envoy-attempt-count + * ` header should be included + * in the downstream response. Setting this option will cause the router to override any existing header + * value, so in the case of two Envoys on the request path with this option enabled, the downstream + * will see the attempt count as perceived by the Envoy closest upstream from itself. Defaults to false. + * This header is unaffected by the + * :ref:`suppress_envoy_headers + * ` flag. + */ + 'include_attempt_count_in_response': (boolean); + /** + * [#not-implemented-hide:] + * Specifies the configuration for retry policy extension. Note that setting a route level entry + * will take precedence over this config and it'll be treated independently (e.g.: values are not + * inherited). :ref:`Retry policy ` should not be + * set if this field is used. + */ + 'retry_policy_typed_config'?: (_google_protobuf_Any__Output); +} diff --git a/packages/grpc-js/src/generated/envoy/api/v2/route/WeightedCluster.ts b/packages/grpc-js/src/generated/envoy/api/v2/route/WeightedCluster.ts new file mode 100644 index 000000000..512c06b4d --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/api/v2/route/WeightedCluster.ts @@ -0,0 +1,213 @@ +// Original file: deps/envoy-api/envoy/api/v2/route/route_components.proto + +import { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output as _google_protobuf_UInt32Value__Output } from '../../../../google/protobuf/UInt32Value'; +import { Metadata as _envoy_api_v2_core_Metadata, Metadata__Output as _envoy_api_v2_core_Metadata__Output } from '../../../../envoy/api/v2/core/Metadata'; +import { HeaderValueOption as _envoy_api_v2_core_HeaderValueOption, HeaderValueOption__Output as _envoy_api_v2_core_HeaderValueOption__Output } from '../../../../envoy/api/v2/core/HeaderValueOption'; +import { Struct as _google_protobuf_Struct, Struct__Output as _google_protobuf_Struct__Output } from '../../../../google/protobuf/Struct'; +import { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../../google/protobuf/Any'; + +/** + * [#next-free-field: 11] + */ +export interface _envoy_api_v2_route_WeightedCluster_ClusterWeight { + /** + * Name of the upstream cluster. The cluster must exist in the + * :ref:`cluster manager configuration `. + */ + 'name'?: (string); + /** + * An integer between 0 and :ref:`total_weight + * `. When a request matches the route, + * the choice of an upstream cluster is determined by its weight. The sum of weights across all + * entries in the clusters array must add up to the total_weight, which defaults to 100. + */ + 'weight'?: (_google_protobuf_UInt32Value); + /** + * Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in + * the upstream cluster with metadata matching what is set in this field will be considered for + * load balancing. Note that this will be merged with what's provided in + * :ref:`RouteAction.metadata_match `, with + * values here taking precedence. The filter name should be specified as *envoy.lb*. + */ + 'metadata_match'?: (_envoy_api_v2_core_Metadata); + /** + * Specifies a list of headers to be added to requests when this cluster is selected + * through the enclosing :ref:`envoy_api_msg_route.RouteAction`. + * Headers specified at this level are applied before headers from the enclosing + * :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and + * :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on + * header value syntax, see the documentation on :ref:`custom request headers + * `. + */ + 'request_headers_to_add'?: (_envoy_api_v2_core_HeaderValueOption)[]; + /** + * Specifies a list of HTTP headers that should be removed from each request when + * this cluster is selected through the enclosing :ref:`envoy_api_msg_route.RouteAction`. + */ + 'request_headers_to_remove'?: (string)[]; + /** + * Specifies a list of headers to be added to responses when this cluster is selected + * through the enclosing :ref:`envoy_api_msg_route.RouteAction`. + * Headers specified at this level are applied before headers from the enclosing + * :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and + * :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on + * header value syntax, see the documentation on :ref:`custom request headers + * `. + */ + 'response_headers_to_add'?: (_envoy_api_v2_core_HeaderValueOption)[]; + /** + * Specifies a list of headers to be removed from responses when this cluster is selected + * through the enclosing :ref:`envoy_api_msg_route.RouteAction`. + */ + 'response_headers_to_remove'?: (string)[]; + /** + * The per_filter_config field can be used to provide weighted cluster-specific + * configurations for filters. The key should match the filter name, such as + * *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter + * specific; see the :ref:`HTTP filter documentation ` + * for if and how it is utilized. + */ + 'per_filter_config'?: ({[key: string]: _google_protobuf_Struct}); + /** + * The per_filter_config field can be used to provide weighted cluster-specific + * configurations for filters. The key should match the filter name, such as + * *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter + * specific; see the :ref:`HTTP filter documentation ` + * for if and how it is utilized. + */ + 'typed_per_filter_config'?: ({[key: string]: _google_protobuf_Any}); +} + +/** + * [#next-free-field: 11] + */ +export interface _envoy_api_v2_route_WeightedCluster_ClusterWeight__Output { + /** + * Name of the upstream cluster. The cluster must exist in the + * :ref:`cluster manager configuration `. + */ + 'name': (string); + /** + * An integer between 0 and :ref:`total_weight + * `. When a request matches the route, + * the choice of an upstream cluster is determined by its weight. The sum of weights across all + * entries in the clusters array must add up to the total_weight, which defaults to 100. + */ + 'weight'?: (_google_protobuf_UInt32Value__Output); + /** + * Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in + * the upstream cluster with metadata matching what is set in this field will be considered for + * load balancing. Note that this will be merged with what's provided in + * :ref:`RouteAction.metadata_match `, with + * values here taking precedence. The filter name should be specified as *envoy.lb*. + */ + 'metadata_match'?: (_envoy_api_v2_core_Metadata__Output); + /** + * Specifies a list of headers to be added to requests when this cluster is selected + * through the enclosing :ref:`envoy_api_msg_route.RouteAction`. + * Headers specified at this level are applied before headers from the enclosing + * :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and + * :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on + * header value syntax, see the documentation on :ref:`custom request headers + * `. + */ + 'request_headers_to_add': (_envoy_api_v2_core_HeaderValueOption__Output)[]; + /** + * Specifies a list of HTTP headers that should be removed from each request when + * this cluster is selected through the enclosing :ref:`envoy_api_msg_route.RouteAction`. + */ + 'request_headers_to_remove': (string)[]; + /** + * Specifies a list of headers to be added to responses when this cluster is selected + * through the enclosing :ref:`envoy_api_msg_route.RouteAction`. + * Headers specified at this level are applied before headers from the enclosing + * :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and + * :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on + * header value syntax, see the documentation on :ref:`custom request headers + * `. + */ + 'response_headers_to_add': (_envoy_api_v2_core_HeaderValueOption__Output)[]; + /** + * Specifies a list of headers to be removed from responses when this cluster is selected + * through the enclosing :ref:`envoy_api_msg_route.RouteAction`. + */ + 'response_headers_to_remove': (string)[]; + /** + * The per_filter_config field can be used to provide weighted cluster-specific + * configurations for filters. The key should match the filter name, such as + * *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter + * specific; see the :ref:`HTTP filter documentation ` + * for if and how it is utilized. + */ + 'per_filter_config'?: ({[key: string]: _google_protobuf_Struct__Output}); + /** + * The per_filter_config field can be used to provide weighted cluster-specific + * configurations for filters. The key should match the filter name, such as + * *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter + * specific; see the :ref:`HTTP filter documentation ` + * for if and how it is utilized. + */ + 'typed_per_filter_config'?: ({[key: string]: _google_protobuf_Any__Output}); +} + +/** + * Compared to the :ref:`cluster ` field that specifies a + * single upstream cluster as the target of a request, the :ref:`weighted_clusters + * ` option allows for specification of + * multiple upstream clusters along with weights that indicate the percentage of + * traffic to be forwarded to each cluster. The router selects an upstream cluster based on the + * weights. + */ +export interface WeightedCluster { + /** + * Specifies one or more upstream clusters associated with the route. + */ + 'clusters'?: (_envoy_api_v2_route_WeightedCluster_ClusterWeight)[]; + /** + * Specifies the runtime key prefix that should be used to construct the + * runtime keys associated with each cluster. When the *runtime_key_prefix* is + * specified, the router will look for weights associated with each upstream + * cluster under the key *runtime_key_prefix* + "." + *cluster[i].name* where + * *cluster[i]* denotes an entry in the clusters array field. If the runtime + * key for the cluster does not exist, the value specified in the + * configuration file will be used as the default weight. See the :ref:`runtime documentation + * ` for how key names map to the underlying implementation. + */ + 'runtime_key_prefix'?: (string); + /** + * Specifies the total weight across all clusters. The sum of all cluster weights must equal this + * value, which must be greater than 0. Defaults to 100. + */ + 'total_weight'?: (_google_protobuf_UInt32Value); +} + +/** + * Compared to the :ref:`cluster ` field that specifies a + * single upstream cluster as the target of a request, the :ref:`weighted_clusters + * ` option allows for specification of + * multiple upstream clusters along with weights that indicate the percentage of + * traffic to be forwarded to each cluster. The router selects an upstream cluster based on the + * weights. + */ +export interface WeightedCluster__Output { + /** + * Specifies one or more upstream clusters associated with the route. + */ + 'clusters': (_envoy_api_v2_route_WeightedCluster_ClusterWeight__Output)[]; + /** + * Specifies the runtime key prefix that should be used to construct the + * runtime keys associated with each cluster. When the *runtime_key_prefix* is + * specified, the router will look for weights associated with each upstream + * cluster under the key *runtime_key_prefix* + "." + *cluster[i].name* where + * *cluster[i]* denotes an entry in the clusters array field. If the runtime + * key for the cluster does not exist, the value specified in the + * configuration file will be used as the default weight. See the :ref:`runtime documentation + * ` for how key names map to the underlying implementation. + */ + 'runtime_key_prefix': (string); + /** + * Specifies the total weight across all clusters. The sum of all cluster weights must equal this + * value, which must be greater than 0. Defaults to 100. + */ + 'total_weight'?: (_google_protobuf_UInt32Value__Output); +} diff --git a/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/AccessLog.ts b/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/AccessLog.ts new file mode 100644 index 000000000..7ff4a751c --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/AccessLog.ts @@ -0,0 +1,65 @@ +// Original file: deps/envoy-api/envoy/config/filter/accesslog/v2/accesslog.proto + +import { AccessLogFilter as _envoy_config_filter_accesslog_v2_AccessLogFilter, AccessLogFilter__Output as _envoy_config_filter_accesslog_v2_AccessLogFilter__Output } from '../../../../../envoy/config/filter/accesslog/v2/AccessLogFilter'; +import { Struct as _google_protobuf_Struct, Struct__Output as _google_protobuf_Struct__Output } from '../../../../../google/protobuf/Struct'; +import { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../../../google/protobuf/Any'; + +export interface AccessLog { + /** + * The name of the access log implementation to instantiate. The name must + * match a statically registered access log. Current built-in loggers include: + * + * #. "envoy.access_loggers.file" + * #. "envoy.access_loggers.http_grpc" + * #. "envoy.access_loggers.tcp_grpc" + */ + 'name'?: (string); + /** + * Filter which is used to determine if the access log needs to be written. + */ + 'filter'?: (_envoy_config_filter_accesslog_v2_AccessLogFilter); + 'config'?: (_google_protobuf_Struct); + 'typed_config'?: (_google_protobuf_Any); + /** + * Custom configuration that depends on the access log being instantiated. Built-in + * configurations include: + * + * #. "envoy.access_loggers.file": :ref:`FileAccessLog + * ` + * #. "envoy.access_loggers.http_grpc": :ref:`HttpGrpcAccessLogConfig + * ` + * #. "envoy.access_loggers.tcp_grpc": :ref:`TcpGrpcAccessLogConfig + * ` + */ + 'config_type'?: "config"|"typed_config"; +} + +export interface AccessLog__Output { + /** + * The name of the access log implementation to instantiate. The name must + * match a statically registered access log. Current built-in loggers include: + * + * #. "envoy.access_loggers.file" + * #. "envoy.access_loggers.http_grpc" + * #. "envoy.access_loggers.tcp_grpc" + */ + 'name': (string); + /** + * Filter which is used to determine if the access log needs to be written. + */ + 'filter'?: (_envoy_config_filter_accesslog_v2_AccessLogFilter__Output); + 'config'?: (_google_protobuf_Struct__Output); + 'typed_config'?: (_google_protobuf_Any__Output); + /** + * Custom configuration that depends on the access log being instantiated. Built-in + * configurations include: + * + * #. "envoy.access_loggers.file": :ref:`FileAccessLog + * ` + * #. "envoy.access_loggers.http_grpc": :ref:`HttpGrpcAccessLogConfig + * ` + * #. "envoy.access_loggers.tcp_grpc": :ref:`TcpGrpcAccessLogConfig + * ` + */ + 'config_type': "config"|"typed_config"; +} diff --git a/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/AccessLogFilter.ts b/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/AccessLogFilter.ts new file mode 100644 index 000000000..19eb4ed28 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/AccessLogFilter.ts @@ -0,0 +1,115 @@ +// Original file: deps/envoy-api/envoy/config/filter/accesslog/v2/accesslog.proto + +import { StatusCodeFilter as _envoy_config_filter_accesslog_v2_StatusCodeFilter, StatusCodeFilter__Output as _envoy_config_filter_accesslog_v2_StatusCodeFilter__Output } from '../../../../../envoy/config/filter/accesslog/v2/StatusCodeFilter'; +import { DurationFilter as _envoy_config_filter_accesslog_v2_DurationFilter, DurationFilter__Output as _envoy_config_filter_accesslog_v2_DurationFilter__Output } from '../../../../../envoy/config/filter/accesslog/v2/DurationFilter'; +import { NotHealthCheckFilter as _envoy_config_filter_accesslog_v2_NotHealthCheckFilter, NotHealthCheckFilter__Output as _envoy_config_filter_accesslog_v2_NotHealthCheckFilter__Output } from '../../../../../envoy/config/filter/accesslog/v2/NotHealthCheckFilter'; +import { TraceableFilter as _envoy_config_filter_accesslog_v2_TraceableFilter, TraceableFilter__Output as _envoy_config_filter_accesslog_v2_TraceableFilter__Output } from '../../../../../envoy/config/filter/accesslog/v2/TraceableFilter'; +import { RuntimeFilter as _envoy_config_filter_accesslog_v2_RuntimeFilter, RuntimeFilter__Output as _envoy_config_filter_accesslog_v2_RuntimeFilter__Output } from '../../../../../envoy/config/filter/accesslog/v2/RuntimeFilter'; +import { AndFilter as _envoy_config_filter_accesslog_v2_AndFilter, AndFilter__Output as _envoy_config_filter_accesslog_v2_AndFilter__Output } from '../../../../../envoy/config/filter/accesslog/v2/AndFilter'; +import { OrFilter as _envoy_config_filter_accesslog_v2_OrFilter, OrFilter__Output as _envoy_config_filter_accesslog_v2_OrFilter__Output } from '../../../../../envoy/config/filter/accesslog/v2/OrFilter'; +import { HeaderFilter as _envoy_config_filter_accesslog_v2_HeaderFilter, HeaderFilter__Output as _envoy_config_filter_accesslog_v2_HeaderFilter__Output } from '../../../../../envoy/config/filter/accesslog/v2/HeaderFilter'; +import { ResponseFlagFilter as _envoy_config_filter_accesslog_v2_ResponseFlagFilter, ResponseFlagFilter__Output as _envoy_config_filter_accesslog_v2_ResponseFlagFilter__Output } from '../../../../../envoy/config/filter/accesslog/v2/ResponseFlagFilter'; +import { GrpcStatusFilter as _envoy_config_filter_accesslog_v2_GrpcStatusFilter, GrpcStatusFilter__Output as _envoy_config_filter_accesslog_v2_GrpcStatusFilter__Output } from '../../../../../envoy/config/filter/accesslog/v2/GrpcStatusFilter'; +import { ExtensionFilter as _envoy_config_filter_accesslog_v2_ExtensionFilter, ExtensionFilter__Output as _envoy_config_filter_accesslog_v2_ExtensionFilter__Output } from '../../../../../envoy/config/filter/accesslog/v2/ExtensionFilter'; + +/** + * [#next-free-field: 12] + */ +export interface AccessLogFilter { + /** + * Status code filter. + */ + 'status_code_filter'?: (_envoy_config_filter_accesslog_v2_StatusCodeFilter); + /** + * Duration filter. + */ + 'duration_filter'?: (_envoy_config_filter_accesslog_v2_DurationFilter); + /** + * Not health check filter. + */ + 'not_health_check_filter'?: (_envoy_config_filter_accesslog_v2_NotHealthCheckFilter); + /** + * Traceable filter. + */ + 'traceable_filter'?: (_envoy_config_filter_accesslog_v2_TraceableFilter); + /** + * Runtime filter. + */ + 'runtime_filter'?: (_envoy_config_filter_accesslog_v2_RuntimeFilter); + /** + * And filter. + */ + 'and_filter'?: (_envoy_config_filter_accesslog_v2_AndFilter); + /** + * Or filter. + */ + 'or_filter'?: (_envoy_config_filter_accesslog_v2_OrFilter); + /** + * Header filter. + */ + 'header_filter'?: (_envoy_config_filter_accesslog_v2_HeaderFilter); + /** + * Response flag filter. + */ + 'response_flag_filter'?: (_envoy_config_filter_accesslog_v2_ResponseFlagFilter); + /** + * gRPC status filter. + */ + 'grpc_status_filter'?: (_envoy_config_filter_accesslog_v2_GrpcStatusFilter); + /** + * Extension filter. + */ + 'extension_filter'?: (_envoy_config_filter_accesslog_v2_ExtensionFilter); + 'filter_specifier'?: "status_code_filter"|"duration_filter"|"not_health_check_filter"|"traceable_filter"|"runtime_filter"|"and_filter"|"or_filter"|"header_filter"|"response_flag_filter"|"grpc_status_filter"|"extension_filter"; +} + +/** + * [#next-free-field: 12] + */ +export interface AccessLogFilter__Output { + /** + * Status code filter. + */ + 'status_code_filter'?: (_envoy_config_filter_accesslog_v2_StatusCodeFilter__Output); + /** + * Duration filter. + */ + 'duration_filter'?: (_envoy_config_filter_accesslog_v2_DurationFilter__Output); + /** + * Not health check filter. + */ + 'not_health_check_filter'?: (_envoy_config_filter_accesslog_v2_NotHealthCheckFilter__Output); + /** + * Traceable filter. + */ + 'traceable_filter'?: (_envoy_config_filter_accesslog_v2_TraceableFilter__Output); + /** + * Runtime filter. + */ + 'runtime_filter'?: (_envoy_config_filter_accesslog_v2_RuntimeFilter__Output); + /** + * And filter. + */ + 'and_filter'?: (_envoy_config_filter_accesslog_v2_AndFilter__Output); + /** + * Or filter. + */ + 'or_filter'?: (_envoy_config_filter_accesslog_v2_OrFilter__Output); + /** + * Header filter. + */ + 'header_filter'?: (_envoy_config_filter_accesslog_v2_HeaderFilter__Output); + /** + * Response flag filter. + */ + 'response_flag_filter'?: (_envoy_config_filter_accesslog_v2_ResponseFlagFilter__Output); + /** + * gRPC status filter. + */ + 'grpc_status_filter'?: (_envoy_config_filter_accesslog_v2_GrpcStatusFilter__Output); + /** + * Extension filter. + */ + 'extension_filter'?: (_envoy_config_filter_accesslog_v2_ExtensionFilter__Output); + 'filter_specifier': "status_code_filter"|"duration_filter"|"not_health_check_filter"|"traceable_filter"|"runtime_filter"|"and_filter"|"or_filter"|"header_filter"|"response_flag_filter"|"grpc_status_filter"|"extension_filter"; +} diff --git a/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/AndFilter.ts b/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/AndFilter.ts new file mode 100644 index 000000000..a39ba8f21 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/AndFilter.ts @@ -0,0 +1,21 @@ +// Original file: deps/envoy-api/envoy/config/filter/accesslog/v2/accesslog.proto + +import { AccessLogFilter as _envoy_config_filter_accesslog_v2_AccessLogFilter, AccessLogFilter__Output as _envoy_config_filter_accesslog_v2_AccessLogFilter__Output } from '../../../../../envoy/config/filter/accesslog/v2/AccessLogFilter'; + +/** + * Performs a logical “and” operation on the result of each filter in filters. + * Filters are evaluated sequentially and if one of them returns false, the + * filter returns false immediately. + */ +export interface AndFilter { + 'filters'?: (_envoy_config_filter_accesslog_v2_AccessLogFilter)[]; +} + +/** + * Performs a logical “and” operation on the result of each filter in filters. + * Filters are evaluated sequentially and if one of them returns false, the + * filter returns false immediately. + */ +export interface AndFilter__Output { + 'filters': (_envoy_config_filter_accesslog_v2_AccessLogFilter__Output)[]; +} diff --git a/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/ComparisonFilter.ts b/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/ComparisonFilter.ts new file mode 100644 index 000000000..9e264d7a4 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/ComparisonFilter.ts @@ -0,0 +1,48 @@ +// Original file: deps/envoy-api/envoy/config/filter/accesslog/v2/accesslog.proto + +import { RuntimeUInt32 as _envoy_api_v2_core_RuntimeUInt32, RuntimeUInt32__Output as _envoy_api_v2_core_RuntimeUInt32__Output } from '../../../../../envoy/api/v2/core/RuntimeUInt32'; + +// Original file: deps/envoy-api/envoy/config/filter/accesslog/v2/accesslog.proto + +export enum _envoy_config_filter_accesslog_v2_ComparisonFilter_Op { + /** + * = + */ + EQ = 0, + /** + * >= + */ + GE = 1, + /** + * <= + */ + LE = 2, +} + +/** + * Filter on an integer comparison. + */ +export interface ComparisonFilter { + /** + * Comparison operator. + */ + 'op'?: (_envoy_config_filter_accesslog_v2_ComparisonFilter_Op | keyof typeof _envoy_config_filter_accesslog_v2_ComparisonFilter_Op); + /** + * Value to compare against. + */ + 'value'?: (_envoy_api_v2_core_RuntimeUInt32); +} + +/** + * Filter on an integer comparison. + */ +export interface ComparisonFilter__Output { + /** + * Comparison operator. + */ + 'op': (keyof typeof _envoy_config_filter_accesslog_v2_ComparisonFilter_Op); + /** + * Value to compare against. + */ + 'value'?: (_envoy_api_v2_core_RuntimeUInt32__Output); +} diff --git a/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/DurationFilter.ts b/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/DurationFilter.ts new file mode 100644 index 000000000..e8756385a --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/DurationFilter.ts @@ -0,0 +1,23 @@ +// Original file: deps/envoy-api/envoy/config/filter/accesslog/v2/accesslog.proto + +import { ComparisonFilter as _envoy_config_filter_accesslog_v2_ComparisonFilter, ComparisonFilter__Output as _envoy_config_filter_accesslog_v2_ComparisonFilter__Output } from '../../../../../envoy/config/filter/accesslog/v2/ComparisonFilter'; + +/** + * Filters on total request duration in milliseconds. + */ +export interface DurationFilter { + /** + * Comparison. + */ + 'comparison'?: (_envoy_config_filter_accesslog_v2_ComparisonFilter); +} + +/** + * Filters on total request duration in milliseconds. + */ +export interface DurationFilter__Output { + /** + * Comparison. + */ + 'comparison'?: (_envoy_config_filter_accesslog_v2_ComparisonFilter__Output); +} diff --git a/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/ExtensionFilter.ts b/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/ExtensionFilter.ts new file mode 100644 index 000000000..b0a061b82 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/ExtensionFilter.ts @@ -0,0 +1,38 @@ +// Original file: deps/envoy-api/envoy/config/filter/accesslog/v2/accesslog.proto + +import { Struct as _google_protobuf_Struct, Struct__Output as _google_protobuf_Struct__Output } from '../../../../../google/protobuf/Struct'; +import { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../../../google/protobuf/Any'; + +/** + * Extension filter is statically registered at runtime. + */ +export interface ExtensionFilter { + /** + * The name of the filter implementation to instantiate. The name must + * match a statically registered filter. + */ + 'name'?: (string); + 'config'?: (_google_protobuf_Struct); + 'typed_config'?: (_google_protobuf_Any); + /** + * Custom configuration that depends on the filter being instantiated. + */ + 'config_type'?: "config"|"typed_config"; +} + +/** + * Extension filter is statically registered at runtime. + */ +export interface ExtensionFilter__Output { + /** + * The name of the filter implementation to instantiate. The name must + * match a statically registered filter. + */ + 'name': (string); + 'config'?: (_google_protobuf_Struct__Output); + 'typed_config'?: (_google_protobuf_Any__Output); + /** + * Custom configuration that depends on the filter being instantiated. + */ + 'config_type': "config"|"typed_config"; +} diff --git a/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/GrpcStatusFilter.ts b/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/GrpcStatusFilter.ts new file mode 100644 index 000000000..8e8b0981e --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/GrpcStatusFilter.ts @@ -0,0 +1,56 @@ +// Original file: deps/envoy-api/envoy/config/filter/accesslog/v2/accesslog.proto + + +// Original file: deps/envoy-api/envoy/config/filter/accesslog/v2/accesslog.proto + +export enum _envoy_config_filter_accesslog_v2_GrpcStatusFilter_Status { + OK = 0, + CANCELED = 1, + UNKNOWN = 2, + INVALID_ARGUMENT = 3, + DEADLINE_EXCEEDED = 4, + NOT_FOUND = 5, + ALREADY_EXISTS = 6, + PERMISSION_DENIED = 7, + RESOURCE_EXHAUSTED = 8, + FAILED_PRECONDITION = 9, + ABORTED = 10, + OUT_OF_RANGE = 11, + UNIMPLEMENTED = 12, + INTERNAL = 13, + UNAVAILABLE = 14, + DATA_LOSS = 15, + UNAUTHENTICATED = 16, +} + +/** + * Filters gRPC requests based on their response status. If a gRPC status is not provided, the + * filter will infer the status from the HTTP status code. + */ +export interface GrpcStatusFilter { + /** + * Logs only responses that have any one of the gRPC statuses in this field. + */ + 'statuses'?: (_envoy_config_filter_accesslog_v2_GrpcStatusFilter_Status | keyof typeof _envoy_config_filter_accesslog_v2_GrpcStatusFilter_Status)[]; + /** + * If included and set to true, the filter will instead block all responses with a gRPC status or + * inferred gRPC status enumerated in statuses, and allow all other responses. + */ + 'exclude'?: (boolean); +} + +/** + * Filters gRPC requests based on their response status. If a gRPC status is not provided, the + * filter will infer the status from the HTTP status code. + */ +export interface GrpcStatusFilter__Output { + /** + * Logs only responses that have any one of the gRPC statuses in this field. + */ + 'statuses': (keyof typeof _envoy_config_filter_accesslog_v2_GrpcStatusFilter_Status)[]; + /** + * If included and set to true, the filter will instead block all responses with a gRPC status or + * inferred gRPC status enumerated in statuses, and allow all other responses. + */ + 'exclude': (boolean); +} diff --git a/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/HeaderFilter.ts b/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/HeaderFilter.ts new file mode 100644 index 000000000..2b4e6275d --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/HeaderFilter.ts @@ -0,0 +1,25 @@ +// Original file: deps/envoy-api/envoy/config/filter/accesslog/v2/accesslog.proto + +import { HeaderMatcher as _envoy_api_v2_route_HeaderMatcher, HeaderMatcher__Output as _envoy_api_v2_route_HeaderMatcher__Output } from '../../../../../envoy/api/v2/route/HeaderMatcher'; + +/** + * Filters requests based on the presence or value of a request header. + */ +export interface HeaderFilter { + /** + * Only requests with a header which matches the specified HeaderMatcher will pass the filter + * check. + */ + 'header'?: (_envoy_api_v2_route_HeaderMatcher); +} + +/** + * Filters requests based on the presence or value of a request header. + */ +export interface HeaderFilter__Output { + /** + * Only requests with a header which matches the specified HeaderMatcher will pass the filter + * check. + */ + 'header'?: (_envoy_api_v2_route_HeaderMatcher__Output); +} diff --git a/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/NotHealthCheckFilter.ts b/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/NotHealthCheckFilter.ts new file mode 100644 index 000000000..3de68f081 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/NotHealthCheckFilter.ts @@ -0,0 +1,16 @@ +// Original file: deps/envoy-api/envoy/config/filter/accesslog/v2/accesslog.proto + + +/** + * Filters for requests that are not health check requests. A health check + * request is marked by the health check filter. + */ +export interface NotHealthCheckFilter { +} + +/** + * Filters for requests that are not health check requests. A health check + * request is marked by the health check filter. + */ +export interface NotHealthCheckFilter__Output { +} diff --git a/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/OrFilter.ts b/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/OrFilter.ts new file mode 100644 index 000000000..def55d54a --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/OrFilter.ts @@ -0,0 +1,21 @@ +// Original file: deps/envoy-api/envoy/config/filter/accesslog/v2/accesslog.proto + +import { AccessLogFilter as _envoy_config_filter_accesslog_v2_AccessLogFilter, AccessLogFilter__Output as _envoy_config_filter_accesslog_v2_AccessLogFilter__Output } from '../../../../../envoy/config/filter/accesslog/v2/AccessLogFilter'; + +/** + * Performs a logical “or” operation on the result of each individual filter. + * Filters are evaluated sequentially and if one of them returns true, the + * filter returns true immediately. + */ +export interface OrFilter { + 'filters'?: (_envoy_config_filter_accesslog_v2_AccessLogFilter)[]; +} + +/** + * Performs a logical “or” operation on the result of each individual filter. + * Filters are evaluated sequentially and if one of them returns true, the + * filter returns true immediately. + */ +export interface OrFilter__Output { + 'filters': (_envoy_config_filter_accesslog_v2_AccessLogFilter__Output)[]; +} diff --git a/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/ResponseFlagFilter.ts b/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/ResponseFlagFilter.ts new file mode 100644 index 000000000..280fbb26a --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/ResponseFlagFilter.ts @@ -0,0 +1,30 @@ +// Original file: deps/envoy-api/envoy/config/filter/accesslog/v2/accesslog.proto + + +/** + * Filters requests that received responses with an Envoy response flag set. + * A list of the response flags can be found + * in the access log formatter :ref:`documentation`. + */ +export interface ResponseFlagFilter { + /** + * Only responses with the any of the flags listed in this field will be logged. + * This field is optional. If it is not specified, then any response flag will pass + * the filter check. + */ + 'flags'?: (string)[]; +} + +/** + * Filters requests that received responses with an Envoy response flag set. + * A list of the response flags can be found + * in the access log formatter :ref:`documentation`. + */ +export interface ResponseFlagFilter__Output { + /** + * Only responses with the any of the flags listed in this field will be logged. + * This field is optional. If it is not specified, then any response flag will pass + * the filter check. + */ + 'flags': (string)[]; +} diff --git a/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/RuntimeFilter.ts b/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/RuntimeFilter.ts new file mode 100644 index 000000000..9548b5a16 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/RuntimeFilter.ts @@ -0,0 +1,63 @@ +// Original file: deps/envoy-api/envoy/config/filter/accesslog/v2/accesslog.proto + +import { FractionalPercent as _envoy_type_FractionalPercent, FractionalPercent__Output as _envoy_type_FractionalPercent__Output } from '../../../../../envoy/type/FractionalPercent'; + +/** + * Filters for random sampling of requests. + */ +export interface RuntimeFilter { + /** + * Runtime key to get an optional overridden numerator for use in the *percent_sampled* field. + * If found in runtime, this value will replace the default numerator. + */ + 'runtime_key'?: (string); + /** + * The default sampling percentage. If not specified, defaults to 0% with denominator of 100. + */ + 'percent_sampled'?: (_envoy_type_FractionalPercent); + /** + * By default, sampling pivots on the header + * :ref:`x-request-id` being present. If + * :ref:`x-request-id` is present, the filter will + * consistently sample across multiple hosts based on the runtime key value and the value + * extracted from :ref:`x-request-id`. If it is + * missing, or *use_independent_randomness* is set to true, the filter will randomly sample based + * on the runtime key value alone. *use_independent_randomness* can be used for logging kill + * switches within complex nested :ref:`AndFilter + * ` and :ref:`OrFilter + * ` blocks that are easier to reason about + * from a probability perspective (i.e., setting to true will cause the filter to behave like + * an independent random variable when composed within logical operator filters). + */ + 'use_independent_randomness'?: (boolean); +} + +/** + * Filters for random sampling of requests. + */ +export interface RuntimeFilter__Output { + /** + * Runtime key to get an optional overridden numerator for use in the *percent_sampled* field. + * If found in runtime, this value will replace the default numerator. + */ + 'runtime_key': (string); + /** + * The default sampling percentage. If not specified, defaults to 0% with denominator of 100. + */ + 'percent_sampled'?: (_envoy_type_FractionalPercent__Output); + /** + * By default, sampling pivots on the header + * :ref:`x-request-id` being present. If + * :ref:`x-request-id` is present, the filter will + * consistently sample across multiple hosts based on the runtime key value and the value + * extracted from :ref:`x-request-id`. If it is + * missing, or *use_independent_randomness* is set to true, the filter will randomly sample based + * on the runtime key value alone. *use_independent_randomness* can be used for logging kill + * switches within complex nested :ref:`AndFilter + * ` and :ref:`OrFilter + * ` blocks that are easier to reason about + * from a probability perspective (i.e., setting to true will cause the filter to behave like + * an independent random variable when composed within logical operator filters). + */ + 'use_independent_randomness': (boolean); +} diff --git a/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/StatusCodeFilter.ts b/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/StatusCodeFilter.ts new file mode 100644 index 000000000..d51d42b49 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/StatusCodeFilter.ts @@ -0,0 +1,23 @@ +// Original file: deps/envoy-api/envoy/config/filter/accesslog/v2/accesslog.proto + +import { ComparisonFilter as _envoy_config_filter_accesslog_v2_ComparisonFilter, ComparisonFilter__Output as _envoy_config_filter_accesslog_v2_ComparisonFilter__Output } from '../../../../../envoy/config/filter/accesslog/v2/ComparisonFilter'; + +/** + * Filters on HTTP response/status code. + */ +export interface StatusCodeFilter { + /** + * Comparison. + */ + 'comparison'?: (_envoy_config_filter_accesslog_v2_ComparisonFilter); +} + +/** + * Filters on HTTP response/status code. + */ +export interface StatusCodeFilter__Output { + /** + * Comparison. + */ + 'comparison'?: (_envoy_config_filter_accesslog_v2_ComparisonFilter__Output); +} diff --git a/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/TraceableFilter.ts b/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/TraceableFilter.ts new file mode 100644 index 000000000..8de24656a --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/config/filter/accesslog/v2/TraceableFilter.ts @@ -0,0 +1,16 @@ +// Original file: deps/envoy-api/envoy/config/filter/accesslog/v2/accesslog.proto + + +/** + * Filters for requests that are traceable. See the tracing overview for more + * information on how a request becomes traceable. + */ +export interface TraceableFilter { +} + +/** + * Filters for requests that are traceable. See the tracing overview for more + * information on how a request becomes traceable. + */ +export interface TraceableFilter__Output { +} diff --git a/packages/grpc-js/src/generated/envoy/config/listener/v2/ApiListener.ts b/packages/grpc-js/src/generated/envoy/config/listener/v2/ApiListener.ts new file mode 100644 index 000000000..be4d2415e --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/config/listener/v2/ApiListener.ts @@ -0,0 +1,39 @@ +// Original file: deps/envoy-api/envoy/config/listener/v2/api_listener.proto + +import { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../../google/protobuf/Any'; + +/** + * Describes a type of API listener, which is used in non-proxy clients. The type of API + * exposed to the non-proxy application depends on the type of API listener. + */ +export interface ApiListener { + /** + * The type in this field determines the type of API listener. At present, the following + * types are supported: + * envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager (HTTP) + * [#next-major-version: In the v3 API, replace this Any field with a oneof containing the + * specific config message for each type of API listener. We could not do this in v2 because + * it would have caused circular dependencies for go protos: lds.proto depends on this file, + * and http_connection_manager.proto depends on rds.proto, which is in the same directory as + * lds.proto, so lds.proto cannot depend on this file.] + */ + 'api_listener'?: (_google_protobuf_Any); +} + +/** + * Describes a type of API listener, which is used in non-proxy clients. The type of API + * exposed to the non-proxy application depends on the type of API listener. + */ +export interface ApiListener__Output { + /** + * The type in this field determines the type of API listener. At present, the following + * types are supported: + * envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager (HTTP) + * [#next-major-version: In the v3 API, replace this Any field with a oneof containing the + * specific config message for each type of API listener. We could not do this in v2 because + * it would have caused circular dependencies for go protos: lds.proto depends on this file, + * and http_connection_manager.proto depends on rds.proto, which is in the same directory as + * lds.proto, so lds.proto cannot depend on this file.] + */ + 'api_listener'?: (_google_protobuf_Any__Output); +} diff --git a/packages/grpc-js/src/generated/envoy/service/discovery/v2/AdsDummy.ts b/packages/grpc-js/src/generated/envoy/service/discovery/v2/AdsDummy.ts new file mode 100644 index 000000000..eeb6aa6af --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/service/discovery/v2/AdsDummy.ts @@ -0,0 +1,16 @@ +// Original file: deps/envoy-api/envoy/service/discovery/v2/ads.proto + + +/** + * [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing + * services: https://github.com/google/protobuf/issues/4221 + */ +export interface AdsDummy { +} + +/** + * [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing + * services: https://github.com/google/protobuf/issues/4221 + */ +export interface AdsDummy__Output { +} diff --git a/packages/grpc-js/src/generated/envoy/service/discovery/v2/AggregatedDiscoveryService.ts b/packages/grpc-js/src/generated/envoy/service/discovery/v2/AggregatedDiscoveryService.ts new file mode 100644 index 000000000..32cc9ba51 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/service/discovery/v2/AggregatedDiscoveryService.ts @@ -0,0 +1,52 @@ +// Original file: deps/envoy-api/envoy/service/discovery/v2/ads.proto + +import * as grpc from '../../../../../index' +import { DeltaDiscoveryRequest as _envoy_api_v2_DeltaDiscoveryRequest, DeltaDiscoveryRequest__Output as _envoy_api_v2_DeltaDiscoveryRequest__Output } from '../../../../envoy/api/v2/DeltaDiscoveryRequest'; +import { DeltaDiscoveryResponse as _envoy_api_v2_DeltaDiscoveryResponse, DeltaDiscoveryResponse__Output as _envoy_api_v2_DeltaDiscoveryResponse__Output } from '../../../../envoy/api/v2/DeltaDiscoveryResponse'; +import { DiscoveryRequest as _envoy_api_v2_DiscoveryRequest, DiscoveryRequest__Output as _envoy_api_v2_DiscoveryRequest__Output } from '../../../../envoy/api/v2/DiscoveryRequest'; +import { DiscoveryResponse as _envoy_api_v2_DiscoveryResponse, DiscoveryResponse__Output as _envoy_api_v2_DiscoveryResponse__Output } from '../../../../envoy/api/v2/DiscoveryResponse'; + +/** + * See https://github.com/lyft/envoy-api#apis for a description of the role of + * ADS and how it is intended to be used by a management server. ADS requests + * have the same structure as their singleton xDS counterparts, but can + * multiplex many resource types on a single stream. The type_url in the + * DiscoveryRequest/DiscoveryResponse provides sufficient information to recover + * the multiplexed singleton APIs at the Envoy instance and management server. + */ +export interface AggregatedDiscoveryServiceClient extends grpc.Client { + DeltaAggregatedResources(metadata: grpc.Metadata, options?: grpc.CallOptions): grpc.ClientDuplexStream<_envoy_api_v2_DeltaDiscoveryRequest, _envoy_api_v2_DeltaDiscoveryResponse__Output>; + DeltaAggregatedResources(options?: grpc.CallOptions): grpc.ClientDuplexStream<_envoy_api_v2_DeltaDiscoveryRequest, _envoy_api_v2_DeltaDiscoveryResponse__Output>; + deltaAggregatedResources(metadata: grpc.Metadata, options?: grpc.CallOptions): grpc.ClientDuplexStream<_envoy_api_v2_DeltaDiscoveryRequest, _envoy_api_v2_DeltaDiscoveryResponse__Output>; + deltaAggregatedResources(options?: grpc.CallOptions): grpc.ClientDuplexStream<_envoy_api_v2_DeltaDiscoveryRequest, _envoy_api_v2_DeltaDiscoveryResponse__Output>; + + /** + * This is a gRPC-only API. + */ + StreamAggregatedResources(metadata: grpc.Metadata, options?: grpc.CallOptions): grpc.ClientDuplexStream<_envoy_api_v2_DiscoveryRequest, _envoy_api_v2_DiscoveryResponse__Output>; + StreamAggregatedResources(options?: grpc.CallOptions): grpc.ClientDuplexStream<_envoy_api_v2_DiscoveryRequest, _envoy_api_v2_DiscoveryResponse__Output>; + /** + * This is a gRPC-only API. + */ + streamAggregatedResources(metadata: grpc.Metadata, options?: grpc.CallOptions): grpc.ClientDuplexStream<_envoy_api_v2_DiscoveryRequest, _envoy_api_v2_DiscoveryResponse__Output>; + streamAggregatedResources(options?: grpc.CallOptions): grpc.ClientDuplexStream<_envoy_api_v2_DiscoveryRequest, _envoy_api_v2_DiscoveryResponse__Output>; + +} + +/** + * See https://github.com/lyft/envoy-api#apis for a description of the role of + * ADS and how it is intended to be used by a management server. ADS requests + * have the same structure as their singleton xDS counterparts, but can + * multiplex many resource types on a single stream. The type_url in the + * DiscoveryRequest/DiscoveryResponse provides sufficient information to recover + * the multiplexed singleton APIs at the Envoy instance and management server. + */ +export interface AggregatedDiscoveryServiceHandlers { + DeltaAggregatedResources(call: grpc.ServerDuplexStream<_envoy_api_v2_DeltaDiscoveryRequest, _envoy_api_v2_DeltaDiscoveryResponse__Output>): void; + + /** + * This is a gRPC-only API. + */ + StreamAggregatedResources(call: grpc.ServerDuplexStream<_envoy_api_v2_DiscoveryRequest, _envoy_api_v2_DiscoveryResponse__Output>): void; + +} diff --git a/packages/grpc-js/src/generated/envoy/type/CodecClientType.ts b/packages/grpc-js/src/generated/envoy/type/CodecClientType.ts new file mode 100644 index 000000000..a0bf07351 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/type/CodecClientType.ts @@ -0,0 +1,12 @@ +// Original file: deps/envoy-api/envoy/type/http.proto + +export enum CodecClientType { + HTTP1 = 0, + HTTP2 = 1, + /** + * [#not-implemented-hide:] QUIC implementation is not production ready yet. Use this enum with + * caution to prevent accidental execution of QUIC code. I.e. `!= HTTP2` is no longer sufficient + * to distinguish HTTP1 and HTTP2 traffic. + */ + HTTP3 = 2, +} diff --git a/packages/grpc-js/src/generated/envoy/type/DoubleRange.ts b/packages/grpc-js/src/generated/envoy/type/DoubleRange.ts new file mode 100644 index 000000000..5ebc3a579 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/type/DoubleRange.ts @@ -0,0 +1,32 @@ +// Original file: deps/envoy-api/envoy/type/range.proto + + +/** + * Specifies the double start and end of the range using half-open interval semantics [start, + * end). + */ +export interface DoubleRange { + /** + * start of the range (inclusive) + */ + 'start'?: (number | string); + /** + * end of the range (exclusive) + */ + 'end'?: (number | string); +} + +/** + * Specifies the double start and end of the range using half-open interval semantics [start, + * end). + */ +export interface DoubleRange__Output { + /** + * start of the range (inclusive) + */ + 'start': (number | string); + /** + * end of the range (exclusive) + */ + 'end': (number | string); +} diff --git a/packages/grpc-js/src/generated/envoy/type/FractionalPercent.ts b/packages/grpc-js/src/generated/envoy/type/FractionalPercent.ts new file mode 100644 index 000000000..e450f0bfa --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/type/FractionalPercent.ts @@ -0,0 +1,68 @@ +// Original file: deps/envoy-api/envoy/type/percent.proto + + +// Original file: deps/envoy-api/envoy/type/percent.proto + +/** + * Fraction percentages support several fixed denominator values. + */ +export enum _envoy_type_FractionalPercent_DenominatorType { + /** + * 100. + * + * **Example**: 1/100 = 1%. + */ + HUNDRED = 0, + /** + * 10,000. + * + * **Example**: 1/10000 = 0.01%. + */ + TEN_THOUSAND = 1, + /** + * 1,000,000. + * + * **Example**: 1/1000000 = 0.0001%. + */ + MILLION = 2, +} + +/** + * A fractional percentage is used in cases in which for performance reasons performing floating + * point to integer conversions during randomness calculations is undesirable. The message includes + * both a numerator and denominator that together determine the final fractional value. + * + * * **Example**: 1/100 = 1%. + * * **Example**: 3/10000 = 0.03%. + */ +export interface FractionalPercent { + /** + * Specifies the numerator. Defaults to 0. + */ + 'numerator'?: (number); + /** + * Specifies the denominator. If the denominator specified is less than the numerator, the final + * fractional percentage is capped at 1 (100%). + */ + 'denominator'?: (_envoy_type_FractionalPercent_DenominatorType | keyof typeof _envoy_type_FractionalPercent_DenominatorType); +} + +/** + * A fractional percentage is used in cases in which for performance reasons performing floating + * point to integer conversions during randomness calculations is undesirable. The message includes + * both a numerator and denominator that together determine the final fractional value. + * + * * **Example**: 1/100 = 1%. + * * **Example**: 3/10000 = 0.03%. + */ +export interface FractionalPercent__Output { + /** + * Specifies the numerator. Defaults to 0. + */ + 'numerator': (number); + /** + * Specifies the denominator. If the denominator specified is less than the numerator, the final + * fractional percentage is capped at 1 (100%). + */ + 'denominator': (keyof typeof _envoy_type_FractionalPercent_DenominatorType); +} diff --git a/packages/grpc-js/src/generated/envoy/type/Int32Range.ts b/packages/grpc-js/src/generated/envoy/type/Int32Range.ts new file mode 100644 index 000000000..f5475c2db --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/type/Int32Range.ts @@ -0,0 +1,32 @@ +// Original file: deps/envoy-api/envoy/type/range.proto + + +/** + * Specifies the int32 start and end of the range using half-open interval semantics [start, + * end). + */ +export interface Int32Range { + /** + * start of the range (inclusive) + */ + 'start'?: (number); + /** + * end of the range (exclusive) + */ + 'end'?: (number); +} + +/** + * Specifies the int32 start and end of the range using half-open interval semantics [start, + * end). + */ +export interface Int32Range__Output { + /** + * start of the range (inclusive) + */ + 'start': (number); + /** + * end of the range (exclusive) + */ + 'end': (number); +} diff --git a/packages/grpc-js/src/generated/envoy/type/Int64Range.ts b/packages/grpc-js/src/generated/envoy/type/Int64Range.ts new file mode 100644 index 000000000..16c8235ca --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/type/Int64Range.ts @@ -0,0 +1,33 @@ +// Original file: deps/envoy-api/envoy/type/range.proto + +import { Long } from '@grpc/proto-loader'; + +/** + * Specifies the int64 start and end of the range using half-open interval semantics [start, + * end). + */ +export interface Int64Range { + /** + * start of the range (inclusive) + */ + 'start'?: (number | string | Long); + /** + * end of the range (exclusive) + */ + 'end'?: (number | string | Long); +} + +/** + * Specifies the int64 start and end of the range using half-open interval semantics [start, + * end). + */ +export interface Int64Range__Output { + /** + * start of the range (inclusive) + */ + 'start': (string); + /** + * end of the range (exclusive) + */ + 'end': (string); +} diff --git a/packages/grpc-js/src/generated/envoy/type/Percent.ts b/packages/grpc-js/src/generated/envoy/type/Percent.ts new file mode 100644 index 000000000..f63553acd --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/type/Percent.ts @@ -0,0 +1,16 @@ +// Original file: deps/envoy-api/envoy/type/percent.proto + + +/** + * Identifies a percentage, in the range [0.0, 100.0]. + */ +export interface Percent { + 'value'?: (number | string); +} + +/** + * Identifies a percentage, in the range [0.0, 100.0]. + */ +export interface Percent__Output { + 'value': (number | string); +} diff --git a/packages/grpc-js/src/generated/envoy/type/SemanticVersion.ts b/packages/grpc-js/src/generated/envoy/type/SemanticVersion.ts new file mode 100644 index 000000000..f99431703 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/type/SemanticVersion.ts @@ -0,0 +1,24 @@ +// Original file: deps/envoy-api/envoy/type/semantic_version.proto + + +/** + * Envoy uses SemVer (https://semver.org/). Major/minor versions indicate + * expected behaviors and APIs, the patch version field is used only + * for security fixes and can be generally ignored. + */ +export interface SemanticVersion { + 'major_number'?: (number); + 'minor_number'?: (number); + 'patch'?: (number); +} + +/** + * Envoy uses SemVer (https://semver.org/). Major/minor versions indicate + * expected behaviors and APIs, the patch version field is used only + * for security fixes and can be generally ignored. + */ +export interface SemanticVersion__Output { + 'major_number': (number); + 'minor_number': (number); + 'patch': (number); +} diff --git a/packages/grpc-js/src/generated/envoy/type/matcher/ListStringMatcher.ts b/packages/grpc-js/src/generated/envoy/type/matcher/ListStringMatcher.ts new file mode 100644 index 000000000..e4ac83f0d --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/type/matcher/ListStringMatcher.ts @@ -0,0 +1,17 @@ +// Original file: deps/envoy-api/envoy/type/matcher/string.proto + +import { StringMatcher as _envoy_type_matcher_StringMatcher, StringMatcher__Output as _envoy_type_matcher_StringMatcher__Output } from '../../../envoy/type/matcher/StringMatcher'; + +/** + * Specifies a list of ways to match a string. + */ +export interface ListStringMatcher { + 'patterns'?: (_envoy_type_matcher_StringMatcher)[]; +} + +/** + * Specifies a list of ways to match a string. + */ +export interface ListStringMatcher__Output { + 'patterns': (_envoy_type_matcher_StringMatcher__Output)[]; +} diff --git a/packages/grpc-js/src/generated/envoy/type/matcher/RegexMatchAndSubstitute.ts b/packages/grpc-js/src/generated/envoy/type/matcher/RegexMatchAndSubstitute.ts new file mode 100644 index 000000000..390bae053 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/type/matcher/RegexMatchAndSubstitute.ts @@ -0,0 +1,65 @@ +// Original file: deps/envoy-api/envoy/type/matcher/regex.proto + +import { RegexMatcher as _envoy_type_matcher_RegexMatcher, RegexMatcher__Output as _envoy_type_matcher_RegexMatcher__Output } from '../../../envoy/type/matcher/RegexMatcher'; + +/** + * Describes how to match a string and then produce a new string using a regular + * expression and a substitution string. + */ +export interface RegexMatchAndSubstitute { + /** + * The regular expression used to find portions of a string (hereafter called + * the "subject string") that should be replaced. When a new string is + * produced during the substitution operation, the new string is initially + * the same as the subject string, but then all matches in the subject string + * are replaced by the substitution string. If replacing all matches isn't + * desired, regular expression anchors can be used to ensure a single match, + * so as to replace just one occurrence of a pattern. Capture groups can be + * used in the pattern to extract portions of the subject string, and then + * referenced in the substitution string. + */ + 'pattern'?: (_envoy_type_matcher_RegexMatcher); + /** + * The string that should be substituted into matching portions of the + * subject string during a substitution operation to produce a new string. + * Capture groups in the pattern can be referenced in the substitution + * string. Note, however, that the syntax for referring to capture groups is + * defined by the chosen regular expression engine. Google's `RE2 + * `_ regular expression engine uses a + * backslash followed by the capture group number to denote a numbered + * capture group. E.g., ``\1`` refers to capture group 1, and ``\2`` refers + * to capture group 2. + */ + 'substitution'?: (string); +} + +/** + * Describes how to match a string and then produce a new string using a regular + * expression and a substitution string. + */ +export interface RegexMatchAndSubstitute__Output { + /** + * The regular expression used to find portions of a string (hereafter called + * the "subject string") that should be replaced. When a new string is + * produced during the substitution operation, the new string is initially + * the same as the subject string, but then all matches in the subject string + * are replaced by the substitution string. If replacing all matches isn't + * desired, regular expression anchors can be used to ensure a single match, + * so as to replace just one occurrence of a pattern. Capture groups can be + * used in the pattern to extract portions of the subject string, and then + * referenced in the substitution string. + */ + 'pattern'?: (_envoy_type_matcher_RegexMatcher__Output); + /** + * The string that should be substituted into matching portions of the + * subject string during a substitution operation to produce a new string. + * Capture groups in the pattern can be referenced in the substitution + * string. Note, however, that the syntax for referring to capture groups is + * defined by the chosen regular expression engine. Google's `RE2 + * `_ regular expression engine uses a + * backslash followed by the capture group number to denote a numbered + * capture group. E.g., ``\1`` refers to capture group 1, and ``\2`` refers + * to capture group 2. + */ + 'substitution': (string); +} diff --git a/packages/grpc-js/src/generated/envoy/type/matcher/RegexMatcher.ts b/packages/grpc-js/src/generated/envoy/type/matcher/RegexMatcher.ts new file mode 100644 index 000000000..697b9d6a9 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/type/matcher/RegexMatcher.ts @@ -0,0 +1,69 @@ +// Original file: deps/envoy-api/envoy/type/matcher/regex.proto + +import { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output as _google_protobuf_UInt32Value__Output } from '../../../google/protobuf/UInt32Value'; + +/** + * Google's `RE2 `_ regex engine. The regex string must adhere to + * the documented `syntax `_. The engine is designed + * to complete execution in linear time as well as limit the amount of memory used. + */ +export interface _envoy_type_matcher_RegexMatcher_GoogleRE2 { + /** + * This field controls the RE2 "program size" which is a rough estimate of how complex a + * compiled regex is to evaluate. A regex that has a program size greater than the configured + * value will fail to compile. In this case, the configured max program size can be increased + * or the regex can be simplified. If not specified, the default is 100. + * + * This field is deprecated; regexp validation should be performed on the management server + * instead of being done by each individual client. + */ + 'max_program_size'?: (_google_protobuf_UInt32Value); +} + +/** + * Google's `RE2 `_ regex engine. The regex string must adhere to + * the documented `syntax `_. The engine is designed + * to complete execution in linear time as well as limit the amount of memory used. + */ +export interface _envoy_type_matcher_RegexMatcher_GoogleRE2__Output { + /** + * This field controls the RE2 "program size" which is a rough estimate of how complex a + * compiled regex is to evaluate. A regex that has a program size greater than the configured + * value will fail to compile. In this case, the configured max program size can be increased + * or the regex can be simplified. If not specified, the default is 100. + * + * This field is deprecated; regexp validation should be performed on the management server + * instead of being done by each individual client. + */ + 'max_program_size'?: (_google_protobuf_UInt32Value__Output); +} + +/** + * A regex matcher designed for safety when used with untrusted input. + */ +export interface RegexMatcher { + /** + * Google's RE2 regex engine. + */ + 'google_re2'?: (_envoy_type_matcher_RegexMatcher_GoogleRE2); + /** + * The regex match string. The string must be supported by the configured engine. + */ + 'regex'?: (string); + 'engine_type'?: "google_re2"; +} + +/** + * A regex matcher designed for safety when used with untrusted input. + */ +export interface RegexMatcher__Output { + /** + * Google's RE2 regex engine. + */ + 'google_re2'?: (_envoy_type_matcher_RegexMatcher_GoogleRE2__Output); + /** + * The regex match string. The string must be supported by the configured engine. + */ + 'regex': (string); + 'engine_type': "google_re2"; +} diff --git a/packages/grpc-js/src/generated/envoy/type/matcher/StringMatcher.ts b/packages/grpc-js/src/generated/envoy/type/matcher/StringMatcher.ts new file mode 100644 index 000000000..de8ce5dc2 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/type/matcher/StringMatcher.ts @@ -0,0 +1,123 @@ +// Original file: deps/envoy-api/envoy/type/matcher/string.proto + +import { RegexMatcher as _envoy_type_matcher_RegexMatcher, RegexMatcher__Output as _envoy_type_matcher_RegexMatcher__Output } from '../../../envoy/type/matcher/RegexMatcher'; + +/** + * Specifies the way to match a string. + * [#next-free-field: 7] + */ +export interface StringMatcher { + /** + * The input string must match exactly the string specified here. + * + * Examples: + * + * * *abc* only matches the value *abc*. + */ + 'exact'?: (string); + /** + * The input string must have the prefix specified here. + * Note: empty prefix is not allowed, please use regex instead. + * + * Examples: + * + * * *abc* matches the value *abc.xyz* + */ + 'prefix'?: (string); + /** + * The input string must have the suffix specified here. + * Note: empty prefix is not allowed, please use regex instead. + * + * Examples: + * + * * *abc* matches the value *xyz.abc* + */ + 'suffix'?: (string); + /** + * The input string must match the regular expression specified here. + * The regex grammar is defined `here + * `_. + * + * Examples: + * + * * The regex ``\d{3}`` matches the value *123* + * * The regex ``\d{3}`` does not match the value *1234* + * * The regex ``\d{3}`` does not match the value *123.456* + * + * .. attention:: + * This field has been deprecated in favor of `safe_regex` as it is not safe for use with + * untrusted input in all cases. + */ + 'regex'?: (string); + /** + * The input string must match the regular expression specified here. + */ + 'safe_regex'?: (_envoy_type_matcher_RegexMatcher); + /** + * If true, indicates the exact/prefix/suffix matching should be case insensitive. This has no + * effect for the safe_regex match. + * For example, the matcher *data* will match both input string *Data* and *data* if set to true. + */ + 'ignore_case'?: (boolean); + 'match_pattern'?: "exact"|"prefix"|"suffix"|"regex"|"safe_regex"; +} + +/** + * Specifies the way to match a string. + * [#next-free-field: 7] + */ +export interface StringMatcher__Output { + /** + * The input string must match exactly the string specified here. + * + * Examples: + * + * * *abc* only matches the value *abc*. + */ + 'exact'?: (string); + /** + * The input string must have the prefix specified here. + * Note: empty prefix is not allowed, please use regex instead. + * + * Examples: + * + * * *abc* matches the value *abc.xyz* + */ + 'prefix'?: (string); + /** + * The input string must have the suffix specified here. + * Note: empty prefix is not allowed, please use regex instead. + * + * Examples: + * + * * *abc* matches the value *xyz.abc* + */ + 'suffix'?: (string); + /** + * The input string must match the regular expression specified here. + * The regex grammar is defined `here + * `_. + * + * Examples: + * + * * The regex ``\d{3}`` matches the value *123* + * * The regex ``\d{3}`` does not match the value *1234* + * * The regex ``\d{3}`` does not match the value *123.456* + * + * .. attention:: + * This field has been deprecated in favor of `safe_regex` as it is not safe for use with + * untrusted input in all cases. + */ + 'regex'?: (string); + /** + * The input string must match the regular expression specified here. + */ + 'safe_regex'?: (_envoy_type_matcher_RegexMatcher__Output); + /** + * If true, indicates the exact/prefix/suffix matching should be case insensitive. This has no + * effect for the safe_regex match. + * For example, the matcher *data* will match both input string *Data* and *data* if set to true. + */ + 'ignore_case': (boolean); + 'match_pattern': "exact"|"prefix"|"suffix"|"regex"|"safe_regex"; +} diff --git a/packages/grpc-js/src/generated/envoy/type/metadata/v2/MetadataKey.ts b/packages/grpc-js/src/generated/envoy/type/metadata/v2/MetadataKey.ts new file mode 100644 index 000000000..94d661879 --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/type/metadata/v2/MetadataKey.ts @@ -0,0 +1,108 @@ +// Original file: deps/envoy-api/envoy/type/metadata/v2/metadata.proto + + +/** + * Specifies the segment in a path to retrieve value from Metadata. + * Currently it is only supported to specify the key, i.e. field name, as one segment of a path. + */ +export interface _envoy_type_metadata_v2_MetadataKey_PathSegment { + /** + * If specified, use the key to retrieve the value in a Struct. + */ + 'key'?: (string); + 'segment'?: "key"; +} + +/** + * Specifies the segment in a path to retrieve value from Metadata. + * Currently it is only supported to specify the key, i.e. field name, as one segment of a path. + */ +export interface _envoy_type_metadata_v2_MetadataKey_PathSegment__Output { + /** + * If specified, use the key to retrieve the value in a Struct. + */ + 'key'?: (string); + 'segment': "key"; +} + +/** + * MetadataKey provides a general interface using `key` and `path` to retrieve value from + * :ref:`Metadata `. + * + * For example, for the following Metadata: + * + * .. code-block:: yaml + * + * filter_metadata: + * envoy.xxx: + * prop: + * foo: bar + * xyz: + * hello: envoy + * + * The following MetadataKey will retrieve a string value "bar" from the Metadata. + * + * .. code-block:: yaml + * + * key: envoy.xxx + * path: + * - key: prop + * - key: foo + */ +export interface MetadataKey { + /** + * The key name of Metadata to retrieve the Struct from the metadata. + * Typically, it represents a builtin subsystem or custom extension. + */ + 'key'?: (string); + /** + * The path to retrieve the Value from the Struct. It can be a prefix or a full path, + * e.g. ``[prop, xyz]`` for a struct or ``[prop, foo]`` for a string in the example, + * which depends on the particular scenario. + * + * Note: Due to that only the key type segment is supported, the path can not specify a list + * unless the list is the last segment. + */ + 'path'?: (_envoy_type_metadata_v2_MetadataKey_PathSegment)[]; +} + +/** + * MetadataKey provides a general interface using `key` and `path` to retrieve value from + * :ref:`Metadata `. + * + * For example, for the following Metadata: + * + * .. code-block:: yaml + * + * filter_metadata: + * envoy.xxx: + * prop: + * foo: bar + * xyz: + * hello: envoy + * + * The following MetadataKey will retrieve a string value "bar" from the Metadata. + * + * .. code-block:: yaml + * + * key: envoy.xxx + * path: + * - key: prop + * - key: foo + */ +export interface MetadataKey__Output { + /** + * The key name of Metadata to retrieve the Struct from the metadata. + * Typically, it represents a builtin subsystem or custom extension. + */ + 'key': (string); + /** + * The path to retrieve the Value from the Struct. It can be a prefix or a full path, + * e.g. ``[prop, xyz]`` for a struct or ``[prop, foo]`` for a string in the example, + * which depends on the particular scenario. + * + * Note: Due to that only the key type segment is supported, the path can not specify a list + * unless the list is the last segment. + */ + 'path': (_envoy_type_metadata_v2_MetadataKey_PathSegment__Output)[]; +} diff --git a/packages/grpc-js/src/generated/envoy/type/metadata/v2/MetadataKind.ts b/packages/grpc-js/src/generated/envoy/type/metadata/v2/MetadataKind.ts new file mode 100644 index 000000000..665b95f0d --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/type/metadata/v2/MetadataKind.ts @@ -0,0 +1,98 @@ +// Original file: deps/envoy-api/envoy/type/metadata/v2/metadata.proto + + +/** + * Represents metadata from :ref:`the upstream cluster`. + */ +export interface _envoy_type_metadata_v2_MetadataKind_Cluster { +} + +/** + * Represents metadata from :ref:`the upstream cluster`. + */ +export interface _envoy_type_metadata_v2_MetadataKind_Cluster__Output { +} + +/** + * Represents metadata from :ref:`the upstream + * host`. + */ +export interface _envoy_type_metadata_v2_MetadataKind_Host { +} + +/** + * Represents metadata from :ref:`the upstream + * host`. + */ +export interface _envoy_type_metadata_v2_MetadataKind_Host__Output { +} + +/** + * Represents dynamic metadata associated with the request. + */ +export interface _envoy_type_metadata_v2_MetadataKind_Request { +} + +/** + * Represents dynamic metadata associated with the request. + */ +export interface _envoy_type_metadata_v2_MetadataKind_Request__Output { +} + +/** + * Represents metadata from :ref:`the route`. + */ +export interface _envoy_type_metadata_v2_MetadataKind_Route { +} + +/** + * Represents metadata from :ref:`the route`. + */ +export interface _envoy_type_metadata_v2_MetadataKind_Route__Output { +} + +/** + * Describes what kind of metadata. + */ +export interface MetadataKind { + /** + * Request kind of metadata. + */ + 'request'?: (_envoy_type_metadata_v2_MetadataKind_Request); + /** + * Route kind of metadata. + */ + 'route'?: (_envoy_type_metadata_v2_MetadataKind_Route); + /** + * Cluster kind of metadata. + */ + 'cluster'?: (_envoy_type_metadata_v2_MetadataKind_Cluster); + /** + * Host kind of metadata. + */ + 'host'?: (_envoy_type_metadata_v2_MetadataKind_Host); + 'kind'?: "request"|"route"|"cluster"|"host"; +} + +/** + * Describes what kind of metadata. + */ +export interface MetadataKind__Output { + /** + * Request kind of metadata. + */ + 'request'?: (_envoy_type_metadata_v2_MetadataKind_Request__Output); + /** + * Route kind of metadata. + */ + 'route'?: (_envoy_type_metadata_v2_MetadataKind_Route__Output); + /** + * Cluster kind of metadata. + */ + 'cluster'?: (_envoy_type_metadata_v2_MetadataKind_Cluster__Output); + /** + * Host kind of metadata. + */ + 'host'?: (_envoy_type_metadata_v2_MetadataKind_Host__Output); + 'kind': "request"|"route"|"cluster"|"host"; +} diff --git a/packages/grpc-js/src/generated/envoy/type/tracing/v2/CustomTag.ts b/packages/grpc-js/src/generated/envoy/type/tracing/v2/CustomTag.ts new file mode 100644 index 000000000..75d33cf4a --- /dev/null +++ b/packages/grpc-js/src/generated/envoy/type/tracing/v2/CustomTag.ts @@ -0,0 +1,198 @@ +// Original file: deps/envoy-api/envoy/type/tracing/v2/custom_tag.proto + +import { MetadataKind as _envoy_type_metadata_v2_MetadataKind, MetadataKind__Output as _envoy_type_metadata_v2_MetadataKind__Output } from '../../../../envoy/type/metadata/v2/MetadataKind'; +import { MetadataKey as _envoy_type_metadata_v2_MetadataKey, MetadataKey__Output as _envoy_type_metadata_v2_MetadataKey__Output } from '../../../../envoy/type/metadata/v2/MetadataKey'; + +/** + * Environment type custom tag with environment name and default value. + */ +export interface _envoy_type_tracing_v2_CustomTag_Environment { + /** + * Environment variable name to obtain the value to populate the tag value. + */ + 'name'?: (string); + /** + * When the environment variable is not found, + * the tag value will be populated with this default value if specified, + * otherwise no tag will be populated. + */ + 'default_value'?: (string); +} + +/** + * Environment type custom tag with environment name and default value. + */ +export interface _envoy_type_tracing_v2_CustomTag_Environment__Output { + /** + * Environment variable name to obtain the value to populate the tag value. + */ + 'name': (string); + /** + * When the environment variable is not found, + * the tag value will be populated with this default value if specified, + * otherwise no tag will be populated. + */ + 'default_value': (string); +} + +/** + * Header type custom tag with header name and default value. + */ +export interface _envoy_type_tracing_v2_CustomTag_Header { + /** + * Header name to obtain the value to populate the tag value. + */ + 'name'?: (string); + /** + * When the header does not exist, + * the tag value will be populated with this default value if specified, + * otherwise no tag will be populated. + */ + 'default_value'?: (string); +} + +/** + * Header type custom tag with header name and default value. + */ +export interface _envoy_type_tracing_v2_CustomTag_Header__Output { + /** + * Header name to obtain the value to populate the tag value. + */ + 'name': (string); + /** + * When the header does not exist, + * the tag value will be populated with this default value if specified, + * otherwise no tag will be populated. + */ + 'default_value': (string); +} + +/** + * Literal type custom tag with static value for the tag value. + */ +export interface _envoy_type_tracing_v2_CustomTag_Literal { + /** + * Static literal value to populate the tag value. + */ + 'value'?: (string); +} + +/** + * Literal type custom tag with static value for the tag value. + */ +export interface _envoy_type_tracing_v2_CustomTag_Literal__Output { + /** + * Static literal value to populate the tag value. + */ + 'value': (string); +} + +/** + * Metadata type custom tag using + * :ref:`MetadataKey ` to retrieve the protobuf value + * from :ref:`Metadata `, and populate the tag value with + * `the canonical JSON `_ + * representation of it. + */ +export interface _envoy_type_tracing_v2_CustomTag_Metadata { + /** + * Specify what kind of metadata to obtain tag value from. + */ + 'kind'?: (_envoy_type_metadata_v2_MetadataKind); + /** + * Metadata key to define the path to retrieve the tag value. + */ + 'metadata_key'?: (_envoy_type_metadata_v2_MetadataKey); + /** + * When no valid metadata is found, + * the tag value would be populated with this default value if specified, + * otherwise no tag would be populated. + */ + 'default_value'?: (string); +} + +/** + * Metadata type custom tag using + * :ref:`MetadataKey ` to retrieve the protobuf value + * from :ref:`Metadata `, and populate the tag value with + * `the canonical JSON `_ + * representation of it. + */ +export interface _envoy_type_tracing_v2_CustomTag_Metadata__Output { + /** + * Specify what kind of metadata to obtain tag value from. + */ + 'kind'?: (_envoy_type_metadata_v2_MetadataKind__Output); + /** + * Metadata key to define the path to retrieve the tag value. + */ + 'metadata_key'?: (_envoy_type_metadata_v2_MetadataKey__Output); + /** + * When no valid metadata is found, + * the tag value would be populated with this default value if specified, + * otherwise no tag would be populated. + */ + 'default_value': (string); +} + +/** + * Describes custom tags for the active span. + * [#next-free-field: 6] + */ +export interface CustomTag { + /** + * Used to populate the tag name. + */ + 'tag'?: (string); + /** + * A literal custom tag. + */ + 'literal'?: (_envoy_type_tracing_v2_CustomTag_Literal); + /** + * An environment custom tag. + */ + 'environment'?: (_envoy_type_tracing_v2_CustomTag_Environment); + /** + * A request header custom tag. + */ + 'request_header'?: (_envoy_type_tracing_v2_CustomTag_Header); + /** + * A custom tag to obtain tag value from the metadata. + */ + 'metadata'?: (_envoy_type_tracing_v2_CustomTag_Metadata); + /** + * Used to specify what kind of custom tag. + */ + 'type'?: "literal"|"environment"|"request_header"|"metadata"; +} + +/** + * Describes custom tags for the active span. + * [#next-free-field: 6] + */ +export interface CustomTag__Output { + /** + * Used to populate the tag name. + */ + 'tag': (string); + /** + * A literal custom tag. + */ + 'literal'?: (_envoy_type_tracing_v2_CustomTag_Literal__Output); + /** + * An environment custom tag. + */ + 'environment'?: (_envoy_type_tracing_v2_CustomTag_Environment__Output); + /** + * A request header custom tag. + */ + 'request_header'?: (_envoy_type_tracing_v2_CustomTag_Header__Output); + /** + * A custom tag to obtain tag value from the metadata. + */ + 'metadata'?: (_envoy_type_tracing_v2_CustomTag_Metadata__Output); + /** + * Used to specify what kind of custom tag. + */ + 'type': "literal"|"environment"|"request_header"|"metadata"; +} diff --git a/packages/grpc-js/src/generated/google/api/CustomHttpPattern.ts b/packages/grpc-js/src/generated/google/api/CustomHttpPattern.ts new file mode 100644 index 000000000..2b6490be6 --- /dev/null +++ b/packages/grpc-js/src/generated/google/api/CustomHttpPattern.ts @@ -0,0 +1,30 @@ +// Original file: deps/googleapis/google/api/http.proto + + +/** + * A custom pattern is used for defining custom HTTP verb. + */ +export interface CustomHttpPattern { + /** + * The name of this custom HTTP verb. + */ + 'kind'?: (string); + /** + * The path matched by this custom verb. + */ + 'path'?: (string); +} + +/** + * A custom pattern is used for defining custom HTTP verb. + */ +export interface CustomHttpPattern__Output { + /** + * The name of this custom HTTP verb. + */ + 'kind': (string); + /** + * The path matched by this custom verb. + */ + 'path': (string); +} diff --git a/packages/grpc-js/src/generated/google/api/Http.ts b/packages/grpc-js/src/generated/google/api/Http.ts new file mode 100644 index 000000000..038c57e5e --- /dev/null +++ b/packages/grpc-js/src/generated/google/api/Http.ts @@ -0,0 +1,49 @@ +// Original file: deps/googleapis/google/api/http.proto + +import { HttpRule as _google_api_HttpRule, HttpRule__Output as _google_api_HttpRule__Output } from '../../google/api/HttpRule'; + +/** + * Defines the HTTP configuration for an API service. It contains a list of + * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method + * to one or more HTTP REST API methods. + */ +export interface Http { + /** + * A list of HTTP configuration rules that apply to individual API methods. + * + * **NOTE:** All service configuration rules follow "last one wins" order. + */ + 'rules'?: (_google_api_HttpRule)[]; + /** + * When set to true, URL path parameters will be fully URI-decoded except in + * cases of single segment matches in reserved expansion, where "%2F" will be + * left encoded. + * + * The default behavior is to not decode RFC 6570 reserved characters in multi + * segment matches. + */ + 'fully_decode_reserved_expansion'?: (boolean); +} + +/** + * Defines the HTTP configuration for an API service. It contains a list of + * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method + * to one or more HTTP REST API methods. + */ +export interface Http__Output { + /** + * A list of HTTP configuration rules that apply to individual API methods. + * + * **NOTE:** All service configuration rules follow "last one wins" order. + */ + 'rules': (_google_api_HttpRule__Output)[]; + /** + * When set to true, URL path parameters will be fully URI-decoded except in + * cases of single segment matches in reserved expansion, where "%2F" will be + * left encoded. + * + * The default behavior is to not decode RFC 6570 reserved characters in multi + * segment matches. + */ + 'fully_decode_reserved_expansion': (boolean); +} diff --git a/packages/grpc-js/src/generated/google/api/HttpRule.ts b/packages/grpc-js/src/generated/google/api/HttpRule.ts new file mode 100644 index 000000000..ed9921e5e --- /dev/null +++ b/packages/grpc-js/src/generated/google/api/HttpRule.ts @@ -0,0 +1,680 @@ +// Original file: deps/googleapis/google/api/http.proto + +import { CustomHttpPattern as _google_api_CustomHttpPattern, CustomHttpPattern__Output as _google_api_CustomHttpPattern__Output } from '../../google/api/CustomHttpPattern'; +import { HttpRule as _google_api_HttpRule, HttpRule__Output as _google_api_HttpRule__Output } from '../../google/api/HttpRule'; + +/** + * # gRPC Transcoding + * + * gRPC Transcoding is a feature for mapping between a gRPC method and one or + * more HTTP REST endpoints. It allows developers to build a single API service + * that supports both gRPC APIs and REST APIs. Many systems, including [Google + * APIs](https://github.com/googleapis/googleapis), + * [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC + * Gateway](https://github.com/grpc-ecosystem/grpc-gateway), + * and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature + * and use it for large scale production services. + * + * `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies + * how different portions of the gRPC request message are mapped to the URL + * path, URL query parameters, and HTTP request body. It also controls how the + * gRPC response message is mapped to the HTTP response body. `HttpRule` is + * typically specified as an `google.api.http` annotation on the gRPC method. + * + * Each mapping specifies a URL path template and an HTTP method. The path + * template may refer to one or more fields in the gRPC request message, as long + * as each field is a non-repeated field with a primitive (non-message) type. + * The path template controls how fields of the request message are mapped to + * the URL path. + * + * Example: + * + * service Messaging { + * rpc GetMessage(GetMessageRequest) returns (Message) { + * option (google.api.http) = { + * get: "/v1/{name=messages/*}" + * }; + * } + * } + * message GetMessageRequest { + * string name = 1; // Mapped to URL path. + * } + * message Message { + * string text = 1; // The resource content. + * } + * + * This enables an HTTP REST to gRPC mapping as below: + * + * HTTP | gRPC + * -----|----- + * `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` + * + * Any fields in the request message which are not bound by the path template + * automatically become HTTP query parameters if there is no HTTP request body. + * For example: + * + * service Messaging { + * rpc GetMessage(GetMessageRequest) returns (Message) { + * option (google.api.http) = { + * get:"/v1/messages/{message_id}" + * }; + * } + * } + * message GetMessageRequest { + * message SubMessage { + * string subfield = 1; + * } + * string message_id = 1; // Mapped to URL path. + * int64 revision = 2; // Mapped to URL query parameter `revision`. + * SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. + * } + * + * This enables a HTTP JSON to RPC mapping as below: + * + * HTTP | gRPC + * -----|----- + * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | + * `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: + * "foo"))` + * + * Note that fields which are mapped to URL query parameters must have a + * primitive type or a repeated primitive type or a non-repeated message type. + * In the case of a repeated type, the parameter can be repeated in the URL + * as `...?param=A¶m=B`. In the case of a message type, each field of the + * message is mapped to a separate parameter, such as + * `...?foo.a=A&foo.b=B&foo.c=C`. + * + * For HTTP methods that allow a request body, the `body` field + * specifies the mapping. Consider a REST update method on the + * message resource collection: + * + * service Messaging { + * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { + * option (google.api.http) = { + * patch: "/v1/messages/{message_id}" + * body: "message" + * }; + * } + * } + * message UpdateMessageRequest { + * string message_id = 1; // mapped to the URL + * Message message = 2; // mapped to the body + * } + * + * The following HTTP JSON to RPC mapping is enabled, where the + * representation of the JSON in the request body is determined by + * protos JSON encoding: + * + * HTTP | gRPC + * -----|----- + * `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: + * "123456" message { text: "Hi!" })` + * + * The special name `*` can be used in the body mapping to define that + * every field not bound by the path template should be mapped to the + * request body. This enables the following alternative definition of + * the update method: + * + * service Messaging { + * rpc UpdateMessage(Message) returns (Message) { + * option (google.api.http) = { + * patch: "/v1/messages/{message_id}" + * body: "*" + * }; + * } + * } + * message Message { + * string message_id = 1; + * string text = 2; + * } + * + * + * The following HTTP JSON to RPC mapping is enabled: + * + * HTTP | gRPC + * -----|----- + * `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: + * "123456" text: "Hi!")` + * + * Note that when using `*` in the body mapping, it is not possible to + * have HTTP parameters, as all fields not bound by the path end in + * the body. This makes this option more rarely used in practice when + * defining REST APIs. The common usage of `*` is in custom methods + * which don't use the URL at all for transferring data. + * + * It is possible to define multiple HTTP methods for one RPC by using + * the `additional_bindings` option. Example: + * + * service Messaging { + * rpc GetMessage(GetMessageRequest) returns (Message) { + * option (google.api.http) = { + * get: "/v1/messages/{message_id}" + * additional_bindings { + * get: "/v1/users/{user_id}/messages/{message_id}" + * } + * }; + * } + * } + * message GetMessageRequest { + * string message_id = 1; + * string user_id = 2; + * } + * + * This enables the following two alternative HTTP JSON to RPC mappings: + * + * HTTP | gRPC + * -----|----- + * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` + * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: + * "123456")` + * + * ## Rules for HTTP mapping + * + * 1. Leaf request fields (recursive expansion nested messages in the request + * message) are classified into three categories: + * - Fields referred by the path template. They are passed via the URL path. + * - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They are passed via the HTTP + * request body. + * - All other fields are passed via the URL query parameters, and the + * parameter name is the field path in the request message. A repeated + * field can be represented as multiple query parameters under the same + * name. + * 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL query parameter, all fields + * are passed via URL path and HTTP request body. + * 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP request body, all + * fields are passed via URL path and URL query parameters. + * + * ### Path template syntax + * + * Template = "/" Segments [ Verb ] ; + * Segments = Segment { "/" Segment } ; + * Segment = "*" | "**" | LITERAL | Variable ; + * Variable = "{" FieldPath [ "=" Segments ] "}" ; + * FieldPath = IDENT { "." IDENT } ; + * Verb = ":" LITERAL ; + * + * The syntax `*` matches a single URL path segment. The syntax `**` matches + * zero or more URL path segments, which must be the last part of the URL path + * except the `Verb`. + * + * The syntax `Variable` matches part of the URL path as specified by its + * template. A variable template must not contain other variables. If a variable + * matches a single path segment, its template may be omitted, e.g. `{var}` + * is equivalent to `{var=*}`. + * + * The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` + * contains any reserved character, such characters should be percent-encoded + * before the matching. + * + * If a variable contains exactly one path segment, such as `"{var}"` or + * `"{var=*}"`, when such a variable is expanded into a URL path on the client + * side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The + * server side does the reverse decoding. Such variables show up in the + * [Discovery + * Document](https://developers.google.com/discovery/v1/reference/apis) as + * `{var}`. + * + * If a variable contains multiple path segments, such as `"{var=foo/*}"` + * or `"{var=**}"`, when such a variable is expanded into a URL path on the + * client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. + * The server side does the reverse decoding, except "%2F" and "%2f" are left + * unchanged. Such variables show up in the + * [Discovery + * Document](https://developers.google.com/discovery/v1/reference/apis) as + * `{+var}`. + * + * ## Using gRPC API Service Configuration + * + * gRPC API Service Configuration (service config) is a configuration language + * for configuring a gRPC service to become a user-facing product. The + * service config is simply the YAML representation of the `google.api.Service` + * proto message. + * + * As an alternative to annotating your proto file, you can configure gRPC + * transcoding in your service config YAML files. You do this by specifying a + * `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same + * effect as the proto annotation. This can be particularly useful if you + * have a proto that is reused in multiple services. Note that any transcoding + * specified in the service config will override any matching transcoding + * configuration in the proto. + * + * Example: + * + * http: + * rules: + * # Selects a gRPC method and applies HttpRule to it. + * - selector: example.v1.Messaging.GetMessage + * get: /v1/messages/{message_id}/{sub.subfield} + * + * ## Special notes + * + * When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the + * proto to JSON conversion must follow the [proto3 + * specification](https://developers.google.com/protocol-buffers/docs/proto3#json). + * + * While the single segment variable follows the semantics of + * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String + * Expansion, the multi segment variable **does not** follow RFC 6570 Section + * 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion + * does not expand special characters like `?` and `#`, which would lead + * to invalid URLs. As the result, gRPC Transcoding uses a custom encoding + * for multi segment variables. + * + * The path variables **must not** refer to any repeated or mapped field, + * because client libraries are not capable of handling such variable expansion. + * + * The path variables **must not** capture the leading "/" character. The reason + * is that the most common use case "{var}" does not capture the leading "/" + * character. For consistency, all path variables must share the same behavior. + * + * Repeated message fields must not be mapped to URL query parameters, because + * no client library can support such complicated mapping. + * + * If an API needs to use a JSON array for request or response body, it can map + * the request or response body to a repeated field. However, some gRPC + * Transcoding implementations may not support this feature. + */ +export interface HttpRule { + /** + * Selects a method to which this rule applies. + * + * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. + */ + 'selector'?: (string); + /** + * Maps to HTTP GET. Used for listing and getting information about + * resources. + */ + 'get'?: (string); + /** + * Maps to HTTP PUT. Used for replacing a resource. + */ + 'put'?: (string); + /** + * Maps to HTTP POST. Used for creating a resource or performing an action. + */ + 'post'?: (string); + /** + * Maps to HTTP DELETE. Used for deleting a resource. + */ + 'delete'?: (string); + /** + * Maps to HTTP PATCH. Used for updating a resource. + */ + 'patch'?: (string); + /** + * The name of the request field whose value is mapped to the HTTP request + * body, or `*` for mapping all request fields not captured by the path + * pattern to the HTTP body, or omitted for not having any HTTP request body. + * + * NOTE: the referred field must be present at the top-level of the request + * message type. + */ + 'body'?: (string); + /** + * The custom pattern is used for specifying an HTTP method that is not + * included in the `pattern` field, such as HEAD, or "*" to leave the + * HTTP method unspecified for this rule. The wild-card rule is useful + * for services that provide content to Web (HTML) clients. + */ + 'custom'?: (_google_api_CustomHttpPattern); + /** + * Additional HTTP bindings for the selector. Nested bindings must + * not contain an `additional_bindings` field themselves (that is, + * the nesting may only be one level deep). + */ + 'additional_bindings'?: (_google_api_HttpRule)[]; + /** + * Optional. The name of the response field whose value is mapped to the HTTP + * response body. When omitted, the entire response message will be used + * as the HTTP response body. + * + * NOTE: The referred field must be present at the top-level of the response + * message type. + */ + 'response_body'?: (string); + /** + * Determines the URL pattern is matched by this rules. This pattern can be + * used with any of the {get|put|post|delete|patch} methods. A custom method + * can be defined using the 'custom' field. + */ + 'pattern'?: "get"|"put"|"post"|"delete"|"patch"|"custom"; +} + +/** + * # gRPC Transcoding + * + * gRPC Transcoding is a feature for mapping between a gRPC method and one or + * more HTTP REST endpoints. It allows developers to build a single API service + * that supports both gRPC APIs and REST APIs. Many systems, including [Google + * APIs](https://github.com/googleapis/googleapis), + * [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC + * Gateway](https://github.com/grpc-ecosystem/grpc-gateway), + * and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature + * and use it for large scale production services. + * + * `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies + * how different portions of the gRPC request message are mapped to the URL + * path, URL query parameters, and HTTP request body. It also controls how the + * gRPC response message is mapped to the HTTP response body. `HttpRule` is + * typically specified as an `google.api.http` annotation on the gRPC method. + * + * Each mapping specifies a URL path template and an HTTP method. The path + * template may refer to one or more fields in the gRPC request message, as long + * as each field is a non-repeated field with a primitive (non-message) type. + * The path template controls how fields of the request message are mapped to + * the URL path. + * + * Example: + * + * service Messaging { + * rpc GetMessage(GetMessageRequest) returns (Message) { + * option (google.api.http) = { + * get: "/v1/{name=messages/*}" + * }; + * } + * } + * message GetMessageRequest { + * string name = 1; // Mapped to URL path. + * } + * message Message { + * string text = 1; // The resource content. + * } + * + * This enables an HTTP REST to gRPC mapping as below: + * + * HTTP | gRPC + * -----|----- + * `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` + * + * Any fields in the request message which are not bound by the path template + * automatically become HTTP query parameters if there is no HTTP request body. + * For example: + * + * service Messaging { + * rpc GetMessage(GetMessageRequest) returns (Message) { + * option (google.api.http) = { + * get:"/v1/messages/{message_id}" + * }; + * } + * } + * message GetMessageRequest { + * message SubMessage { + * string subfield = 1; + * } + * string message_id = 1; // Mapped to URL path. + * int64 revision = 2; // Mapped to URL query parameter `revision`. + * SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. + * } + * + * This enables a HTTP JSON to RPC mapping as below: + * + * HTTP | gRPC + * -----|----- + * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | + * `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: + * "foo"))` + * + * Note that fields which are mapped to URL query parameters must have a + * primitive type or a repeated primitive type or a non-repeated message type. + * In the case of a repeated type, the parameter can be repeated in the URL + * as `...?param=A¶m=B`. In the case of a message type, each field of the + * message is mapped to a separate parameter, such as + * `...?foo.a=A&foo.b=B&foo.c=C`. + * + * For HTTP methods that allow a request body, the `body` field + * specifies the mapping. Consider a REST update method on the + * message resource collection: + * + * service Messaging { + * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { + * option (google.api.http) = { + * patch: "/v1/messages/{message_id}" + * body: "message" + * }; + * } + * } + * message UpdateMessageRequest { + * string message_id = 1; // mapped to the URL + * Message message = 2; // mapped to the body + * } + * + * The following HTTP JSON to RPC mapping is enabled, where the + * representation of the JSON in the request body is determined by + * protos JSON encoding: + * + * HTTP | gRPC + * -----|----- + * `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: + * "123456" message { text: "Hi!" })` + * + * The special name `*` can be used in the body mapping to define that + * every field not bound by the path template should be mapped to the + * request body. This enables the following alternative definition of + * the update method: + * + * service Messaging { + * rpc UpdateMessage(Message) returns (Message) { + * option (google.api.http) = { + * patch: "/v1/messages/{message_id}" + * body: "*" + * }; + * } + * } + * message Message { + * string message_id = 1; + * string text = 2; + * } + * + * + * The following HTTP JSON to RPC mapping is enabled: + * + * HTTP | gRPC + * -----|----- + * `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: + * "123456" text: "Hi!")` + * + * Note that when using `*` in the body mapping, it is not possible to + * have HTTP parameters, as all fields not bound by the path end in + * the body. This makes this option more rarely used in practice when + * defining REST APIs. The common usage of `*` is in custom methods + * which don't use the URL at all for transferring data. + * + * It is possible to define multiple HTTP methods for one RPC by using + * the `additional_bindings` option. Example: + * + * service Messaging { + * rpc GetMessage(GetMessageRequest) returns (Message) { + * option (google.api.http) = { + * get: "/v1/messages/{message_id}" + * additional_bindings { + * get: "/v1/users/{user_id}/messages/{message_id}" + * } + * }; + * } + * } + * message GetMessageRequest { + * string message_id = 1; + * string user_id = 2; + * } + * + * This enables the following two alternative HTTP JSON to RPC mappings: + * + * HTTP | gRPC + * -----|----- + * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` + * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: + * "123456")` + * + * ## Rules for HTTP mapping + * + * 1. Leaf request fields (recursive expansion nested messages in the request + * message) are classified into three categories: + * - Fields referred by the path template. They are passed via the URL path. + * - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They are passed via the HTTP + * request body. + * - All other fields are passed via the URL query parameters, and the + * parameter name is the field path in the request message. A repeated + * field can be represented as multiple query parameters under the same + * name. + * 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL query parameter, all fields + * are passed via URL path and HTTP request body. + * 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP request body, all + * fields are passed via URL path and URL query parameters. + * + * ### Path template syntax + * + * Template = "/" Segments [ Verb ] ; + * Segments = Segment { "/" Segment } ; + * Segment = "*" | "**" | LITERAL | Variable ; + * Variable = "{" FieldPath [ "=" Segments ] "}" ; + * FieldPath = IDENT { "." IDENT } ; + * Verb = ":" LITERAL ; + * + * The syntax `*` matches a single URL path segment. The syntax `**` matches + * zero or more URL path segments, which must be the last part of the URL path + * except the `Verb`. + * + * The syntax `Variable` matches part of the URL path as specified by its + * template. A variable template must not contain other variables. If a variable + * matches a single path segment, its template may be omitted, e.g. `{var}` + * is equivalent to `{var=*}`. + * + * The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` + * contains any reserved character, such characters should be percent-encoded + * before the matching. + * + * If a variable contains exactly one path segment, such as `"{var}"` or + * `"{var=*}"`, when such a variable is expanded into a URL path on the client + * side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The + * server side does the reverse decoding. Such variables show up in the + * [Discovery + * Document](https://developers.google.com/discovery/v1/reference/apis) as + * `{var}`. + * + * If a variable contains multiple path segments, such as `"{var=foo/*}"` + * or `"{var=**}"`, when such a variable is expanded into a URL path on the + * client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. + * The server side does the reverse decoding, except "%2F" and "%2f" are left + * unchanged. Such variables show up in the + * [Discovery + * Document](https://developers.google.com/discovery/v1/reference/apis) as + * `{+var}`. + * + * ## Using gRPC API Service Configuration + * + * gRPC API Service Configuration (service config) is a configuration language + * for configuring a gRPC service to become a user-facing product. The + * service config is simply the YAML representation of the `google.api.Service` + * proto message. + * + * As an alternative to annotating your proto file, you can configure gRPC + * transcoding in your service config YAML files. You do this by specifying a + * `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same + * effect as the proto annotation. This can be particularly useful if you + * have a proto that is reused in multiple services. Note that any transcoding + * specified in the service config will override any matching transcoding + * configuration in the proto. + * + * Example: + * + * http: + * rules: + * # Selects a gRPC method and applies HttpRule to it. + * - selector: example.v1.Messaging.GetMessage + * get: /v1/messages/{message_id}/{sub.subfield} + * + * ## Special notes + * + * When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the + * proto to JSON conversion must follow the [proto3 + * specification](https://developers.google.com/protocol-buffers/docs/proto3#json). + * + * While the single segment variable follows the semantics of + * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String + * Expansion, the multi segment variable **does not** follow RFC 6570 Section + * 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion + * does not expand special characters like `?` and `#`, which would lead + * to invalid URLs. As the result, gRPC Transcoding uses a custom encoding + * for multi segment variables. + * + * The path variables **must not** refer to any repeated or mapped field, + * because client libraries are not capable of handling such variable expansion. + * + * The path variables **must not** capture the leading "/" character. The reason + * is that the most common use case "{var}" does not capture the leading "/" + * character. For consistency, all path variables must share the same behavior. + * + * Repeated message fields must not be mapped to URL query parameters, because + * no client library can support such complicated mapping. + * + * If an API needs to use a JSON array for request or response body, it can map + * the request or response body to a repeated field. However, some gRPC + * Transcoding implementations may not support this feature. + */ +export interface HttpRule__Output { + /** + * Selects a method to which this rule applies. + * + * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. + */ + 'selector': (string); + /** + * Maps to HTTP GET. Used for listing and getting information about + * resources. + */ + 'get'?: (string); + /** + * Maps to HTTP PUT. Used for replacing a resource. + */ + 'put'?: (string); + /** + * Maps to HTTP POST. Used for creating a resource or performing an action. + */ + 'post'?: (string); + /** + * Maps to HTTP DELETE. Used for deleting a resource. + */ + 'delete'?: (string); + /** + * Maps to HTTP PATCH. Used for updating a resource. + */ + 'patch'?: (string); + /** + * The name of the request field whose value is mapped to the HTTP request + * body, or `*` for mapping all request fields not captured by the path + * pattern to the HTTP body, or omitted for not having any HTTP request body. + * + * NOTE: the referred field must be present at the top-level of the request + * message type. + */ + 'body': (string); + /** + * The custom pattern is used for specifying an HTTP method that is not + * included in the `pattern` field, such as HEAD, or "*" to leave the + * HTTP method unspecified for this rule. The wild-card rule is useful + * for services that provide content to Web (HTML) clients. + */ + 'custom'?: (_google_api_CustomHttpPattern__Output); + /** + * Additional HTTP bindings for the selector. Nested bindings must + * not contain an `additional_bindings` field themselves (that is, + * the nesting may only be one level deep). + */ + 'additional_bindings': (_google_api_HttpRule__Output)[]; + /** + * Optional. The name of the response field whose value is mapped to the HTTP + * response body. When omitted, the entire response message will be used + * as the HTTP response body. + * + * NOTE: The referred field must be present at the top-level of the response + * message type. + */ + 'response_body': (string); + /** + * Determines the URL pattern is matched by this rules. This pattern can be + * used with any of the {get|put|post|delete|patch} methods. A custom method + * can be defined using the 'custom' field. + */ + 'pattern': "get"|"put"|"post"|"delete"|"patch"|"custom"; +} diff --git a/packages/grpc-js/src/generated/google/protobuf/Any.ts b/packages/grpc-js/src/generated/google/protobuf/Any.ts new file mode 100644 index 000000000..b592af4ba --- /dev/null +++ b/packages/grpc-js/src/generated/google/protobuf/Any.ts @@ -0,0 +1,13 @@ +// Original file: null + +import { AnyExtension } from '@grpc/proto-loader'; + +export type Any = AnyExtension | { + type_url: string; + value: Buffer | Uint8Array | string; +} + +export type Any__Output = AnyExtension | { + type_url: string; + value: Buffer; +} diff --git a/packages/grpc-js/src/generated/google/protobuf/BoolValue.ts b/packages/grpc-js/src/generated/google/protobuf/BoolValue.ts new file mode 100644 index 000000000..86507eaf1 --- /dev/null +++ b/packages/grpc-js/src/generated/google/protobuf/BoolValue.ts @@ -0,0 +1,10 @@ +// Original file: null + + +export interface BoolValue { + 'value'?: (boolean); +} + +export interface BoolValue__Output { + 'value': (boolean); +} diff --git a/packages/grpc-js/src/generated/google/protobuf/BytesValue.ts b/packages/grpc-js/src/generated/google/protobuf/BytesValue.ts new file mode 100644 index 000000000..9cec76f71 --- /dev/null +++ b/packages/grpc-js/src/generated/google/protobuf/BytesValue.ts @@ -0,0 +1,10 @@ +// Original file: null + + +export interface BytesValue { + 'value'?: (Buffer | Uint8Array | string); +} + +export interface BytesValue__Output { + 'value': (Buffer); +} diff --git a/packages/grpc-js/src/generated/google/protobuf/DescriptorProto.ts b/packages/grpc-js/src/generated/google/protobuf/DescriptorProto.ts new file mode 100644 index 000000000..8ab286897 --- /dev/null +++ b/packages/grpc-js/src/generated/google/protobuf/DescriptorProto.ts @@ -0,0 +1,53 @@ +// Original file: null + +import { FieldDescriptorProto as _google_protobuf_FieldDescriptorProto, FieldDescriptorProto__Output as _google_protobuf_FieldDescriptorProto__Output } from '../../google/protobuf/FieldDescriptorProto'; +import { DescriptorProto as _google_protobuf_DescriptorProto, DescriptorProto__Output as _google_protobuf_DescriptorProto__Output } from '../../google/protobuf/DescriptorProto'; +import { EnumDescriptorProto as _google_protobuf_EnumDescriptorProto, EnumDescriptorProto__Output as _google_protobuf_EnumDescriptorProto__Output } from '../../google/protobuf/EnumDescriptorProto'; +import { MessageOptions as _google_protobuf_MessageOptions, MessageOptions__Output as _google_protobuf_MessageOptions__Output } from '../../google/protobuf/MessageOptions'; +import { OneofDescriptorProto as _google_protobuf_OneofDescriptorProto, OneofDescriptorProto__Output as _google_protobuf_OneofDescriptorProto__Output } from '../../google/protobuf/OneofDescriptorProto'; + +export interface _google_protobuf_DescriptorProto_ExtensionRange { + 'start'?: (number); + 'end'?: (number); +} + +export interface _google_protobuf_DescriptorProto_ExtensionRange__Output { + 'start': (number); + 'end': (number); +} + +export interface _google_protobuf_DescriptorProto_ReservedRange { + 'start'?: (number); + 'end'?: (number); +} + +export interface _google_protobuf_DescriptorProto_ReservedRange__Output { + 'start': (number); + 'end': (number); +} + +export interface DescriptorProto { + 'name'?: (string); + 'field'?: (_google_protobuf_FieldDescriptorProto)[]; + 'nestedType'?: (_google_protobuf_DescriptorProto)[]; + 'enumType'?: (_google_protobuf_EnumDescriptorProto)[]; + 'extensionRange'?: (_google_protobuf_DescriptorProto_ExtensionRange)[]; + 'extension'?: (_google_protobuf_FieldDescriptorProto)[]; + 'options'?: (_google_protobuf_MessageOptions); + 'oneofDecl'?: (_google_protobuf_OneofDescriptorProto)[]; + 'reservedRange'?: (_google_protobuf_DescriptorProto_ReservedRange)[]; + 'reservedName'?: (string)[]; +} + +export interface DescriptorProto__Output { + 'name': (string); + 'field': (_google_protobuf_FieldDescriptorProto__Output)[]; + 'nestedType': (_google_protobuf_DescriptorProto__Output)[]; + 'enumType': (_google_protobuf_EnumDescriptorProto__Output)[]; + 'extensionRange': (_google_protobuf_DescriptorProto_ExtensionRange__Output)[]; + 'extension': (_google_protobuf_FieldDescriptorProto__Output)[]; + 'options'?: (_google_protobuf_MessageOptions__Output); + 'oneofDecl': (_google_protobuf_OneofDescriptorProto__Output)[]; + 'reservedRange': (_google_protobuf_DescriptorProto_ReservedRange__Output)[]; + 'reservedName': (string)[]; +} diff --git a/packages/grpc-js/src/generated/google/protobuf/DoubleValue.ts b/packages/grpc-js/src/generated/google/protobuf/DoubleValue.ts new file mode 100644 index 000000000..e4f2eb4b8 --- /dev/null +++ b/packages/grpc-js/src/generated/google/protobuf/DoubleValue.ts @@ -0,0 +1,10 @@ +// Original file: null + + +export interface DoubleValue { + 'value'?: (number | string); +} + +export interface DoubleValue__Output { + 'value': (number | string); +} diff --git a/packages/grpc-js/src/generated/google/protobuf/Duration.ts b/packages/grpc-js/src/generated/google/protobuf/Duration.ts new file mode 100644 index 000000000..78610b80a --- /dev/null +++ b/packages/grpc-js/src/generated/google/protobuf/Duration.ts @@ -0,0 +1,13 @@ +// Original file: null + +import { Long } from '@grpc/proto-loader'; + +export interface Duration { + 'seconds'?: (number | string | Long); + 'nanos'?: (number); +} + +export interface Duration__Output { + 'seconds': (string); + 'nanos': (number); +} diff --git a/packages/grpc-js/src/generated/google/protobuf/Empty.ts b/packages/grpc-js/src/generated/google/protobuf/Empty.ts new file mode 100644 index 000000000..f32c2a284 --- /dev/null +++ b/packages/grpc-js/src/generated/google/protobuf/Empty.ts @@ -0,0 +1,8 @@ +// Original file: null + + +export interface Empty { +} + +export interface Empty__Output { +} diff --git a/packages/grpc-js/src/generated/google/protobuf/EnumDescriptorProto.ts b/packages/grpc-js/src/generated/google/protobuf/EnumDescriptorProto.ts new file mode 100644 index 000000000..1971fccb0 --- /dev/null +++ b/packages/grpc-js/src/generated/google/protobuf/EnumDescriptorProto.ts @@ -0,0 +1,16 @@ +// Original file: null + +import { EnumValueDescriptorProto as _google_protobuf_EnumValueDescriptorProto, EnumValueDescriptorProto__Output as _google_protobuf_EnumValueDescriptorProto__Output } from '../../google/protobuf/EnumValueDescriptorProto'; +import { EnumOptions as _google_protobuf_EnumOptions, EnumOptions__Output as _google_protobuf_EnumOptions__Output } from '../../google/protobuf/EnumOptions'; + +export interface EnumDescriptorProto { + 'name'?: (string); + 'value'?: (_google_protobuf_EnumValueDescriptorProto)[]; + 'options'?: (_google_protobuf_EnumOptions); +} + +export interface EnumDescriptorProto__Output { + 'name': (string); + 'value': (_google_protobuf_EnumValueDescriptorProto__Output)[]; + 'options'?: (_google_protobuf_EnumOptions__Output); +} diff --git a/packages/grpc-js/src/generated/google/protobuf/EnumOptions.ts b/packages/grpc-js/src/generated/google/protobuf/EnumOptions.ts new file mode 100644 index 000000000..a4f3b7a45 --- /dev/null +++ b/packages/grpc-js/src/generated/google/protobuf/EnumOptions.ts @@ -0,0 +1,18 @@ +// Original file: null + +import { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption'; +import { MigrateAnnotation as _udpa_annotations_MigrateAnnotation, MigrateAnnotation__Output as _udpa_annotations_MigrateAnnotation__Output } from '../../udpa/annotations/MigrateAnnotation'; + +export interface EnumOptions { + 'allowAlias'?: (boolean); + 'deprecated'?: (boolean); + 'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[]; + '.udpa.annotations.enum_migrate'?: (_udpa_annotations_MigrateAnnotation); +} + +export interface EnumOptions__Output { + 'allowAlias': (boolean); + 'deprecated': (boolean); + 'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[]; + '.udpa.annotations.enum_migrate'?: (_udpa_annotations_MigrateAnnotation__Output); +} diff --git a/packages/grpc-js/src/generated/google/protobuf/EnumValueDescriptorProto.ts b/packages/grpc-js/src/generated/google/protobuf/EnumValueDescriptorProto.ts new file mode 100644 index 000000000..919b7aa38 --- /dev/null +++ b/packages/grpc-js/src/generated/google/protobuf/EnumValueDescriptorProto.ts @@ -0,0 +1,15 @@ +// Original file: null + +import { EnumValueOptions as _google_protobuf_EnumValueOptions, EnumValueOptions__Output as _google_protobuf_EnumValueOptions__Output } from '../../google/protobuf/EnumValueOptions'; + +export interface EnumValueDescriptorProto { + 'name'?: (string); + 'number'?: (number); + 'options'?: (_google_protobuf_EnumValueOptions); +} + +export interface EnumValueDescriptorProto__Output { + 'name': (string); + 'number': (number); + 'options'?: (_google_protobuf_EnumValueOptions__Output); +} diff --git a/packages/grpc-js/src/generated/google/protobuf/EnumValueOptions.ts b/packages/grpc-js/src/generated/google/protobuf/EnumValueOptions.ts new file mode 100644 index 000000000..0fac2df8f --- /dev/null +++ b/packages/grpc-js/src/generated/google/protobuf/EnumValueOptions.ts @@ -0,0 +1,18 @@ +// Original file: null + +import { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption'; +import { MigrateAnnotation as _udpa_annotations_MigrateAnnotation, MigrateAnnotation__Output as _udpa_annotations_MigrateAnnotation__Output } from '../../udpa/annotations/MigrateAnnotation'; + +export interface EnumValueOptions { + 'deprecated'?: (boolean); + 'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[]; + '.envoy.annotations.disallowed_by_default_enum'?: (boolean); + '.udpa.annotations.enum_value_migrate'?: (_udpa_annotations_MigrateAnnotation); +} + +export interface EnumValueOptions__Output { + 'deprecated': (boolean); + 'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[]; + '.envoy.annotations.disallowed_by_default_enum': (boolean); + '.udpa.annotations.enum_value_migrate'?: (_udpa_annotations_MigrateAnnotation__Output); +} diff --git a/packages/grpc-js/src/generated/google/protobuf/FieldDescriptorProto.ts b/packages/grpc-js/src/generated/google/protobuf/FieldDescriptorProto.ts new file mode 100644 index 000000000..e0a1f4580 --- /dev/null +++ b/packages/grpc-js/src/generated/google/protobuf/FieldDescriptorProto.ts @@ -0,0 +1,60 @@ +// Original file: null + +import { FieldOptions as _google_protobuf_FieldOptions, FieldOptions__Output as _google_protobuf_FieldOptions__Output } from '../../google/protobuf/FieldOptions'; + +// Original file: null + +export enum _google_protobuf_FieldDescriptorProto_Label { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3, +} + +// Original file: null + +export enum _google_protobuf_FieldDescriptorProto_Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18, +} + +export interface FieldDescriptorProto { + 'name'?: (string); + 'extendee'?: (string); + 'number'?: (number); + 'label'?: (_google_protobuf_FieldDescriptorProto_Label | keyof typeof _google_protobuf_FieldDescriptorProto_Label); + 'type'?: (_google_protobuf_FieldDescriptorProto_Type | keyof typeof _google_protobuf_FieldDescriptorProto_Type); + 'typeName'?: (string); + 'defaultValue'?: (string); + 'options'?: (_google_protobuf_FieldOptions); + 'oneofIndex'?: (number); + 'jsonName'?: (string); +} + +export interface FieldDescriptorProto__Output { + 'name': (string); + 'extendee': (string); + 'number': (number); + 'label': (keyof typeof _google_protobuf_FieldDescriptorProto_Label); + 'type': (keyof typeof _google_protobuf_FieldDescriptorProto_Type); + 'typeName': (string); + 'defaultValue': (string); + 'options'?: (_google_protobuf_FieldOptions__Output); + 'oneofIndex': (number); + 'jsonName': (string); +} diff --git a/packages/grpc-js/src/generated/google/protobuf/FieldOptions.ts b/packages/grpc-js/src/generated/google/protobuf/FieldOptions.ts new file mode 100644 index 000000000..12a2661a3 --- /dev/null +++ b/packages/grpc-js/src/generated/google/protobuf/FieldOptions.ts @@ -0,0 +1,49 @@ +// Original file: null + +import { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption'; +import { FieldRules as _validate_FieldRules, FieldRules__Output as _validate_FieldRules__Output } from '../../validate/FieldRules'; +import { FieldMigrateAnnotation as _udpa_annotations_FieldMigrateAnnotation, FieldMigrateAnnotation__Output as _udpa_annotations_FieldMigrateAnnotation__Output } from '../../udpa/annotations/FieldMigrateAnnotation'; + +// Original file: null + +export enum _google_protobuf_FieldOptions_CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2, +} + +// Original file: null + +export enum _google_protobuf_FieldOptions_JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2, +} + +export interface FieldOptions { + 'ctype'?: (_google_protobuf_FieldOptions_CType | keyof typeof _google_protobuf_FieldOptions_CType); + 'packed'?: (boolean); + 'deprecated'?: (boolean); + 'lazy'?: (boolean); + 'jstype'?: (_google_protobuf_FieldOptions_JSType | keyof typeof _google_protobuf_FieldOptions_JSType); + 'weak'?: (boolean); + 'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[]; + '.validate.rules'?: (_validate_FieldRules); + '.udpa.annotations.sensitive'?: (boolean); + '.udpa.annotations.field_migrate'?: (_udpa_annotations_FieldMigrateAnnotation); + '.envoy.annotations.disallowed_by_default'?: (boolean); +} + +export interface FieldOptions__Output { + 'ctype': (keyof typeof _google_protobuf_FieldOptions_CType); + 'packed': (boolean); + 'deprecated': (boolean); + 'lazy': (boolean); + 'jstype': (keyof typeof _google_protobuf_FieldOptions_JSType); + 'weak': (boolean); + 'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[]; + '.validate.rules'?: (_validate_FieldRules__Output); + '.udpa.annotations.sensitive': (boolean); + '.udpa.annotations.field_migrate'?: (_udpa_annotations_FieldMigrateAnnotation__Output); + '.envoy.annotations.disallowed_by_default': (boolean); +} diff --git a/packages/grpc-js/src/generated/google/protobuf/FileDescriptorProto.ts b/packages/grpc-js/src/generated/google/protobuf/FileDescriptorProto.ts new file mode 100644 index 000000000..65315a644 --- /dev/null +++ b/packages/grpc-js/src/generated/google/protobuf/FileDescriptorProto.ts @@ -0,0 +1,38 @@ +// Original file: null + +import { DescriptorProto as _google_protobuf_DescriptorProto, DescriptorProto__Output as _google_protobuf_DescriptorProto__Output } from '../../google/protobuf/DescriptorProto'; +import { EnumDescriptorProto as _google_protobuf_EnumDescriptorProto, EnumDescriptorProto__Output as _google_protobuf_EnumDescriptorProto__Output } from '../../google/protobuf/EnumDescriptorProto'; +import { ServiceDescriptorProto as _google_protobuf_ServiceDescriptorProto, ServiceDescriptorProto__Output as _google_protobuf_ServiceDescriptorProto__Output } from '../../google/protobuf/ServiceDescriptorProto'; +import { FieldDescriptorProto as _google_protobuf_FieldDescriptorProto, FieldDescriptorProto__Output as _google_protobuf_FieldDescriptorProto__Output } from '../../google/protobuf/FieldDescriptorProto'; +import { FileOptions as _google_protobuf_FileOptions, FileOptions__Output as _google_protobuf_FileOptions__Output } from '../../google/protobuf/FileOptions'; +import { SourceCodeInfo as _google_protobuf_SourceCodeInfo, SourceCodeInfo__Output as _google_protobuf_SourceCodeInfo__Output } from '../../google/protobuf/SourceCodeInfo'; + +export interface FileDescriptorProto { + 'name'?: (string); + 'package'?: (string); + 'dependency'?: (string)[]; + 'messageType'?: (_google_protobuf_DescriptorProto)[]; + 'enumType'?: (_google_protobuf_EnumDescriptorProto)[]; + 'service'?: (_google_protobuf_ServiceDescriptorProto)[]; + 'extension'?: (_google_protobuf_FieldDescriptorProto)[]; + 'options'?: (_google_protobuf_FileOptions); + 'sourceCodeInfo'?: (_google_protobuf_SourceCodeInfo); + 'publicDependency'?: (number)[]; + 'weakDependency'?: (number)[]; + 'syntax'?: (string); +} + +export interface FileDescriptorProto__Output { + 'name': (string); + 'package': (string); + 'dependency': (string)[]; + 'messageType': (_google_protobuf_DescriptorProto__Output)[]; + 'enumType': (_google_protobuf_EnumDescriptorProto__Output)[]; + 'service': (_google_protobuf_ServiceDescriptorProto__Output)[]; + 'extension': (_google_protobuf_FieldDescriptorProto__Output)[]; + 'options'?: (_google_protobuf_FileOptions__Output); + 'sourceCodeInfo'?: (_google_protobuf_SourceCodeInfo__Output); + 'publicDependency': (number)[]; + 'weakDependency': (number)[]; + 'syntax': (string); +} diff --git a/packages/grpc-js/src/generated/google/protobuf/FileDescriptorSet.ts b/packages/grpc-js/src/generated/google/protobuf/FileDescriptorSet.ts new file mode 100644 index 000000000..f01cabc4c --- /dev/null +++ b/packages/grpc-js/src/generated/google/protobuf/FileDescriptorSet.ts @@ -0,0 +1,11 @@ +// Original file: null + +import { FileDescriptorProto as _google_protobuf_FileDescriptorProto, FileDescriptorProto__Output as _google_protobuf_FileDescriptorProto__Output } from '../../google/protobuf/FileDescriptorProto'; + +export interface FileDescriptorSet { + 'file'?: (_google_protobuf_FileDescriptorProto)[]; +} + +export interface FileDescriptorSet__Output { + 'file': (_google_protobuf_FileDescriptorProto__Output)[]; +} diff --git a/packages/grpc-js/src/generated/google/protobuf/FileOptions.ts b/packages/grpc-js/src/generated/google/protobuf/FileOptions.ts new file mode 100644 index 000000000..b11540d27 --- /dev/null +++ b/packages/grpc-js/src/generated/google/protobuf/FileOptions.ts @@ -0,0 +1,53 @@ +// Original file: null + +import { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption'; +import { FileMigrateAnnotation as _udpa_annotations_FileMigrateAnnotation, FileMigrateAnnotation__Output as _udpa_annotations_FileMigrateAnnotation__Output } from '../../udpa/annotations/FileMigrateAnnotation'; +import { StatusAnnotation as _udpa_annotations_StatusAnnotation, StatusAnnotation__Output as _udpa_annotations_StatusAnnotation__Output } from '../../udpa/annotations/StatusAnnotation'; + +// Original file: null + +export enum _google_protobuf_FileOptions_OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3, +} + +export interface FileOptions { + 'javaPackage'?: (string); + 'javaOuterClassname'?: (string); + 'optimizeFor'?: (_google_protobuf_FileOptions_OptimizeMode | keyof typeof _google_protobuf_FileOptions_OptimizeMode); + 'javaMultipleFiles'?: (boolean); + 'goPackage'?: (string); + 'ccGenericServices'?: (boolean); + 'javaGenericServices'?: (boolean); + 'pyGenericServices'?: (boolean); + 'javaGenerateEqualsAndHash'?: (boolean); + 'deprecated'?: (boolean); + 'javaStringCheckUtf8'?: (boolean); + 'ccEnableArenas'?: (boolean); + 'objcClassPrefix'?: (string); + 'csharpNamespace'?: (string); + 'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[]; + '.udpa.annotations.file_migrate'?: (_udpa_annotations_FileMigrateAnnotation); + '.udpa.annotations.file_status'?: (_udpa_annotations_StatusAnnotation); +} + +export interface FileOptions__Output { + 'javaPackage': (string); + 'javaOuterClassname': (string); + 'optimizeFor': (keyof typeof _google_protobuf_FileOptions_OptimizeMode); + 'javaMultipleFiles': (boolean); + 'goPackage': (string); + 'ccGenericServices': (boolean); + 'javaGenericServices': (boolean); + 'pyGenericServices': (boolean); + 'javaGenerateEqualsAndHash': (boolean); + 'deprecated': (boolean); + 'javaStringCheckUtf8': (boolean); + 'ccEnableArenas': (boolean); + 'objcClassPrefix': (string); + 'csharpNamespace': (string); + 'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[]; + '.udpa.annotations.file_migrate'?: (_udpa_annotations_FileMigrateAnnotation__Output); + '.udpa.annotations.file_status'?: (_udpa_annotations_StatusAnnotation__Output); +} diff --git a/packages/grpc-js/src/generated/google/protobuf/FloatValue.ts b/packages/grpc-js/src/generated/google/protobuf/FloatValue.ts new file mode 100644 index 000000000..144a9a585 --- /dev/null +++ b/packages/grpc-js/src/generated/google/protobuf/FloatValue.ts @@ -0,0 +1,10 @@ +// Original file: null + + +export interface FloatValue { + 'value'?: (number | string); +} + +export interface FloatValue__Output { + 'value': (number | string); +} diff --git a/packages/grpc-js/src/generated/google/protobuf/GeneratedCodeInfo.ts b/packages/grpc-js/src/generated/google/protobuf/GeneratedCodeInfo.ts new file mode 100644 index 000000000..019fb0e15 --- /dev/null +++ b/packages/grpc-js/src/generated/google/protobuf/GeneratedCodeInfo.ts @@ -0,0 +1,24 @@ +// Original file: null + + +export interface _google_protobuf_GeneratedCodeInfo_Annotation { + 'path'?: (number)[]; + 'sourceFile'?: (string); + 'begin'?: (number); + 'end'?: (number); +} + +export interface _google_protobuf_GeneratedCodeInfo_Annotation__Output { + 'path': (number)[]; + 'sourceFile': (string); + 'begin': (number); + 'end': (number); +} + +export interface GeneratedCodeInfo { + 'annotation'?: (_google_protobuf_GeneratedCodeInfo_Annotation)[]; +} + +export interface GeneratedCodeInfo__Output { + 'annotation': (_google_protobuf_GeneratedCodeInfo_Annotation__Output)[]; +} diff --git a/packages/grpc-js/src/generated/google/protobuf/Int32Value.ts b/packages/grpc-js/src/generated/google/protobuf/Int32Value.ts new file mode 100644 index 000000000..ec4eeb7ec --- /dev/null +++ b/packages/grpc-js/src/generated/google/protobuf/Int32Value.ts @@ -0,0 +1,10 @@ +// Original file: null + + +export interface Int32Value { + 'value'?: (number); +} + +export interface Int32Value__Output { + 'value': (number); +} diff --git a/packages/grpc-js/src/generated/google/protobuf/Int64Value.ts b/packages/grpc-js/src/generated/google/protobuf/Int64Value.ts new file mode 100644 index 000000000..38b0e28f3 --- /dev/null +++ b/packages/grpc-js/src/generated/google/protobuf/Int64Value.ts @@ -0,0 +1,11 @@ +// Original file: null + +import { Long } from '@grpc/proto-loader'; + +export interface Int64Value { + 'value'?: (number | string | Long); +} + +export interface Int64Value__Output { + 'value': (string); +} diff --git a/packages/grpc-js/src/generated/google/protobuf/ListValue.ts b/packages/grpc-js/src/generated/google/protobuf/ListValue.ts new file mode 100644 index 000000000..4b3cf67d7 --- /dev/null +++ b/packages/grpc-js/src/generated/google/protobuf/ListValue.ts @@ -0,0 +1,11 @@ +// Original file: null + +import { Value as _google_protobuf_Value, Value__Output as _google_protobuf_Value__Output } from '../../google/protobuf/Value'; + +export interface ListValue { + 'values'?: (_google_protobuf_Value)[]; +} + +export interface ListValue__Output { + 'values': (_google_protobuf_Value__Output)[]; +} diff --git a/packages/grpc-js/src/generated/google/protobuf/MessageOptions.ts b/packages/grpc-js/src/generated/google/protobuf/MessageOptions.ts new file mode 100644 index 000000000..88f654828 --- /dev/null +++ b/packages/grpc-js/src/generated/google/protobuf/MessageOptions.ts @@ -0,0 +1,24 @@ +// Original file: null + +import { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption'; +import { MigrateAnnotation as _udpa_annotations_MigrateAnnotation, MigrateAnnotation__Output as _udpa_annotations_MigrateAnnotation__Output } from '../../udpa/annotations/MigrateAnnotation'; + +export interface MessageOptions { + 'messageSetWireFormat'?: (boolean); + 'noStandardDescriptorAccessor'?: (boolean); + 'deprecated'?: (boolean); + 'mapEntry'?: (boolean); + 'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[]; + '.validate.disabled'?: (boolean); + '.udpa.annotations.message_migrate'?: (_udpa_annotations_MigrateAnnotation); +} + +export interface MessageOptions__Output { + 'messageSetWireFormat': (boolean); + 'noStandardDescriptorAccessor': (boolean); + 'deprecated': (boolean); + 'mapEntry': (boolean); + 'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[]; + '.validate.disabled': (boolean); + '.udpa.annotations.message_migrate'?: (_udpa_annotations_MigrateAnnotation__Output); +} diff --git a/packages/grpc-js/src/generated/google/protobuf/MethodDescriptorProto.ts b/packages/grpc-js/src/generated/google/protobuf/MethodDescriptorProto.ts new file mode 100644 index 000000000..b62d45731 --- /dev/null +++ b/packages/grpc-js/src/generated/google/protobuf/MethodDescriptorProto.ts @@ -0,0 +1,21 @@ +// Original file: null + +import { MethodOptions as _google_protobuf_MethodOptions, MethodOptions__Output as _google_protobuf_MethodOptions__Output } from '../../google/protobuf/MethodOptions'; + +export interface MethodDescriptorProto { + 'name'?: (string); + 'inputType'?: (string); + 'outputType'?: (string); + 'options'?: (_google_protobuf_MethodOptions); + 'clientStreaming'?: (boolean); + 'serverStreaming'?: (boolean); +} + +export interface MethodDescriptorProto__Output { + 'name': (string); + 'inputType': (string); + 'outputType': (string); + 'options'?: (_google_protobuf_MethodOptions__Output); + 'clientStreaming': (boolean); + 'serverStreaming': (boolean); +} diff --git a/packages/grpc-js/src/generated/google/protobuf/MethodOptions.ts b/packages/grpc-js/src/generated/google/protobuf/MethodOptions.ts new file mode 100644 index 000000000..a5edbd8bb --- /dev/null +++ b/packages/grpc-js/src/generated/google/protobuf/MethodOptions.ts @@ -0,0 +1,16 @@ +// Original file: null + +import { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption'; +import { HttpRule as _google_api_HttpRule, HttpRule__Output as _google_api_HttpRule__Output } from '../../google/api/HttpRule'; + +export interface MethodOptions { + 'deprecated'?: (boolean); + 'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[]; + '.google.api.http'?: (_google_api_HttpRule); +} + +export interface MethodOptions__Output { + 'deprecated': (boolean); + 'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[]; + '.google.api.http'?: (_google_api_HttpRule__Output); +} diff --git a/packages/grpc-js/src/generated/google/protobuf/NullValue.ts b/packages/grpc-js/src/generated/google/protobuf/NullValue.ts new file mode 100644 index 000000000..377aab885 --- /dev/null +++ b/packages/grpc-js/src/generated/google/protobuf/NullValue.ts @@ -0,0 +1,5 @@ +// Original file: null + +export enum NullValue { + NULL_VALUE = 0, +} diff --git a/packages/grpc-js/src/generated/google/protobuf/OneofDescriptorProto.ts b/packages/grpc-js/src/generated/google/protobuf/OneofDescriptorProto.ts new file mode 100644 index 000000000..5d1512003 --- /dev/null +++ b/packages/grpc-js/src/generated/google/protobuf/OneofDescriptorProto.ts @@ -0,0 +1,13 @@ +// Original file: null + +import { OneofOptions as _google_protobuf_OneofOptions, OneofOptions__Output as _google_protobuf_OneofOptions__Output } from '../../google/protobuf/OneofOptions'; + +export interface OneofDescriptorProto { + 'name'?: (string); + 'options'?: (_google_protobuf_OneofOptions); +} + +export interface OneofDescriptorProto__Output { + 'name': (string); + 'options'?: (_google_protobuf_OneofOptions__Output); +} diff --git a/packages/grpc-js/src/generated/google/protobuf/OneofOptions.ts b/packages/grpc-js/src/generated/google/protobuf/OneofOptions.ts new file mode 100644 index 000000000..01fdc9d2b --- /dev/null +++ b/packages/grpc-js/src/generated/google/protobuf/OneofOptions.ts @@ -0,0 +1,13 @@ +// Original file: null + +import { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption'; + +export interface OneofOptions { + 'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[]; + '.validate.required'?: (boolean); +} + +export interface OneofOptions__Output { + 'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[]; + '.validate.required': (boolean); +} diff --git a/packages/grpc-js/src/generated/google/protobuf/ServiceDescriptorProto.ts b/packages/grpc-js/src/generated/google/protobuf/ServiceDescriptorProto.ts new file mode 100644 index 000000000..fe5cab5b4 --- /dev/null +++ b/packages/grpc-js/src/generated/google/protobuf/ServiceDescriptorProto.ts @@ -0,0 +1,16 @@ +// Original file: null + +import { MethodDescriptorProto as _google_protobuf_MethodDescriptorProto, MethodDescriptorProto__Output as _google_protobuf_MethodDescriptorProto__Output } from '../../google/protobuf/MethodDescriptorProto'; +import { ServiceOptions as _google_protobuf_ServiceOptions, ServiceOptions__Output as _google_protobuf_ServiceOptions__Output } from '../../google/protobuf/ServiceOptions'; + +export interface ServiceDescriptorProto { + 'name'?: (string); + 'method'?: (_google_protobuf_MethodDescriptorProto)[]; + 'options'?: (_google_protobuf_ServiceOptions); +} + +export interface ServiceDescriptorProto__Output { + 'name': (string); + 'method': (_google_protobuf_MethodDescriptorProto__Output)[]; + 'options'?: (_google_protobuf_ServiceOptions__Output); +} diff --git a/packages/grpc-js/src/generated/google/protobuf/ServiceOptions.ts b/packages/grpc-js/src/generated/google/protobuf/ServiceOptions.ts new file mode 100644 index 000000000..c1bd83603 --- /dev/null +++ b/packages/grpc-js/src/generated/google/protobuf/ServiceOptions.ts @@ -0,0 +1,13 @@ +// Original file: null + +import { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption'; + +export interface ServiceOptions { + 'deprecated'?: (boolean); + 'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[]; +} + +export interface ServiceOptions__Output { + 'deprecated': (boolean); + 'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[]; +} diff --git a/packages/grpc-js/src/generated/google/protobuf/SourceCodeInfo.ts b/packages/grpc-js/src/generated/google/protobuf/SourceCodeInfo.ts new file mode 100644 index 000000000..d30e59b4f --- /dev/null +++ b/packages/grpc-js/src/generated/google/protobuf/SourceCodeInfo.ts @@ -0,0 +1,26 @@ +// Original file: null + + +export interface _google_protobuf_SourceCodeInfo_Location { + 'path'?: (number)[]; + 'span'?: (number)[]; + 'leadingComments'?: (string); + 'trailingComments'?: (string); + 'leadingDetachedComments'?: (string)[]; +} + +export interface _google_protobuf_SourceCodeInfo_Location__Output { + 'path': (number)[]; + 'span': (number)[]; + 'leadingComments': (string); + 'trailingComments': (string); + 'leadingDetachedComments': (string)[]; +} + +export interface SourceCodeInfo { + 'location'?: (_google_protobuf_SourceCodeInfo_Location)[]; +} + +export interface SourceCodeInfo__Output { + 'location': (_google_protobuf_SourceCodeInfo_Location__Output)[]; +} diff --git a/packages/grpc-js/src/generated/google/protobuf/StringValue.ts b/packages/grpc-js/src/generated/google/protobuf/StringValue.ts new file mode 100644 index 000000000..673090e3f --- /dev/null +++ b/packages/grpc-js/src/generated/google/protobuf/StringValue.ts @@ -0,0 +1,10 @@ +// Original file: null + + +export interface StringValue { + 'value'?: (string); +} + +export interface StringValue__Output { + 'value': (string); +} diff --git a/packages/grpc-js/src/generated/google/protobuf/Struct.ts b/packages/grpc-js/src/generated/google/protobuf/Struct.ts new file mode 100644 index 000000000..4b4c3be78 --- /dev/null +++ b/packages/grpc-js/src/generated/google/protobuf/Struct.ts @@ -0,0 +1,11 @@ +// Original file: null + +import { Value as _google_protobuf_Value, Value__Output as _google_protobuf_Value__Output } from '../../google/protobuf/Value'; + +export interface Struct { + 'fields'?: ({[key: string]: _google_protobuf_Value}); +} + +export interface Struct__Output { + 'fields'?: ({[key: string]: _google_protobuf_Value__Output}); +} diff --git a/packages/grpc-js/src/generated/google/protobuf/Timestamp.ts b/packages/grpc-js/src/generated/google/protobuf/Timestamp.ts new file mode 100644 index 000000000..f8747e93e --- /dev/null +++ b/packages/grpc-js/src/generated/google/protobuf/Timestamp.ts @@ -0,0 +1,13 @@ +// Original file: null + +import { Long } from '@grpc/proto-loader'; + +export interface Timestamp { + 'seconds'?: (number | string | Long); + 'nanos'?: (number); +} + +export interface Timestamp__Output { + 'seconds': (string); + 'nanos': (number); +} diff --git a/packages/grpc-js/src/generated/google/protobuf/UInt32Value.ts b/packages/grpc-js/src/generated/google/protobuf/UInt32Value.ts new file mode 100644 index 000000000..973ab34a5 --- /dev/null +++ b/packages/grpc-js/src/generated/google/protobuf/UInt32Value.ts @@ -0,0 +1,10 @@ +// Original file: null + + +export interface UInt32Value { + 'value'?: (number); +} + +export interface UInt32Value__Output { + 'value': (number); +} diff --git a/packages/grpc-js/src/generated/google/protobuf/UInt64Value.ts b/packages/grpc-js/src/generated/google/protobuf/UInt64Value.ts new file mode 100644 index 000000000..790901733 --- /dev/null +++ b/packages/grpc-js/src/generated/google/protobuf/UInt64Value.ts @@ -0,0 +1,11 @@ +// Original file: null + +import { Long } from '@grpc/proto-loader'; + +export interface UInt64Value { + 'value'?: (number | string | Long); +} + +export interface UInt64Value__Output { + 'value': (string); +} diff --git a/packages/grpc-js/src/generated/google/protobuf/UninterpretedOption.ts b/packages/grpc-js/src/generated/google/protobuf/UninterpretedOption.ts new file mode 100644 index 000000000..91e3b99bc --- /dev/null +++ b/packages/grpc-js/src/generated/google/protobuf/UninterpretedOption.ts @@ -0,0 +1,33 @@ +// Original file: null + +import { Long } from '@grpc/proto-loader'; + +export interface _google_protobuf_UninterpretedOption_NamePart { + 'namePart'?: (string); + 'isExtension'?: (boolean); +} + +export interface _google_protobuf_UninterpretedOption_NamePart__Output { + 'namePart': (string); + 'isExtension': (boolean); +} + +export interface UninterpretedOption { + 'name'?: (_google_protobuf_UninterpretedOption_NamePart)[]; + 'identifierValue'?: (string); + 'positiveIntValue'?: (number | string | Long); + 'negativeIntValue'?: (number | string | Long); + 'doubleValue'?: (number | string); + 'stringValue'?: (Buffer | Uint8Array | string); + 'aggregateValue'?: (string); +} + +export interface UninterpretedOption__Output { + 'name': (_google_protobuf_UninterpretedOption_NamePart__Output)[]; + 'identifierValue': (string); + 'positiveIntValue': (string); + 'negativeIntValue': (string); + 'doubleValue': (number | string); + 'stringValue': (Buffer); + 'aggregateValue': (string); +} diff --git a/packages/grpc-js/src/generated/google/protobuf/Value.ts b/packages/grpc-js/src/generated/google/protobuf/Value.ts new file mode 100644 index 000000000..0097135be --- /dev/null +++ b/packages/grpc-js/src/generated/google/protobuf/Value.ts @@ -0,0 +1,25 @@ +// Original file: null + +import { NullValue as _google_protobuf_NullValue } from '../../google/protobuf/NullValue'; +import { Struct as _google_protobuf_Struct, Struct__Output as _google_protobuf_Struct__Output } from '../../google/protobuf/Struct'; +import { ListValue as _google_protobuf_ListValue, ListValue__Output as _google_protobuf_ListValue__Output } from '../../google/protobuf/ListValue'; + +export interface Value { + 'nullValue'?: (_google_protobuf_NullValue | keyof typeof _google_protobuf_NullValue); + 'numberValue'?: (number | string); + 'stringValue'?: (string); + 'boolValue'?: (boolean); + 'structValue'?: (_google_protobuf_Struct); + 'listValue'?: (_google_protobuf_ListValue); + 'kind'?: "nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"; +} + +export interface Value__Output { + 'nullValue'?: (keyof typeof _google_protobuf_NullValue); + 'numberValue'?: (number | string); + 'stringValue'?: (string); + 'boolValue'?: (boolean); + 'structValue'?: (_google_protobuf_Struct__Output); + 'listValue'?: (_google_protobuf_ListValue__Output); + 'kind': "nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"; +} diff --git a/packages/grpc-js/src/generated/google/rpc/Status.ts b/packages/grpc-js/src/generated/google/rpc/Status.ts new file mode 100644 index 000000000..7da370379 --- /dev/null +++ b/packages/grpc-js/src/generated/google/rpc/Status.ts @@ -0,0 +1,57 @@ +// Original file: deps/googleapis/google/rpc/status.proto + +import { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../google/protobuf/Any'; + +/** + * The `Status` type defines a logical error model that is suitable for + * different programming environments, including REST APIs and RPC APIs. It is + * used by [gRPC](https://github.com/grpc). Each `Status` message contains + * three pieces of data: error code, error message, and error details. + * + * You can find out more about this error model and how to work with it in the + * [API Design Guide](https://cloud.google.com/apis/design/errors). + */ +export interface Status { + /** + * The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + */ + 'code'?: (number); + /** + * A developer-facing error message, which should be in English. Any + * user-facing error message should be localized and sent in the + * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. + */ + 'message'?: (string); + /** + * A list of messages that carry the error details. There is a common set of + * message types for APIs to use. + */ + 'details'?: (_google_protobuf_Any)[]; +} + +/** + * The `Status` type defines a logical error model that is suitable for + * different programming environments, including REST APIs and RPC APIs. It is + * used by [gRPC](https://github.com/grpc). Each `Status` message contains + * three pieces of data: error code, error message, and error details. + * + * You can find out more about this error model and how to work with it in the + * [API Design Guide](https://cloud.google.com/apis/design/errors). + */ +export interface Status__Output { + /** + * The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + */ + 'code': (number); + /** + * A developer-facing error message, which should be in English. Any + * user-facing error message should be localized and sent in the + * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. + */ + 'message': (string); + /** + * A list of messages that carry the error details. There is a common set of + * message types for APIs to use. + */ + 'details': (_google_protobuf_Any__Output)[]; +} diff --git a/packages/grpc-js/src/generated/listener.ts b/packages/grpc-js/src/generated/listener.ts new file mode 100644 index 000000000..040c1d52a --- /dev/null +++ b/packages/grpc-js/src/generated/listener.ts @@ -0,0 +1,234 @@ +import * as grpc from '../index'; +import { ServiceDefinition, EnumTypeDefinition, MessageTypeDefinition } from '@grpc/proto-loader'; + + +type ConstructorArguments = Constructor extends new (...args: infer Args) => any ? Args: never; +type SubtypeConstructor = { + new(...args: ConstructorArguments): Subtype; +} + +export interface ProtoGrpcType { + envoy: { + annotations: { + } + api: { + v2: { + Listener: MessageTypeDefinition + auth: { + CertificateValidationContext: MessageTypeDefinition + CommonTlsContext: MessageTypeDefinition + DownstreamTlsContext: MessageTypeDefinition + GenericSecret: MessageTypeDefinition + PrivateKeyProvider: MessageTypeDefinition + SdsSecretConfig: MessageTypeDefinition + Secret: MessageTypeDefinition + TlsCertificate: MessageTypeDefinition + TlsParameters: MessageTypeDefinition + TlsSessionTicketKeys: MessageTypeDefinition + UpstreamTlsContext: MessageTypeDefinition + } + core: { + Address: MessageTypeDefinition + AggregatedConfigSource: MessageTypeDefinition + ApiConfigSource: MessageTypeDefinition + ApiVersion: EnumTypeDefinition + AsyncDataSource: MessageTypeDefinition + BackoffStrategy: MessageTypeDefinition + BindConfig: MessageTypeDefinition + BuildVersion: MessageTypeDefinition + CidrRange: MessageTypeDefinition + ConfigSource: MessageTypeDefinition + ControlPlane: MessageTypeDefinition + DataSource: MessageTypeDefinition + Extension: MessageTypeDefinition + GrpcService: MessageTypeDefinition + HeaderMap: MessageTypeDefinition + HeaderValue: MessageTypeDefinition + HeaderValueOption: MessageTypeDefinition + HttpUri: MessageTypeDefinition + Locality: MessageTypeDefinition + Metadata: MessageTypeDefinition + Node: MessageTypeDefinition + Pipe: MessageTypeDefinition + RateLimitSettings: MessageTypeDefinition + RemoteDataSource: MessageTypeDefinition + RequestMethod: EnumTypeDefinition + RetryPolicy: MessageTypeDefinition + RoutingPriority: EnumTypeDefinition + RuntimeDouble: MessageTypeDefinition + RuntimeFeatureFlag: MessageTypeDefinition + RuntimeFractionalPercent: MessageTypeDefinition + RuntimeUInt32: MessageTypeDefinition + SelfConfigSource: MessageTypeDefinition + SocketAddress: MessageTypeDefinition + SocketOption: MessageTypeDefinition + TcpKeepalive: MessageTypeDefinition + TrafficDirection: EnumTypeDefinition + TransportSocket: MessageTypeDefinition + } + listener: { + ActiveRawUdpListenerConfig: MessageTypeDefinition + Filter: MessageTypeDefinition + FilterChain: MessageTypeDefinition + FilterChainMatch: MessageTypeDefinition + ListenerFilter: MessageTypeDefinition + ListenerFilterChainMatchPredicate: MessageTypeDefinition + UdpListenerConfig: MessageTypeDefinition + } + route: { + CorsPolicy: MessageTypeDefinition + Decorator: MessageTypeDefinition + DirectResponseAction: MessageTypeDefinition + FilterAction: MessageTypeDefinition + HeaderMatcher: MessageTypeDefinition + HedgePolicy: MessageTypeDefinition + QueryParameterMatcher: MessageTypeDefinition + RateLimit: MessageTypeDefinition + RedirectAction: MessageTypeDefinition + RetryPolicy: MessageTypeDefinition + Route: MessageTypeDefinition + RouteAction: MessageTypeDefinition + RouteMatch: MessageTypeDefinition + Tracing: MessageTypeDefinition + VirtualCluster: MessageTypeDefinition + VirtualHost: MessageTypeDefinition + WeightedCluster: MessageTypeDefinition + } + } + } + config: { + filter: { + accesslog: { + v2: { + AccessLog: MessageTypeDefinition + AccessLogFilter: MessageTypeDefinition + AndFilter: MessageTypeDefinition + ComparisonFilter: MessageTypeDefinition + DurationFilter: MessageTypeDefinition + ExtensionFilter: MessageTypeDefinition + GrpcStatusFilter: MessageTypeDefinition + HeaderFilter: MessageTypeDefinition + NotHealthCheckFilter: MessageTypeDefinition + OrFilter: MessageTypeDefinition + ResponseFlagFilter: MessageTypeDefinition + RuntimeFilter: MessageTypeDefinition + StatusCodeFilter: MessageTypeDefinition + TraceableFilter: MessageTypeDefinition + } + } + } + listener: { + v2: { + ApiListener: MessageTypeDefinition + } + } + } + type: { + DoubleRange: MessageTypeDefinition + FractionalPercent: MessageTypeDefinition + Int32Range: MessageTypeDefinition + Int64Range: MessageTypeDefinition + Percent: MessageTypeDefinition + SemanticVersion: MessageTypeDefinition + matcher: { + ListStringMatcher: MessageTypeDefinition + RegexMatchAndSubstitute: MessageTypeDefinition + RegexMatcher: MessageTypeDefinition + StringMatcher: MessageTypeDefinition + } + metadata: { + v2: { + MetadataKey: MessageTypeDefinition + MetadataKind: MessageTypeDefinition + } + } + tracing: { + v2: { + CustomTag: MessageTypeDefinition + } + } + } + } + google: { + api: { + CustomHttpPattern: MessageTypeDefinition + Http: MessageTypeDefinition + HttpRule: MessageTypeDefinition + } + protobuf: { + Any: MessageTypeDefinition + BoolValue: MessageTypeDefinition + BytesValue: MessageTypeDefinition + DescriptorProto: MessageTypeDefinition + DoubleValue: MessageTypeDefinition + Duration: MessageTypeDefinition + Empty: MessageTypeDefinition + EnumDescriptorProto: MessageTypeDefinition + EnumOptions: MessageTypeDefinition + EnumValueDescriptorProto: MessageTypeDefinition + EnumValueOptions: MessageTypeDefinition + FieldDescriptorProto: MessageTypeDefinition + FieldOptions: MessageTypeDefinition + FileDescriptorProto: MessageTypeDefinition + FileDescriptorSet: MessageTypeDefinition + FileOptions: MessageTypeDefinition + FloatValue: MessageTypeDefinition + GeneratedCodeInfo: MessageTypeDefinition + Int32Value: MessageTypeDefinition + Int64Value: MessageTypeDefinition + ListValue: MessageTypeDefinition + MessageOptions: MessageTypeDefinition + MethodDescriptorProto: MessageTypeDefinition + MethodOptions: MessageTypeDefinition + NullValue: EnumTypeDefinition + OneofDescriptorProto: MessageTypeDefinition + OneofOptions: MessageTypeDefinition + ServiceDescriptorProto: MessageTypeDefinition + ServiceOptions: MessageTypeDefinition + SourceCodeInfo: MessageTypeDefinition + StringValue: MessageTypeDefinition + Struct: MessageTypeDefinition + Timestamp: MessageTypeDefinition + UInt32Value: MessageTypeDefinition + UInt64Value: MessageTypeDefinition + UninterpretedOption: MessageTypeDefinition + Value: MessageTypeDefinition + } + } + udpa: { + annotations: { + FieldMigrateAnnotation: MessageTypeDefinition + FileMigrateAnnotation: MessageTypeDefinition + MigrateAnnotation: MessageTypeDefinition + PackageVersionStatus: EnumTypeDefinition + StatusAnnotation: MessageTypeDefinition + } + } + validate: { + AnyRules: MessageTypeDefinition + BoolRules: MessageTypeDefinition + BytesRules: MessageTypeDefinition + DoubleRules: MessageTypeDefinition + DurationRules: MessageTypeDefinition + EnumRules: MessageTypeDefinition + FieldRules: MessageTypeDefinition + Fixed32Rules: MessageTypeDefinition + Fixed64Rules: MessageTypeDefinition + FloatRules: MessageTypeDefinition + Int32Rules: MessageTypeDefinition + Int64Rules: MessageTypeDefinition + KnownRegex: EnumTypeDefinition + MapRules: MessageTypeDefinition + MessageRules: MessageTypeDefinition + RepeatedRules: MessageTypeDefinition + SFixed32Rules: MessageTypeDefinition + SFixed64Rules: MessageTypeDefinition + SInt32Rules: MessageTypeDefinition + SInt64Rules: MessageTypeDefinition + StringRules: MessageTypeDefinition + TimestampRules: MessageTypeDefinition + UInt32Rules: MessageTypeDefinition + UInt64Rules: MessageTypeDefinition + } +} + diff --git a/packages/grpc-js/src/generated/route.ts b/packages/grpc-js/src/generated/route.ts new file mode 100644 index 000000000..5b251477a --- /dev/null +++ b/packages/grpc-js/src/generated/route.ts @@ -0,0 +1,181 @@ +import * as grpc from '../index'; +import { ServiceDefinition, EnumTypeDefinition, MessageTypeDefinition } from '@grpc/proto-loader'; + + +type ConstructorArguments = Constructor extends new (...args: infer Args) => any ? Args: never; +type SubtypeConstructor = { + new(...args: ConstructorArguments): Subtype; +} + +export interface ProtoGrpcType { + envoy: { + annotations: { + } + api: { + v2: { + RouteConfiguration: MessageTypeDefinition + Vhds: MessageTypeDefinition + core: { + Address: MessageTypeDefinition + AggregatedConfigSource: MessageTypeDefinition + ApiConfigSource: MessageTypeDefinition + ApiVersion: EnumTypeDefinition + AsyncDataSource: MessageTypeDefinition + BackoffStrategy: MessageTypeDefinition + BindConfig: MessageTypeDefinition + BuildVersion: MessageTypeDefinition + CidrRange: MessageTypeDefinition + ConfigSource: MessageTypeDefinition + ControlPlane: MessageTypeDefinition + DataSource: MessageTypeDefinition + Extension: MessageTypeDefinition + GrpcService: MessageTypeDefinition + HeaderMap: MessageTypeDefinition + HeaderValue: MessageTypeDefinition + HeaderValueOption: MessageTypeDefinition + HttpUri: MessageTypeDefinition + Locality: MessageTypeDefinition + Metadata: MessageTypeDefinition + Node: MessageTypeDefinition + Pipe: MessageTypeDefinition + RateLimitSettings: MessageTypeDefinition + RemoteDataSource: MessageTypeDefinition + RequestMethod: EnumTypeDefinition + RetryPolicy: MessageTypeDefinition + RoutingPriority: EnumTypeDefinition + RuntimeDouble: MessageTypeDefinition + RuntimeFeatureFlag: MessageTypeDefinition + RuntimeFractionalPercent: MessageTypeDefinition + RuntimeUInt32: MessageTypeDefinition + SelfConfigSource: MessageTypeDefinition + SocketAddress: MessageTypeDefinition + SocketOption: MessageTypeDefinition + TcpKeepalive: MessageTypeDefinition + TrafficDirection: EnumTypeDefinition + TransportSocket: MessageTypeDefinition + } + route: { + CorsPolicy: MessageTypeDefinition + Decorator: MessageTypeDefinition + DirectResponseAction: MessageTypeDefinition + FilterAction: MessageTypeDefinition + HeaderMatcher: MessageTypeDefinition + HedgePolicy: MessageTypeDefinition + QueryParameterMatcher: MessageTypeDefinition + RateLimit: MessageTypeDefinition + RedirectAction: MessageTypeDefinition + RetryPolicy: MessageTypeDefinition + Route: MessageTypeDefinition + RouteAction: MessageTypeDefinition + RouteMatch: MessageTypeDefinition + Tracing: MessageTypeDefinition + VirtualCluster: MessageTypeDefinition + VirtualHost: MessageTypeDefinition + WeightedCluster: MessageTypeDefinition + } + } + } + type: { + DoubleRange: MessageTypeDefinition + FractionalPercent: MessageTypeDefinition + Int32Range: MessageTypeDefinition + Int64Range: MessageTypeDefinition + Percent: MessageTypeDefinition + SemanticVersion: MessageTypeDefinition + matcher: { + ListStringMatcher: MessageTypeDefinition + RegexMatchAndSubstitute: MessageTypeDefinition + RegexMatcher: MessageTypeDefinition + StringMatcher: MessageTypeDefinition + } + metadata: { + v2: { + MetadataKey: MessageTypeDefinition + MetadataKind: MessageTypeDefinition + } + } + tracing: { + v2: { + CustomTag: MessageTypeDefinition + } + } + } + } + google: { + protobuf: { + Any: MessageTypeDefinition + BoolValue: MessageTypeDefinition + BytesValue: MessageTypeDefinition + DescriptorProto: MessageTypeDefinition + DoubleValue: MessageTypeDefinition + Duration: MessageTypeDefinition + Empty: MessageTypeDefinition + EnumDescriptorProto: MessageTypeDefinition + EnumOptions: MessageTypeDefinition + EnumValueDescriptorProto: MessageTypeDefinition + EnumValueOptions: MessageTypeDefinition + FieldDescriptorProto: MessageTypeDefinition + FieldOptions: MessageTypeDefinition + FileDescriptorProto: MessageTypeDefinition + FileDescriptorSet: MessageTypeDefinition + FileOptions: MessageTypeDefinition + FloatValue: MessageTypeDefinition + GeneratedCodeInfo: MessageTypeDefinition + Int32Value: MessageTypeDefinition + Int64Value: MessageTypeDefinition + ListValue: MessageTypeDefinition + MessageOptions: MessageTypeDefinition + MethodDescriptorProto: MessageTypeDefinition + MethodOptions: MessageTypeDefinition + NullValue: EnumTypeDefinition + OneofDescriptorProto: MessageTypeDefinition + OneofOptions: MessageTypeDefinition + ServiceDescriptorProto: MessageTypeDefinition + ServiceOptions: MessageTypeDefinition + SourceCodeInfo: MessageTypeDefinition + StringValue: MessageTypeDefinition + Struct: MessageTypeDefinition + Timestamp: MessageTypeDefinition + UInt32Value: MessageTypeDefinition + UInt64Value: MessageTypeDefinition + UninterpretedOption: MessageTypeDefinition + Value: MessageTypeDefinition + } + } + udpa: { + annotations: { + FieldMigrateAnnotation: MessageTypeDefinition + FileMigrateAnnotation: MessageTypeDefinition + MigrateAnnotation: MessageTypeDefinition + PackageVersionStatus: EnumTypeDefinition + StatusAnnotation: MessageTypeDefinition + } + } + validate: { + AnyRules: MessageTypeDefinition + BoolRules: MessageTypeDefinition + BytesRules: MessageTypeDefinition + DoubleRules: MessageTypeDefinition + DurationRules: MessageTypeDefinition + EnumRules: MessageTypeDefinition + FieldRules: MessageTypeDefinition + Fixed32Rules: MessageTypeDefinition + Fixed64Rules: MessageTypeDefinition + FloatRules: MessageTypeDefinition + Int32Rules: MessageTypeDefinition + Int64Rules: MessageTypeDefinition + KnownRegex: EnumTypeDefinition + MapRules: MessageTypeDefinition + MessageRules: MessageTypeDefinition + RepeatedRules: MessageTypeDefinition + SFixed32Rules: MessageTypeDefinition + SFixed64Rules: MessageTypeDefinition + SInt32Rules: MessageTypeDefinition + SInt64Rules: MessageTypeDefinition + StringRules: MessageTypeDefinition + TimestampRules: MessageTypeDefinition + UInt32Rules: MessageTypeDefinition + UInt64Rules: MessageTypeDefinition + } +} + diff --git a/packages/grpc-js/src/generated/udpa/annotations/FieldMigrateAnnotation.ts b/packages/grpc-js/src/generated/udpa/annotations/FieldMigrateAnnotation.ts new file mode 100644 index 000000000..1ad015b25 --- /dev/null +++ b/packages/grpc-js/src/generated/udpa/annotations/FieldMigrateAnnotation.ts @@ -0,0 +1,28 @@ +// Original file: deps/udpa/udpa/annotations/migrate.proto + + +export interface FieldMigrateAnnotation { + /** + * Rename the field in next version. + */ + 'rename'?: (string); + /** + * Add the field to a named oneof in next version. If this already exists, the + * field will join its siblings under the oneof, otherwise a new oneof will be + * created with the given name. + */ + 'oneof_promotion'?: (string); +} + +export interface FieldMigrateAnnotation__Output { + /** + * Rename the field in next version. + */ + 'rename': (string); + /** + * Add the field to a named oneof in next version. If this already exists, the + * field will join its siblings under the oneof, otherwise a new oneof will be + * created with the given name. + */ + 'oneof_promotion': (string); +} diff --git a/packages/grpc-js/src/generated/udpa/annotations/FileMigrateAnnotation.ts b/packages/grpc-js/src/generated/udpa/annotations/FileMigrateAnnotation.ts new file mode 100644 index 000000000..b7ef7c21d --- /dev/null +++ b/packages/grpc-js/src/generated/udpa/annotations/FileMigrateAnnotation.ts @@ -0,0 +1,18 @@ +// Original file: deps/udpa/udpa/annotations/migrate.proto + + +export interface FileMigrateAnnotation { + /** + * Move all types in the file to another package, this implies changing proto + * file path. + */ + 'move_to_package'?: (string); +} + +export interface FileMigrateAnnotation__Output { + /** + * Move all types in the file to another package, this implies changing proto + * file path. + */ + 'move_to_package': (string); +} diff --git a/packages/grpc-js/src/generated/udpa/annotations/MigrateAnnotation.ts b/packages/grpc-js/src/generated/udpa/annotations/MigrateAnnotation.ts new file mode 100644 index 000000000..e3fdcaa99 --- /dev/null +++ b/packages/grpc-js/src/generated/udpa/annotations/MigrateAnnotation.ts @@ -0,0 +1,16 @@ +// Original file: deps/udpa/udpa/annotations/migrate.proto + + +export interface MigrateAnnotation { + /** + * Rename the message/enum/enum value in next version. + */ + 'rename'?: (string); +} + +export interface MigrateAnnotation__Output { + /** + * Rename the message/enum/enum value in next version. + */ + 'rename': (string); +} diff --git a/packages/grpc-js/src/generated/udpa/annotations/PackageVersionStatus.ts b/packages/grpc-js/src/generated/udpa/annotations/PackageVersionStatus.ts new file mode 100644 index 000000000..c60c3f984 --- /dev/null +++ b/packages/grpc-js/src/generated/udpa/annotations/PackageVersionStatus.ts @@ -0,0 +1,21 @@ +// Original file: deps/udpa/udpa/annotations/status.proto + +export enum PackageVersionStatus { + /** + * Unknown package version status. + */ + UNKNOWN = 0, + /** + * This version of the package is frozen. + */ + FROZEN = 1, + /** + * This version of the package is the active development version. + */ + ACTIVE = 2, + /** + * This version of the package is the candidate for the next major version. It + * is typically machine generated from the active development version. + */ + NEXT_MAJOR_VERSION_CANDIDATE = 3, +} diff --git a/packages/grpc-js/src/generated/udpa/annotations/StatusAnnotation.ts b/packages/grpc-js/src/generated/udpa/annotations/StatusAnnotation.ts new file mode 100644 index 000000000..1b00aa9fc --- /dev/null +++ b/packages/grpc-js/src/generated/udpa/annotations/StatusAnnotation.ts @@ -0,0 +1,25 @@ +// Original file: deps/udpa/udpa/annotations/status.proto + +import { PackageVersionStatus as _udpa_annotations_PackageVersionStatus } from '../../udpa/annotations/PackageVersionStatus'; + +export interface StatusAnnotation { + /** + * The entity is work-in-progress and subject to breaking changes. + */ + 'work_in_progress'?: (boolean); + /** + * The entity belongs to a package with the given version status. + */ + 'package_version_status'?: (_udpa_annotations_PackageVersionStatus | keyof typeof _udpa_annotations_PackageVersionStatus); +} + +export interface StatusAnnotation__Output { + /** + * The entity is work-in-progress and subject to breaking changes. + */ + 'work_in_progress': (boolean); + /** + * The entity belongs to a package with the given version status. + */ + 'package_version_status': (keyof typeof _udpa_annotations_PackageVersionStatus); +} diff --git a/packages/grpc-js/src/generated/validate/AnyRules.ts b/packages/grpc-js/src/generated/validate/AnyRules.ts new file mode 100644 index 000000000..6b16d986c --- /dev/null +++ b/packages/grpc-js/src/generated/validate/AnyRules.ts @@ -0,0 +1,44 @@ +// Original file: deps/protoc-gen-validate/validate/validate.proto + + +/** + * AnyRules describe constraints applied exclusively to the + * `google.protobuf.Any` well-known type + */ +export interface AnyRules { + /** + * Required specifies that this field must be set + */ + 'required'?: (boolean); + /** + * In specifies that this field's `type_url` must be equal to one of the + * specified values. + */ + 'in'?: (string)[]; + /** + * NotIn specifies that this field's `type_url` must not be equal to any of + * the specified values. + */ + 'not_in'?: (string)[]; +} + +/** + * AnyRules describe constraints applied exclusively to the + * `google.protobuf.Any` well-known type + */ +export interface AnyRules__Output { + /** + * Required specifies that this field must be set + */ + 'required': (boolean); + /** + * In specifies that this field's `type_url` must be equal to one of the + * specified values. + */ + 'in': (string)[]; + /** + * NotIn specifies that this field's `type_url` must not be equal to any of + * the specified values. + */ + 'not_in': (string)[]; +} diff --git a/packages/grpc-js/src/generated/validate/BoolRules.ts b/packages/grpc-js/src/generated/validate/BoolRules.ts new file mode 100644 index 000000000..3fd2a7a64 --- /dev/null +++ b/packages/grpc-js/src/generated/validate/BoolRules.ts @@ -0,0 +1,22 @@ +// Original file: deps/protoc-gen-validate/validate/validate.proto + + +/** + * BoolRules describes the constraints applied to `bool` values + */ +export interface BoolRules { + /** + * Const specifies that this field must be exactly the specified value + */ + 'const'?: (boolean); +} + +/** + * BoolRules describes the constraints applied to `bool` values + */ +export interface BoolRules__Output { + /** + * Const specifies that this field must be exactly the specified value + */ + 'const': (boolean); +} diff --git a/packages/grpc-js/src/generated/validate/BytesRules.ts b/packages/grpc-js/src/generated/validate/BytesRules.ts new file mode 100644 index 000000000..656d70194 --- /dev/null +++ b/packages/grpc-js/src/generated/validate/BytesRules.ts @@ -0,0 +1,153 @@ +// Original file: deps/protoc-gen-validate/validate/validate.proto + +import { Long } from '@grpc/proto-loader'; + +/** + * BytesRules describe the constraints applied to `bytes` values + */ +export interface BytesRules { + /** + * Const specifies that this field must be exactly the specified value + */ + 'const'?: (Buffer | Uint8Array | string); + /** + * MinLen specifies that this field must be the specified number of bytes + * at a minimum + */ + 'min_len'?: (number | string | Long); + /** + * MaxLen specifies that this field must be the specified number of bytes + * at a maximum + */ + 'max_len'?: (number | string | Long); + /** + * Pattern specifes that this field must match against the specified + * regular expression (RE2 syntax). The included expression should elide + * any delimiters. + */ + 'pattern'?: (string); + /** + * Prefix specifies that this field must have the specified bytes at the + * beginning of the string. + */ + 'prefix'?: (Buffer | Uint8Array | string); + /** + * Suffix specifies that this field must have the specified bytes at the + * end of the string. + */ + 'suffix'?: (Buffer | Uint8Array | string); + /** + * Contains specifies that this field must have the specified bytes + * anywhere in the string. + */ + 'contains'?: (Buffer | Uint8Array | string); + /** + * In specifies that this field must be equal to one of the specified + * values + */ + 'in'?: (Buffer | Uint8Array | string)[]; + /** + * NotIn specifies that this field cannot be equal to one of the specified + * values + */ + 'not_in'?: (Buffer | Uint8Array | string)[]; + /** + * Ip specifies that the field must be a valid IP (v4 or v6) address in + * byte format + */ + 'ip'?: (boolean); + /** + * Ipv4 specifies that the field must be a valid IPv4 address in byte + * format + */ + 'ipv4'?: (boolean); + /** + * Ipv6 specifies that the field must be a valid IPv6 address in byte + * format + */ + 'ipv6'?: (boolean); + /** + * Len specifies that this field must be the specified number of bytes + */ + 'len'?: (number | string | Long); + /** + * WellKnown rules provide advanced constraints against common byte + * patterns + */ + 'well_known'?: "ip"|"ipv4"|"ipv6"; +} + +/** + * BytesRules describe the constraints applied to `bytes` values + */ +export interface BytesRules__Output { + /** + * Const specifies that this field must be exactly the specified value + */ + 'const': (Buffer); + /** + * MinLen specifies that this field must be the specified number of bytes + * at a minimum + */ + 'min_len': (string); + /** + * MaxLen specifies that this field must be the specified number of bytes + * at a maximum + */ + 'max_len': (string); + /** + * Pattern specifes that this field must match against the specified + * regular expression (RE2 syntax). The included expression should elide + * any delimiters. + */ + 'pattern': (string); + /** + * Prefix specifies that this field must have the specified bytes at the + * beginning of the string. + */ + 'prefix': (Buffer); + /** + * Suffix specifies that this field must have the specified bytes at the + * end of the string. + */ + 'suffix': (Buffer); + /** + * Contains specifies that this field must have the specified bytes + * anywhere in the string. + */ + 'contains': (Buffer); + /** + * In specifies that this field must be equal to one of the specified + * values + */ + 'in': (Buffer)[]; + /** + * NotIn specifies that this field cannot be equal to one of the specified + * values + */ + 'not_in': (Buffer)[]; + /** + * Ip specifies that the field must be a valid IP (v4 or v6) address in + * byte format + */ + 'ip'?: (boolean); + /** + * Ipv4 specifies that the field must be a valid IPv4 address in byte + * format + */ + 'ipv4'?: (boolean); + /** + * Ipv6 specifies that the field must be a valid IPv6 address in byte + * format + */ + 'ipv6'?: (boolean); + /** + * Len specifies that this field must be the specified number of bytes + */ + 'len': (string); + /** + * WellKnown rules provide advanced constraints against common byte + * patterns + */ + 'well_known': "ip"|"ipv4"|"ipv6"; +} diff --git a/packages/grpc-js/src/generated/validate/DoubleRules.ts b/packages/grpc-js/src/generated/validate/DoubleRules.ts new file mode 100644 index 000000000..fead5072a --- /dev/null +++ b/packages/grpc-js/src/generated/validate/DoubleRules.ts @@ -0,0 +1,86 @@ +// Original file: deps/protoc-gen-validate/validate/validate.proto + + +/** + * DoubleRules describes the constraints applied to `double` values + */ +export interface DoubleRules { + /** + * Const specifies that this field must be exactly the specified value + */ + 'const'?: (number | string); + /** + * Lt specifies that this field must be less than the specified value, + * exclusive + */ + 'lt'?: (number | string); + /** + * Lte specifies that this field must be less than or equal to the + * specified value, inclusive + */ + 'lte'?: (number | string); + /** + * Gt specifies that this field must be greater than the specified value, + * exclusive. If the value of Gt is larger than a specified Lt or Lte, the + * range is reversed. + */ + 'gt'?: (number | string); + /** + * Gte specifies that this field must be greater than or equal to the + * specified value, inclusive. If the value of Gte is larger than a + * specified Lt or Lte, the range is reversed. + */ + 'gte'?: (number | string); + /** + * In specifies that this field must be equal to one of the specified + * values + */ + 'in'?: (number | string)[]; + /** + * NotIn specifies that this field cannot be equal to one of the specified + * values + */ + 'not_in'?: (number | string)[]; +} + +/** + * DoubleRules describes the constraints applied to `double` values + */ +export interface DoubleRules__Output { + /** + * Const specifies that this field must be exactly the specified value + */ + 'const': (number | string); + /** + * Lt specifies that this field must be less than the specified value, + * exclusive + */ + 'lt': (number | string); + /** + * Lte specifies that this field must be less than or equal to the + * specified value, inclusive + */ + 'lte': (number | string); + /** + * Gt specifies that this field must be greater than the specified value, + * exclusive. If the value of Gt is larger than a specified Lt or Lte, the + * range is reversed. + */ + 'gt': (number | string); + /** + * Gte specifies that this field must be greater than or equal to the + * specified value, inclusive. If the value of Gte is larger than a + * specified Lt or Lte, the range is reversed. + */ + 'gte': (number | string); + /** + * In specifies that this field must be equal to one of the specified + * values + */ + 'in': (number | string)[]; + /** + * NotIn specifies that this field cannot be equal to one of the specified + * values + */ + 'not_in': (number | string)[]; +} diff --git a/packages/grpc-js/src/generated/validate/DurationRules.ts b/packages/grpc-js/src/generated/validate/DurationRules.ts new file mode 100644 index 000000000..8a74651c8 --- /dev/null +++ b/packages/grpc-js/src/generated/validate/DurationRules.ts @@ -0,0 +1,93 @@ +// Original file: deps/protoc-gen-validate/validate/validate.proto + +import { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from '../google/protobuf/Duration'; + +/** + * DurationRules describe the constraints applied exclusively to the + * `google.protobuf.Duration` well-known type + */ +export interface DurationRules { + /** + * Required specifies that this field must be set + */ + 'required'?: (boolean); + /** + * Const specifies that this field must be exactly the specified value + */ + 'const'?: (_google_protobuf_Duration); + /** + * Lt specifies that this field must be less than the specified value, + * exclusive + */ + 'lt'?: (_google_protobuf_Duration); + /** + * Lt specifies that this field must be less than the specified value, + * inclusive + */ + 'lte'?: (_google_protobuf_Duration); + /** + * Gt specifies that this field must be greater than the specified value, + * exclusive + */ + 'gt'?: (_google_protobuf_Duration); + /** + * Gte specifies that this field must be greater than the specified value, + * inclusive + */ + 'gte'?: (_google_protobuf_Duration); + /** + * In specifies that this field must be equal to one of the specified + * values + */ + 'in'?: (_google_protobuf_Duration)[]; + /** + * NotIn specifies that this field cannot be equal to one of the specified + * values + */ + 'not_in'?: (_google_protobuf_Duration)[]; +} + +/** + * DurationRules describe the constraints applied exclusively to the + * `google.protobuf.Duration` well-known type + */ +export interface DurationRules__Output { + /** + * Required specifies that this field must be set + */ + 'required': (boolean); + /** + * Const specifies that this field must be exactly the specified value + */ + 'const'?: (_google_protobuf_Duration__Output); + /** + * Lt specifies that this field must be less than the specified value, + * exclusive + */ + 'lt'?: (_google_protobuf_Duration__Output); + /** + * Lt specifies that this field must be less than the specified value, + * inclusive + */ + 'lte'?: (_google_protobuf_Duration__Output); + /** + * Gt specifies that this field must be greater than the specified value, + * exclusive + */ + 'gt'?: (_google_protobuf_Duration__Output); + /** + * Gte specifies that this field must be greater than the specified value, + * inclusive + */ + 'gte'?: (_google_protobuf_Duration__Output); + /** + * In specifies that this field must be equal to one of the specified + * values + */ + 'in': (_google_protobuf_Duration__Output)[]; + /** + * NotIn specifies that this field cannot be equal to one of the specified + * values + */ + 'not_in': (_google_protobuf_Duration__Output)[]; +} diff --git a/packages/grpc-js/src/generated/validate/EnumRules.ts b/packages/grpc-js/src/generated/validate/EnumRules.ts new file mode 100644 index 000000000..c70eb0b19 --- /dev/null +++ b/packages/grpc-js/src/generated/validate/EnumRules.ts @@ -0,0 +1,52 @@ +// Original file: deps/protoc-gen-validate/validate/validate.proto + + +/** + * EnumRules describe the constraints applied to enum values + */ +export interface EnumRules { + /** + * Const specifies that this field must be exactly the specified value + */ + 'const'?: (number); + /** + * DefinedOnly specifies that this field must be only one of the defined + * values for this enum, failing on any undefined value. + */ + 'defined_only'?: (boolean); + /** + * In specifies that this field must be equal to one of the specified + * values + */ + 'in'?: (number)[]; + /** + * NotIn specifies that this field cannot be equal to one of the specified + * values + */ + 'not_in'?: (number)[]; +} + +/** + * EnumRules describe the constraints applied to enum values + */ +export interface EnumRules__Output { + /** + * Const specifies that this field must be exactly the specified value + */ + 'const': (number); + /** + * DefinedOnly specifies that this field must be only one of the defined + * values for this enum, failing on any undefined value. + */ + 'defined_only': (boolean); + /** + * In specifies that this field must be equal to one of the specified + * values + */ + 'in': (number)[]; + /** + * NotIn specifies that this field cannot be equal to one of the specified + * values + */ + 'not_in': (number)[]; +} diff --git a/packages/grpc-js/src/generated/validate/FieldRules.ts b/packages/grpc-js/src/generated/validate/FieldRules.ts new file mode 100644 index 000000000..09cd9d9ee --- /dev/null +++ b/packages/grpc-js/src/generated/validate/FieldRules.ts @@ -0,0 +1,103 @@ +// Original file: deps/protoc-gen-validate/validate/validate.proto + +import { FloatRules as _validate_FloatRules, FloatRules__Output as _validate_FloatRules__Output } from '../validate/FloatRules'; +import { DoubleRules as _validate_DoubleRules, DoubleRules__Output as _validate_DoubleRules__Output } from '../validate/DoubleRules'; +import { Int32Rules as _validate_Int32Rules, Int32Rules__Output as _validate_Int32Rules__Output } from '../validate/Int32Rules'; +import { Int64Rules as _validate_Int64Rules, Int64Rules__Output as _validate_Int64Rules__Output } from '../validate/Int64Rules'; +import { UInt32Rules as _validate_UInt32Rules, UInt32Rules__Output as _validate_UInt32Rules__Output } from '../validate/UInt32Rules'; +import { UInt64Rules as _validate_UInt64Rules, UInt64Rules__Output as _validate_UInt64Rules__Output } from '../validate/UInt64Rules'; +import { SInt32Rules as _validate_SInt32Rules, SInt32Rules__Output as _validate_SInt32Rules__Output } from '../validate/SInt32Rules'; +import { SInt64Rules as _validate_SInt64Rules, SInt64Rules__Output as _validate_SInt64Rules__Output } from '../validate/SInt64Rules'; +import { Fixed32Rules as _validate_Fixed32Rules, Fixed32Rules__Output as _validate_Fixed32Rules__Output } from '../validate/Fixed32Rules'; +import { Fixed64Rules as _validate_Fixed64Rules, Fixed64Rules__Output as _validate_Fixed64Rules__Output } from '../validate/Fixed64Rules'; +import { SFixed32Rules as _validate_SFixed32Rules, SFixed32Rules__Output as _validate_SFixed32Rules__Output } from '../validate/SFixed32Rules'; +import { SFixed64Rules as _validate_SFixed64Rules, SFixed64Rules__Output as _validate_SFixed64Rules__Output } from '../validate/SFixed64Rules'; +import { BoolRules as _validate_BoolRules, BoolRules__Output as _validate_BoolRules__Output } from '../validate/BoolRules'; +import { StringRules as _validate_StringRules, StringRules__Output as _validate_StringRules__Output } from '../validate/StringRules'; +import { BytesRules as _validate_BytesRules, BytesRules__Output as _validate_BytesRules__Output } from '../validate/BytesRules'; +import { EnumRules as _validate_EnumRules, EnumRules__Output as _validate_EnumRules__Output } from '../validate/EnumRules'; +import { MessageRules as _validate_MessageRules, MessageRules__Output as _validate_MessageRules__Output } from '../validate/MessageRules'; +import { RepeatedRules as _validate_RepeatedRules, RepeatedRules__Output as _validate_RepeatedRules__Output } from '../validate/RepeatedRules'; +import { MapRules as _validate_MapRules, MapRules__Output as _validate_MapRules__Output } from '../validate/MapRules'; +import { AnyRules as _validate_AnyRules, AnyRules__Output as _validate_AnyRules__Output } from '../validate/AnyRules'; +import { DurationRules as _validate_DurationRules, DurationRules__Output as _validate_DurationRules__Output } from '../validate/DurationRules'; +import { TimestampRules as _validate_TimestampRules, TimestampRules__Output as _validate_TimestampRules__Output } from '../validate/TimestampRules'; +import { Long } from '@grpc/proto-loader'; + +/** + * FieldRules encapsulates the rules for each type of field. Depending on the + * field, the correct set should be used to ensure proper validations. + */ +export interface FieldRules { + /** + * Scalar Field Types + */ + 'float'?: (_validate_FloatRules); + 'double'?: (_validate_DoubleRules); + 'int32'?: (_validate_Int32Rules); + 'int64'?: (_validate_Int64Rules); + 'uint32'?: (_validate_UInt32Rules); + 'uint64'?: (_validate_UInt64Rules); + 'sint32'?: (_validate_SInt32Rules); + 'sint64'?: (_validate_SInt64Rules); + 'fixed32'?: (_validate_Fixed32Rules); + 'fixed64'?: (_validate_Fixed64Rules); + 'sfixed32'?: (_validate_SFixed32Rules); + 'sfixed64'?: (_validate_SFixed64Rules); + 'bool'?: (_validate_BoolRules); + 'string'?: (_validate_StringRules); + 'bytes'?: (_validate_BytesRules); + /** + * Complex Field Types + */ + 'enum'?: (_validate_EnumRules); + 'message'?: (_validate_MessageRules); + 'repeated'?: (_validate_RepeatedRules); + 'map'?: (_validate_MapRules); + /** + * Well-Known Field Types + */ + 'any'?: (_validate_AnyRules); + 'duration'?: (_validate_DurationRules); + 'timestamp'?: (_validate_TimestampRules); + 'type'?: "float"|"double"|"int32"|"int64"|"uint32"|"uint64"|"sint32"|"sint64"|"fixed32"|"fixed64"|"sfixed32"|"sfixed64"|"bool"|"string"|"bytes"|"enum"|"repeated"|"map"|"any"|"duration"|"timestamp"; +} + +/** + * FieldRules encapsulates the rules for each type of field. Depending on the + * field, the correct set should be used to ensure proper validations. + */ +export interface FieldRules__Output { + /** + * Scalar Field Types + */ + 'float'?: (_validate_FloatRules__Output); + 'double'?: (_validate_DoubleRules__Output); + 'int32'?: (_validate_Int32Rules__Output); + 'int64'?: (_validate_Int64Rules__Output); + 'uint32'?: (_validate_UInt32Rules__Output); + 'uint64'?: (_validate_UInt64Rules__Output); + 'sint32'?: (_validate_SInt32Rules__Output); + 'sint64'?: (_validate_SInt64Rules__Output); + 'fixed32'?: (_validate_Fixed32Rules__Output); + 'fixed64'?: (_validate_Fixed64Rules__Output); + 'sfixed32'?: (_validate_SFixed32Rules__Output); + 'sfixed64'?: (_validate_SFixed64Rules__Output); + 'bool'?: (_validate_BoolRules__Output); + 'string'?: (_validate_StringRules__Output); + 'bytes'?: (_validate_BytesRules__Output); + /** + * Complex Field Types + */ + 'enum'?: (_validate_EnumRules__Output); + 'message'?: (_validate_MessageRules__Output); + 'repeated'?: (_validate_RepeatedRules__Output); + 'map'?: (_validate_MapRules__Output); + /** + * Well-Known Field Types + */ + 'any'?: (_validate_AnyRules__Output); + 'duration'?: (_validate_DurationRules__Output); + 'timestamp'?: (_validate_TimestampRules__Output); + 'type': "float"|"double"|"int32"|"int64"|"uint32"|"uint64"|"sint32"|"sint64"|"fixed32"|"fixed64"|"sfixed32"|"sfixed64"|"bool"|"string"|"bytes"|"enum"|"repeated"|"map"|"any"|"duration"|"timestamp"; +} diff --git a/packages/grpc-js/src/generated/validate/Fixed32Rules.ts b/packages/grpc-js/src/generated/validate/Fixed32Rules.ts new file mode 100644 index 000000000..e88953875 --- /dev/null +++ b/packages/grpc-js/src/generated/validate/Fixed32Rules.ts @@ -0,0 +1,86 @@ +// Original file: deps/protoc-gen-validate/validate/validate.proto + + +/** + * Fixed32Rules describes the constraints applied to `fixed32` values + */ +export interface Fixed32Rules { + /** + * Const specifies that this field must be exactly the specified value + */ + 'const'?: (number); + /** + * Lt specifies that this field must be less than the specified value, + * exclusive + */ + 'lt'?: (number); + /** + * Lte specifies that this field must be less than or equal to the + * specified value, inclusive + */ + 'lte'?: (number); + /** + * Gt specifies that this field must be greater than the specified value, + * exclusive. If the value of Gt is larger than a specified Lt or Lte, the + * range is reversed. + */ + 'gt'?: (number); + /** + * Gte specifies that this field must be greater than or equal to the + * specified value, inclusive. If the value of Gte is larger than a + * specified Lt or Lte, the range is reversed. + */ + 'gte'?: (number); + /** + * In specifies that this field must be equal to one of the specified + * values + */ + 'in'?: (number)[]; + /** + * NotIn specifies that this field cannot be equal to one of the specified + * values + */ + 'not_in'?: (number)[]; +} + +/** + * Fixed32Rules describes the constraints applied to `fixed32` values + */ +export interface Fixed32Rules__Output { + /** + * Const specifies that this field must be exactly the specified value + */ + 'const': (number); + /** + * Lt specifies that this field must be less than the specified value, + * exclusive + */ + 'lt': (number); + /** + * Lte specifies that this field must be less than or equal to the + * specified value, inclusive + */ + 'lte': (number); + /** + * Gt specifies that this field must be greater than the specified value, + * exclusive. If the value of Gt is larger than a specified Lt or Lte, the + * range is reversed. + */ + 'gt': (number); + /** + * Gte specifies that this field must be greater than or equal to the + * specified value, inclusive. If the value of Gte is larger than a + * specified Lt or Lte, the range is reversed. + */ + 'gte': (number); + /** + * In specifies that this field must be equal to one of the specified + * values + */ + 'in': (number)[]; + /** + * NotIn specifies that this field cannot be equal to one of the specified + * values + */ + 'not_in': (number)[]; +} diff --git a/packages/grpc-js/src/generated/validate/Fixed64Rules.ts b/packages/grpc-js/src/generated/validate/Fixed64Rules.ts new file mode 100644 index 000000000..0b750efc8 --- /dev/null +++ b/packages/grpc-js/src/generated/validate/Fixed64Rules.ts @@ -0,0 +1,87 @@ +// Original file: deps/protoc-gen-validate/validate/validate.proto + +import { Long } from '@grpc/proto-loader'; + +/** + * Fixed64Rules describes the constraints applied to `fixed64` values + */ +export interface Fixed64Rules { + /** + * Const specifies that this field must be exactly the specified value + */ + 'const'?: (number | string | Long); + /** + * Lt specifies that this field must be less than the specified value, + * exclusive + */ + 'lt'?: (number | string | Long); + /** + * Lte specifies that this field must be less than or equal to the + * specified value, inclusive + */ + 'lte'?: (number | string | Long); + /** + * Gt specifies that this field must be greater than the specified value, + * exclusive. If the value of Gt is larger than a specified Lt or Lte, the + * range is reversed. + */ + 'gt'?: (number | string | Long); + /** + * Gte specifies that this field must be greater than or equal to the + * specified value, inclusive. If the value of Gte is larger than a + * specified Lt or Lte, the range is reversed. + */ + 'gte'?: (number | string | Long); + /** + * In specifies that this field must be equal to one of the specified + * values + */ + 'in'?: (number | string | Long)[]; + /** + * NotIn specifies that this field cannot be equal to one of the specified + * values + */ + 'not_in'?: (number | string | Long)[]; +} + +/** + * Fixed64Rules describes the constraints applied to `fixed64` values + */ +export interface Fixed64Rules__Output { + /** + * Const specifies that this field must be exactly the specified value + */ + 'const': (string); + /** + * Lt specifies that this field must be less than the specified value, + * exclusive + */ + 'lt': (string); + /** + * Lte specifies that this field must be less than or equal to the + * specified value, inclusive + */ + 'lte': (string); + /** + * Gt specifies that this field must be greater than the specified value, + * exclusive. If the value of Gt is larger than a specified Lt or Lte, the + * range is reversed. + */ + 'gt': (string); + /** + * Gte specifies that this field must be greater than or equal to the + * specified value, inclusive. If the value of Gte is larger than a + * specified Lt or Lte, the range is reversed. + */ + 'gte': (string); + /** + * In specifies that this field must be equal to one of the specified + * values + */ + 'in': (string)[]; + /** + * NotIn specifies that this field cannot be equal to one of the specified + * values + */ + 'not_in': (string)[]; +} diff --git a/packages/grpc-js/src/generated/validate/FloatRules.ts b/packages/grpc-js/src/generated/validate/FloatRules.ts new file mode 100644 index 000000000..35aafa809 --- /dev/null +++ b/packages/grpc-js/src/generated/validate/FloatRules.ts @@ -0,0 +1,86 @@ +// Original file: deps/protoc-gen-validate/validate/validate.proto + + +/** + * FloatRules describes the constraints applied to `float` values + */ +export interface FloatRules { + /** + * Const specifies that this field must be exactly the specified value + */ + 'const'?: (number | string); + /** + * Lt specifies that this field must be less than the specified value, + * exclusive + */ + 'lt'?: (number | string); + /** + * Lte specifies that this field must be less than or equal to the + * specified value, inclusive + */ + 'lte'?: (number | string); + /** + * Gt specifies that this field must be greater than the specified value, + * exclusive. If the value of Gt is larger than a specified Lt or Lte, the + * range is reversed. + */ + 'gt'?: (number | string); + /** + * Gte specifies that this field must be greater than or equal to the + * specified value, inclusive. If the value of Gte is larger than a + * specified Lt or Lte, the range is reversed. + */ + 'gte'?: (number | string); + /** + * In specifies that this field must be equal to one of the specified + * values + */ + 'in'?: (number | string)[]; + /** + * NotIn specifies that this field cannot be equal to one of the specified + * values + */ + 'not_in'?: (number | string)[]; +} + +/** + * FloatRules describes the constraints applied to `float` values + */ +export interface FloatRules__Output { + /** + * Const specifies that this field must be exactly the specified value + */ + 'const': (number | string); + /** + * Lt specifies that this field must be less than the specified value, + * exclusive + */ + 'lt': (number | string); + /** + * Lte specifies that this field must be less than or equal to the + * specified value, inclusive + */ + 'lte': (number | string); + /** + * Gt specifies that this field must be greater than the specified value, + * exclusive. If the value of Gt is larger than a specified Lt or Lte, the + * range is reversed. + */ + 'gt': (number | string); + /** + * Gte specifies that this field must be greater than or equal to the + * specified value, inclusive. If the value of Gte is larger than a + * specified Lt or Lte, the range is reversed. + */ + 'gte': (number | string); + /** + * In specifies that this field must be equal to one of the specified + * values + */ + 'in': (number | string)[]; + /** + * NotIn specifies that this field cannot be equal to one of the specified + * values + */ + 'not_in': (number | string)[]; +} diff --git a/packages/grpc-js/src/generated/validate/Int32Rules.ts b/packages/grpc-js/src/generated/validate/Int32Rules.ts new file mode 100644 index 000000000..ea7ed42f3 --- /dev/null +++ b/packages/grpc-js/src/generated/validate/Int32Rules.ts @@ -0,0 +1,86 @@ +// Original file: deps/protoc-gen-validate/validate/validate.proto + + +/** + * Int32Rules describes the constraints applied to `int32` values + */ +export interface Int32Rules { + /** + * Const specifies that this field must be exactly the specified value + */ + 'const'?: (number); + /** + * Lt specifies that this field must be less than the specified value, + * exclusive + */ + 'lt'?: (number); + /** + * Lte specifies that this field must be less than or equal to the + * specified value, inclusive + */ + 'lte'?: (number); + /** + * Gt specifies that this field must be greater than the specified value, + * exclusive. If the value of Gt is larger than a specified Lt or Lte, the + * range is reversed. + */ + 'gt'?: (number); + /** + * Gte specifies that this field must be greater than or equal to the + * specified value, inclusive. If the value of Gte is larger than a + * specified Lt or Lte, the range is reversed. + */ + 'gte'?: (number); + /** + * In specifies that this field must be equal to one of the specified + * values + */ + 'in'?: (number)[]; + /** + * NotIn specifies that this field cannot be equal to one of the specified + * values + */ + 'not_in'?: (number)[]; +} + +/** + * Int32Rules describes the constraints applied to `int32` values + */ +export interface Int32Rules__Output { + /** + * Const specifies that this field must be exactly the specified value + */ + 'const': (number); + /** + * Lt specifies that this field must be less than the specified value, + * exclusive + */ + 'lt': (number); + /** + * Lte specifies that this field must be less than or equal to the + * specified value, inclusive + */ + 'lte': (number); + /** + * Gt specifies that this field must be greater than the specified value, + * exclusive. If the value of Gt is larger than a specified Lt or Lte, the + * range is reversed. + */ + 'gt': (number); + /** + * Gte specifies that this field must be greater than or equal to the + * specified value, inclusive. If the value of Gte is larger than a + * specified Lt or Lte, the range is reversed. + */ + 'gte': (number); + /** + * In specifies that this field must be equal to one of the specified + * values + */ + 'in': (number)[]; + /** + * NotIn specifies that this field cannot be equal to one of the specified + * values + */ + 'not_in': (number)[]; +} diff --git a/packages/grpc-js/src/generated/validate/Int64Rules.ts b/packages/grpc-js/src/generated/validate/Int64Rules.ts new file mode 100644 index 000000000..cb167c960 --- /dev/null +++ b/packages/grpc-js/src/generated/validate/Int64Rules.ts @@ -0,0 +1,87 @@ +// Original file: deps/protoc-gen-validate/validate/validate.proto + +import { Long } from '@grpc/proto-loader'; + +/** + * Int64Rules describes the constraints applied to `int64` values + */ +export interface Int64Rules { + /** + * Const specifies that this field must be exactly the specified value + */ + 'const'?: (number | string | Long); + /** + * Lt specifies that this field must be less than the specified value, + * exclusive + */ + 'lt'?: (number | string | Long); + /** + * Lte specifies that this field must be less than or equal to the + * specified value, inclusive + */ + 'lte'?: (number | string | Long); + /** + * Gt specifies that this field must be greater than the specified value, + * exclusive. If the value of Gt is larger than a specified Lt or Lte, the + * range is reversed. + */ + 'gt'?: (number | string | Long); + /** + * Gte specifies that this field must be greater than or equal to the + * specified value, inclusive. If the value of Gte is larger than a + * specified Lt or Lte, the range is reversed. + */ + 'gte'?: (number | string | Long); + /** + * In specifies that this field must be equal to one of the specified + * values + */ + 'in'?: (number | string | Long)[]; + /** + * NotIn specifies that this field cannot be equal to one of the specified + * values + */ + 'not_in'?: (number | string | Long)[]; +} + +/** + * Int64Rules describes the constraints applied to `int64` values + */ +export interface Int64Rules__Output { + /** + * Const specifies that this field must be exactly the specified value + */ + 'const': (string); + /** + * Lt specifies that this field must be less than the specified value, + * exclusive + */ + 'lt': (string); + /** + * Lte specifies that this field must be less than or equal to the + * specified value, inclusive + */ + 'lte': (string); + /** + * Gt specifies that this field must be greater than the specified value, + * exclusive. If the value of Gt is larger than a specified Lt or Lte, the + * range is reversed. + */ + 'gt': (string); + /** + * Gte specifies that this field must be greater than or equal to the + * specified value, inclusive. If the value of Gte is larger than a + * specified Lt or Lte, the range is reversed. + */ + 'gte': (string); + /** + * In specifies that this field must be equal to one of the specified + * values + */ + 'in': (string)[]; + /** + * NotIn specifies that this field cannot be equal to one of the specified + * values + */ + 'not_in': (string)[]; +} diff --git a/packages/grpc-js/src/generated/validate/KnownRegex.ts b/packages/grpc-js/src/generated/validate/KnownRegex.ts new file mode 100644 index 000000000..5880b5baf --- /dev/null +++ b/packages/grpc-js/src/generated/validate/KnownRegex.ts @@ -0,0 +1,16 @@ +// Original file: deps/protoc-gen-validate/validate/validate.proto + +/** + * WellKnownRegex contain some well-known patterns. + */ +export enum KnownRegex { + UNKNOWN = 0, + /** + * HTTP header name as defined by RFC 7230. + */ + HTTP_HEADER_NAME = 1, + /** + * HTTP header value as defined by RFC 7230. + */ + HTTP_HEADER_VALUE = 2, +} diff --git a/packages/grpc-js/src/generated/validate/MapRules.ts b/packages/grpc-js/src/generated/validate/MapRules.ts new file mode 100644 index 000000000..1be003f65 --- /dev/null +++ b/packages/grpc-js/src/generated/validate/MapRules.ts @@ -0,0 +1,66 @@ +// Original file: deps/protoc-gen-validate/validate/validate.proto + +import { FieldRules as _validate_FieldRules, FieldRules__Output as _validate_FieldRules__Output } from '../validate/FieldRules'; +import { Long } from '@grpc/proto-loader'; + +/** + * MapRules describe the constraints applied to `map` values + */ +export interface MapRules { + /** + * MinPairs specifies that this field must have the specified number of + * KVs at a minimum + */ + 'min_pairs'?: (number | string | Long); + /** + * MaxPairs specifies that this field must have the specified number of + * KVs at a maximum + */ + 'max_pairs'?: (number | string | Long); + /** + * NoSparse specifies values in this field cannot be unset. This only + * applies to map's with message value types. + */ + 'no_sparse'?: (boolean); + /** + * Keys specifies the constraints to be applied to each key in the field. + */ + 'keys'?: (_validate_FieldRules); + /** + * Values specifies the constraints to be applied to the value of each key + * in the field. Message values will still have their validations evaluated + * unless skip is specified here. + */ + 'values'?: (_validate_FieldRules); +} + +/** + * MapRules describe the constraints applied to `map` values + */ +export interface MapRules__Output { + /** + * MinPairs specifies that this field must have the specified number of + * KVs at a minimum + */ + 'min_pairs': (string); + /** + * MaxPairs specifies that this field must have the specified number of + * KVs at a maximum + */ + 'max_pairs': (string); + /** + * NoSparse specifies values in this field cannot be unset. This only + * applies to map's with message value types. + */ + 'no_sparse': (boolean); + /** + * Keys specifies the constraints to be applied to each key in the field. + */ + 'keys'?: (_validate_FieldRules__Output); + /** + * Values specifies the constraints to be applied to the value of each key + * in the field. Message values will still have their validations evaluated + * unless skip is specified here. + */ + 'values'?: (_validate_FieldRules__Output); +} diff --git a/packages/grpc-js/src/generated/validate/MessageRules.ts b/packages/grpc-js/src/generated/validate/MessageRules.ts new file mode 100644 index 000000000..d22a85c63 --- /dev/null +++ b/packages/grpc-js/src/generated/validate/MessageRules.ts @@ -0,0 +1,34 @@ +// Original file: deps/protoc-gen-validate/validate/validate.proto + + +/** + * MessageRules describe the constraints applied to embedded message values. + * For message-type fields, validation is performed recursively. + */ +export interface MessageRules { + /** + * Skip specifies that the validation rules of this field should not be + * evaluated + */ + 'skip'?: (boolean); + /** + * Required specifies that this field must be set + */ + 'required'?: (boolean); +} + +/** + * MessageRules describe the constraints applied to embedded message values. + * For message-type fields, validation is performed recursively. + */ +export interface MessageRules__Output { + /** + * Skip specifies that the validation rules of this field should not be + * evaluated + */ + 'skip': (boolean); + /** + * Required specifies that this field must be set + */ + 'required': (boolean); +} diff --git a/packages/grpc-js/src/generated/validate/RepeatedRules.ts b/packages/grpc-js/src/generated/validate/RepeatedRules.ts new file mode 100644 index 000000000..b3b690684 --- /dev/null +++ b/packages/grpc-js/src/generated/validate/RepeatedRules.ts @@ -0,0 +1,60 @@ +// Original file: deps/protoc-gen-validate/validate/validate.proto + +import { FieldRules as _validate_FieldRules, FieldRules__Output as _validate_FieldRules__Output } from '../validate/FieldRules'; +import { Long } from '@grpc/proto-loader'; + +/** + * RepeatedRules describe the constraints applied to `repeated` values + */ +export interface RepeatedRules { + /** + * MinItems specifies that this field must have the specified number of + * items at a minimum + */ + 'min_items'?: (number | string | Long); + /** + * MaxItems specifies that this field must have the specified number of + * items at a maximum + */ + 'max_items'?: (number | string | Long); + /** + * Unique specifies that all elements in this field must be unique. This + * contraint is only applicable to scalar and enum types (messages are not + * supported). + */ + 'unique'?: (boolean); + /** + * Items specifies the contraints to be applied to each item in the field. + * Repeated message fields will still execute validation against each item + * unless skip is specified here. + */ + 'items'?: (_validate_FieldRules); +} + +/** + * RepeatedRules describe the constraints applied to `repeated` values + */ +export interface RepeatedRules__Output { + /** + * MinItems specifies that this field must have the specified number of + * items at a minimum + */ + 'min_items': (string); + /** + * MaxItems specifies that this field must have the specified number of + * items at a maximum + */ + 'max_items': (string); + /** + * Unique specifies that all elements in this field must be unique. This + * contraint is only applicable to scalar and enum types (messages are not + * supported). + */ + 'unique': (boolean); + /** + * Items specifies the contraints to be applied to each item in the field. + * Repeated message fields will still execute validation against each item + * unless skip is specified here. + */ + 'items'?: (_validate_FieldRules__Output); +} diff --git a/packages/grpc-js/src/generated/validate/SFixed32Rules.ts b/packages/grpc-js/src/generated/validate/SFixed32Rules.ts new file mode 100644 index 000000000..892e8f018 --- /dev/null +++ b/packages/grpc-js/src/generated/validate/SFixed32Rules.ts @@ -0,0 +1,86 @@ +// Original file: deps/protoc-gen-validate/validate/validate.proto + + +/** + * SFixed32Rules describes the constraints applied to `sfixed32` values + */ +export interface SFixed32Rules { + /** + * Const specifies that this field must be exactly the specified value + */ + 'const'?: (number); + /** + * Lt specifies that this field must be less than the specified value, + * exclusive + */ + 'lt'?: (number); + /** + * Lte specifies that this field must be less than or equal to the + * specified value, inclusive + */ + 'lte'?: (number); + /** + * Gt specifies that this field must be greater than the specified value, + * exclusive. If the value of Gt is larger than a specified Lt or Lte, the + * range is reversed. + */ + 'gt'?: (number); + /** + * Gte specifies that this field must be greater than or equal to the + * specified value, inclusive. If the value of Gte is larger than a + * specified Lt or Lte, the range is reversed. + */ + 'gte'?: (number); + /** + * In specifies that this field must be equal to one of the specified + * values + */ + 'in'?: (number)[]; + /** + * NotIn specifies that this field cannot be equal to one of the specified + * values + */ + 'not_in'?: (number)[]; +} + +/** + * SFixed32Rules describes the constraints applied to `sfixed32` values + */ +export interface SFixed32Rules__Output { + /** + * Const specifies that this field must be exactly the specified value + */ + 'const': (number); + /** + * Lt specifies that this field must be less than the specified value, + * exclusive + */ + 'lt': (number); + /** + * Lte specifies that this field must be less than or equal to the + * specified value, inclusive + */ + 'lte': (number); + /** + * Gt specifies that this field must be greater than the specified value, + * exclusive. If the value of Gt is larger than a specified Lt or Lte, the + * range is reversed. + */ + 'gt': (number); + /** + * Gte specifies that this field must be greater than or equal to the + * specified value, inclusive. If the value of Gte is larger than a + * specified Lt or Lte, the range is reversed. + */ + 'gte': (number); + /** + * In specifies that this field must be equal to one of the specified + * values + */ + 'in': (number)[]; + /** + * NotIn specifies that this field cannot be equal to one of the specified + * values + */ + 'not_in': (number)[]; +} diff --git a/packages/grpc-js/src/generated/validate/SFixed64Rules.ts b/packages/grpc-js/src/generated/validate/SFixed64Rules.ts new file mode 100644 index 000000000..ccd5be954 --- /dev/null +++ b/packages/grpc-js/src/generated/validate/SFixed64Rules.ts @@ -0,0 +1,87 @@ +// Original file: deps/protoc-gen-validate/validate/validate.proto + +import { Long } from '@grpc/proto-loader'; + +/** + * SFixed64Rules describes the constraints applied to `sfixed64` values + */ +export interface SFixed64Rules { + /** + * Const specifies that this field must be exactly the specified value + */ + 'const'?: (number | string | Long); + /** + * Lt specifies that this field must be less than the specified value, + * exclusive + */ + 'lt'?: (number | string | Long); + /** + * Lte specifies that this field must be less than or equal to the + * specified value, inclusive + */ + 'lte'?: (number | string | Long); + /** + * Gt specifies that this field must be greater than the specified value, + * exclusive. If the value of Gt is larger than a specified Lt or Lte, the + * range is reversed. + */ + 'gt'?: (number | string | Long); + /** + * Gte specifies that this field must be greater than or equal to the + * specified value, inclusive. If the value of Gte is larger than a + * specified Lt or Lte, the range is reversed. + */ + 'gte'?: (number | string | Long); + /** + * In specifies that this field must be equal to one of the specified + * values + */ + 'in'?: (number | string | Long)[]; + /** + * NotIn specifies that this field cannot be equal to one of the specified + * values + */ + 'not_in'?: (number | string | Long)[]; +} + +/** + * SFixed64Rules describes the constraints applied to `sfixed64` values + */ +export interface SFixed64Rules__Output { + /** + * Const specifies that this field must be exactly the specified value + */ + 'const': (string); + /** + * Lt specifies that this field must be less than the specified value, + * exclusive + */ + 'lt': (string); + /** + * Lte specifies that this field must be less than or equal to the + * specified value, inclusive + */ + 'lte': (string); + /** + * Gt specifies that this field must be greater than the specified value, + * exclusive. If the value of Gt is larger than a specified Lt or Lte, the + * range is reversed. + */ + 'gt': (string); + /** + * Gte specifies that this field must be greater than or equal to the + * specified value, inclusive. If the value of Gte is larger than a + * specified Lt or Lte, the range is reversed. + */ + 'gte': (string); + /** + * In specifies that this field must be equal to one of the specified + * values + */ + 'in': (string)[]; + /** + * NotIn specifies that this field cannot be equal to one of the specified + * values + */ + 'not_in': (string)[]; +} diff --git a/packages/grpc-js/src/generated/validate/SInt32Rules.ts b/packages/grpc-js/src/generated/validate/SInt32Rules.ts new file mode 100644 index 000000000..744d067fc --- /dev/null +++ b/packages/grpc-js/src/generated/validate/SInt32Rules.ts @@ -0,0 +1,86 @@ +// Original file: deps/protoc-gen-validate/validate/validate.proto + + +/** + * SInt32Rules describes the constraints applied to `sint32` values + */ +export interface SInt32Rules { + /** + * Const specifies that this field must be exactly the specified value + */ + 'const'?: (number); + /** + * Lt specifies that this field must be less than the specified value, + * exclusive + */ + 'lt'?: (number); + /** + * Lte specifies that this field must be less than or equal to the + * specified value, inclusive + */ + 'lte'?: (number); + /** + * Gt specifies that this field must be greater than the specified value, + * exclusive. If the value of Gt is larger than a specified Lt or Lte, the + * range is reversed. + */ + 'gt'?: (number); + /** + * Gte specifies that this field must be greater than or equal to the + * specified value, inclusive. If the value of Gte is larger than a + * specified Lt or Lte, the range is reversed. + */ + 'gte'?: (number); + /** + * In specifies that this field must be equal to one of the specified + * values + */ + 'in'?: (number)[]; + /** + * NotIn specifies that this field cannot be equal to one of the specified + * values + */ + 'not_in'?: (number)[]; +} + +/** + * SInt32Rules describes the constraints applied to `sint32` values + */ +export interface SInt32Rules__Output { + /** + * Const specifies that this field must be exactly the specified value + */ + 'const': (number); + /** + * Lt specifies that this field must be less than the specified value, + * exclusive + */ + 'lt': (number); + /** + * Lte specifies that this field must be less than or equal to the + * specified value, inclusive + */ + 'lte': (number); + /** + * Gt specifies that this field must be greater than the specified value, + * exclusive. If the value of Gt is larger than a specified Lt or Lte, the + * range is reversed. + */ + 'gt': (number); + /** + * Gte specifies that this field must be greater than or equal to the + * specified value, inclusive. If the value of Gte is larger than a + * specified Lt or Lte, the range is reversed. + */ + 'gte': (number); + /** + * In specifies that this field must be equal to one of the specified + * values + */ + 'in': (number)[]; + /** + * NotIn specifies that this field cannot be equal to one of the specified + * values + */ + 'not_in': (number)[]; +} diff --git a/packages/grpc-js/src/generated/validate/SInt64Rules.ts b/packages/grpc-js/src/generated/validate/SInt64Rules.ts new file mode 100644 index 000000000..61b3dd35f --- /dev/null +++ b/packages/grpc-js/src/generated/validate/SInt64Rules.ts @@ -0,0 +1,87 @@ +// Original file: deps/protoc-gen-validate/validate/validate.proto + +import { Long } from '@grpc/proto-loader'; + +/** + * SInt64Rules describes the constraints applied to `sint64` values + */ +export interface SInt64Rules { + /** + * Const specifies that this field must be exactly the specified value + */ + 'const'?: (number | string | Long); + /** + * Lt specifies that this field must be less than the specified value, + * exclusive + */ + 'lt'?: (number | string | Long); + /** + * Lte specifies that this field must be less than or equal to the + * specified value, inclusive + */ + 'lte'?: (number | string | Long); + /** + * Gt specifies that this field must be greater than the specified value, + * exclusive. If the value of Gt is larger than a specified Lt or Lte, the + * range is reversed. + */ + 'gt'?: (number | string | Long); + /** + * Gte specifies that this field must be greater than or equal to the + * specified value, inclusive. If the value of Gte is larger than a + * specified Lt or Lte, the range is reversed. + */ + 'gte'?: (number | string | Long); + /** + * In specifies that this field must be equal to one of the specified + * values + */ + 'in'?: (number | string | Long)[]; + /** + * NotIn specifies that this field cannot be equal to one of the specified + * values + */ + 'not_in'?: (number | string | Long)[]; +} + +/** + * SInt64Rules describes the constraints applied to `sint64` values + */ +export interface SInt64Rules__Output { + /** + * Const specifies that this field must be exactly the specified value + */ + 'const': (string); + /** + * Lt specifies that this field must be less than the specified value, + * exclusive + */ + 'lt': (string); + /** + * Lte specifies that this field must be less than or equal to the + * specified value, inclusive + */ + 'lte': (string); + /** + * Gt specifies that this field must be greater than the specified value, + * exclusive. If the value of Gt is larger than a specified Lt or Lte, the + * range is reversed. + */ + 'gt': (string); + /** + * Gte specifies that this field must be greater than or equal to the + * specified value, inclusive. If the value of Gte is larger than a + * specified Lt or Lte, the range is reversed. + */ + 'gte': (string); + /** + * In specifies that this field must be equal to one of the specified + * values + */ + 'in': (string)[]; + /** + * NotIn specifies that this field cannot be equal to one of the specified + * values + */ + 'not_in': (string)[]; +} diff --git a/packages/grpc-js/src/generated/validate/StringRules.ts b/packages/grpc-js/src/generated/validate/StringRules.ts new file mode 100644 index 000000000..83d0b8e48 --- /dev/null +++ b/packages/grpc-js/src/generated/validate/StringRules.ts @@ -0,0 +1,288 @@ +// Original file: deps/protoc-gen-validate/validate/validate.proto + +import { KnownRegex as _validate_KnownRegex } from '../validate/KnownRegex'; +import { Long } from '@grpc/proto-loader'; + +/** + * StringRules describe the constraints applied to `string` values + */ +export interface StringRules { + /** + * Const specifies that this field must be exactly the specified value + */ + 'const'?: (string); + /** + * MinLen specifies that this field must be the specified number of + * characters (Unicode code points) at a minimum. Note that the number of + * characters may differ from the number of bytes in the string. + */ + 'min_len'?: (number | string | Long); + /** + * MaxLen specifies that this field must be the specified number of + * characters (Unicode code points) at a maximum. Note that the number of + * characters may differ from the number of bytes in the string. + */ + 'max_len'?: (number | string | Long); + /** + * MinBytes specifies that this field must be the specified number of bytes + * at a minimum + */ + 'min_bytes'?: (number | string | Long); + /** + * MaxBytes specifies that this field must be the specified number of bytes + * at a maximum + */ + 'max_bytes'?: (number | string | Long); + /** + * Pattern specifes that this field must match against the specified + * regular expression (RE2 syntax). The included expression should elide + * any delimiters. + */ + 'pattern'?: (string); + /** + * Prefix specifies that this field must have the specified substring at + * the beginning of the string. + */ + 'prefix'?: (string); + /** + * Suffix specifies that this field must have the specified substring at + * the end of the string. + */ + 'suffix'?: (string); + /** + * Contains specifies that this field must have the specified substring + * anywhere in the string. + */ + 'contains'?: (string); + /** + * In specifies that this field must be equal to one of the specified + * values + */ + 'in'?: (string)[]; + /** + * NotIn specifies that this field cannot be equal to one of the specified + * values + */ + 'not_in'?: (string)[]; + /** + * Email specifies that the field must be a valid email address as + * defined by RFC 5322 + */ + 'email'?: (boolean); + /** + * Hostname specifies that the field must be a valid hostname as + * defined by RFC 1034. This constraint does not support + * internationalized domain names (IDNs). + */ + 'hostname'?: (boolean); + /** + * Ip specifies that the field must be a valid IP (v4 or v6) address. + * Valid IPv6 addresses should not include surrounding square brackets. + */ + 'ip'?: (boolean); + /** + * Ipv4 specifies that the field must be a valid IPv4 address. + */ + 'ipv4'?: (boolean); + /** + * Ipv6 specifies that the field must be a valid IPv6 address. Valid + * IPv6 addresses should not include surrounding square brackets. + */ + 'ipv6'?: (boolean); + /** + * Uri specifies that the field must be a valid, absolute URI as defined + * by RFC 3986 + */ + 'uri'?: (boolean); + /** + * UriRef specifies that the field must be a valid URI as defined by RFC + * 3986 and may be relative or absolute. + */ + 'uri_ref'?: (boolean); + /** + * Len specifies that this field must be the specified number of + * characters (Unicode code points). Note that the number of + * characters may differ from the number of bytes in the string. + */ + 'len'?: (number | string | Long); + /** + * LenBytes specifies that this field must be the specified number of bytes + * at a minimum + */ + 'len_bytes'?: (number | string | Long); + /** + * Address specifies that the field must be either a valid hostname as + * defined by RFC 1034 (which does not support internationalized domain + * names or IDNs), or it can be a valid IP (v4 or v6). + */ + 'address'?: (boolean); + /** + * Uuid specifies that the field must be a valid UUID as defined by + * RFC 4122 + */ + 'uuid'?: (boolean); + /** + * NotContains specifies that this field cannot have the specified substring + * anywhere in the string. + */ + 'not_contains'?: (string); + /** + * WellKnownRegex specifies a common well known pattern defined as a regex. + */ + 'well_known_regex'?: (_validate_KnownRegex | keyof typeof _validate_KnownRegex); + /** + * This applies to regexes HTTP_HEADER_NAME and HTTP_HEADER_VALUE to enable + * strict header validation. + * By default, this is true, and HTTP header validations are RFC-compliant. + * Setting to false will enable a looser validations that only disallows + * \r\n\0 characters, which can be used to bypass header matching rules. + */ + 'strict'?: (boolean); + /** + * WellKnown rules provide advanced constraints against common string + * patterns + */ + 'well_known'?: "email"|"hostname"|"ip"|"ipv4"|"ipv6"|"uri"|"uri_ref"|"address"|"uuid"|"well_known_regex"; +} + +/** + * StringRules describe the constraints applied to `string` values + */ +export interface StringRules__Output { + /** + * Const specifies that this field must be exactly the specified value + */ + 'const': (string); + /** + * MinLen specifies that this field must be the specified number of + * characters (Unicode code points) at a minimum. Note that the number of + * characters may differ from the number of bytes in the string. + */ + 'min_len': (string); + /** + * MaxLen specifies that this field must be the specified number of + * characters (Unicode code points) at a maximum. Note that the number of + * characters may differ from the number of bytes in the string. + */ + 'max_len': (string); + /** + * MinBytes specifies that this field must be the specified number of bytes + * at a minimum + */ + 'min_bytes': (string); + /** + * MaxBytes specifies that this field must be the specified number of bytes + * at a maximum + */ + 'max_bytes': (string); + /** + * Pattern specifes that this field must match against the specified + * regular expression (RE2 syntax). The included expression should elide + * any delimiters. + */ + 'pattern': (string); + /** + * Prefix specifies that this field must have the specified substring at + * the beginning of the string. + */ + 'prefix': (string); + /** + * Suffix specifies that this field must have the specified substring at + * the end of the string. + */ + 'suffix': (string); + /** + * Contains specifies that this field must have the specified substring + * anywhere in the string. + */ + 'contains': (string); + /** + * In specifies that this field must be equal to one of the specified + * values + */ + 'in': (string)[]; + /** + * NotIn specifies that this field cannot be equal to one of the specified + * values + */ + 'not_in': (string)[]; + /** + * Email specifies that the field must be a valid email address as + * defined by RFC 5322 + */ + 'email'?: (boolean); + /** + * Hostname specifies that the field must be a valid hostname as + * defined by RFC 1034. This constraint does not support + * internationalized domain names (IDNs). + */ + 'hostname'?: (boolean); + /** + * Ip specifies that the field must be a valid IP (v4 or v6) address. + * Valid IPv6 addresses should not include surrounding square brackets. + */ + 'ip'?: (boolean); + /** + * Ipv4 specifies that the field must be a valid IPv4 address. + */ + 'ipv4'?: (boolean); + /** + * Ipv6 specifies that the field must be a valid IPv6 address. Valid + * IPv6 addresses should not include surrounding square brackets. + */ + 'ipv6'?: (boolean); + /** + * Uri specifies that the field must be a valid, absolute URI as defined + * by RFC 3986 + */ + 'uri'?: (boolean); + /** + * UriRef specifies that the field must be a valid URI as defined by RFC + * 3986 and may be relative or absolute. + */ + 'uri_ref'?: (boolean); + /** + * Len specifies that this field must be the specified number of + * characters (Unicode code points). Note that the number of + * characters may differ from the number of bytes in the string. + */ + 'len': (string); + /** + * LenBytes specifies that this field must be the specified number of bytes + * at a minimum + */ + 'len_bytes': (string); + /** + * Address specifies that the field must be either a valid hostname as + * defined by RFC 1034 (which does not support internationalized domain + * names or IDNs), or it can be a valid IP (v4 or v6). + */ + 'address'?: (boolean); + /** + * Uuid specifies that the field must be a valid UUID as defined by + * RFC 4122 + */ + 'uuid'?: (boolean); + /** + * NotContains specifies that this field cannot have the specified substring + * anywhere in the string. + */ + 'not_contains': (string); + /** + * WellKnownRegex specifies a common well known pattern defined as a regex. + */ + 'well_known_regex'?: (keyof typeof _validate_KnownRegex); + /** + * This applies to regexes HTTP_HEADER_NAME and HTTP_HEADER_VALUE to enable + * strict header validation. + * By default, this is true, and HTTP header validations are RFC-compliant. + * Setting to false will enable a looser validations that only disallows + * \r\n\0 characters, which can be used to bypass header matching rules. + */ + 'strict': (boolean); + /** + * WellKnown rules provide advanced constraints against common string + * patterns + */ + 'well_known': "email"|"hostname"|"ip"|"ipv4"|"ipv6"|"uri"|"uri_ref"|"address"|"uuid"|"well_known_regex"; +} diff --git a/packages/grpc-js/src/generated/validate/TimestampRules.ts b/packages/grpc-js/src/generated/validate/TimestampRules.ts new file mode 100644 index 000000000..7fd9b0ce4 --- /dev/null +++ b/packages/grpc-js/src/generated/validate/TimestampRules.ts @@ -0,0 +1,106 @@ +// Original file: deps/protoc-gen-validate/validate/validate.proto + +import { Timestamp as _google_protobuf_Timestamp, Timestamp__Output as _google_protobuf_Timestamp__Output } from '../google/protobuf/Timestamp'; +import { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from '../google/protobuf/Duration'; + +/** + * TimestampRules describe the constraints applied exclusively to the + * `google.protobuf.Timestamp` well-known type + */ +export interface TimestampRules { + /** + * Required specifies that this field must be set + */ + 'required'?: (boolean); + /** + * Const specifies that this field must be exactly the specified value + */ + 'const'?: (_google_protobuf_Timestamp); + /** + * Lt specifies that this field must be less than the specified value, + * exclusive + */ + 'lt'?: (_google_protobuf_Timestamp); + /** + * Lte specifies that this field must be less than the specified value, + * inclusive + */ + 'lte'?: (_google_protobuf_Timestamp); + /** + * Gt specifies that this field must be greater than the specified value, + * exclusive + */ + 'gt'?: (_google_protobuf_Timestamp); + /** + * Gte specifies that this field must be greater than the specified value, + * inclusive + */ + 'gte'?: (_google_protobuf_Timestamp); + /** + * LtNow specifies that this must be less than the current time. LtNow + * can only be used with the Within rule. + */ + 'lt_now'?: (boolean); + /** + * GtNow specifies that this must be greater than the current time. GtNow + * can only be used with the Within rule. + */ + 'gt_now'?: (boolean); + /** + * Within specifies that this field must be within this duration of the + * current time. This constraint can be used alone or with the LtNow and + * GtNow rules. + */ + 'within'?: (_google_protobuf_Duration); +} + +/** + * TimestampRules describe the constraints applied exclusively to the + * `google.protobuf.Timestamp` well-known type + */ +export interface TimestampRules__Output { + /** + * Required specifies that this field must be set + */ + 'required': (boolean); + /** + * Const specifies that this field must be exactly the specified value + */ + 'const'?: (_google_protobuf_Timestamp__Output); + /** + * Lt specifies that this field must be less than the specified value, + * exclusive + */ + 'lt'?: (_google_protobuf_Timestamp__Output); + /** + * Lte specifies that this field must be less than the specified value, + * inclusive + */ + 'lte'?: (_google_protobuf_Timestamp__Output); + /** + * Gt specifies that this field must be greater than the specified value, + * exclusive + */ + 'gt'?: (_google_protobuf_Timestamp__Output); + /** + * Gte specifies that this field must be greater than the specified value, + * inclusive + */ + 'gte'?: (_google_protobuf_Timestamp__Output); + /** + * LtNow specifies that this must be less than the current time. LtNow + * can only be used with the Within rule. + */ + 'lt_now': (boolean); + /** + * GtNow specifies that this must be greater than the current time. GtNow + * can only be used with the Within rule. + */ + 'gt_now': (boolean); + /** + * Within specifies that this field must be within this duration of the + * current time. This constraint can be used alone or with the LtNow and + * GtNow rules. + */ + 'within'?: (_google_protobuf_Duration__Output); +} diff --git a/packages/grpc-js/src/generated/validate/UInt32Rules.ts b/packages/grpc-js/src/generated/validate/UInt32Rules.ts new file mode 100644 index 000000000..61873da2f --- /dev/null +++ b/packages/grpc-js/src/generated/validate/UInt32Rules.ts @@ -0,0 +1,86 @@ +// Original file: deps/protoc-gen-validate/validate/validate.proto + + +/** + * UInt32Rules describes the constraints applied to `uint32` values + */ +export interface UInt32Rules { + /** + * Const specifies that this field must be exactly the specified value + */ + 'const'?: (number); + /** + * Lt specifies that this field must be less than the specified value, + * exclusive + */ + 'lt'?: (number); + /** + * Lte specifies that this field must be less than or equal to the + * specified value, inclusive + */ + 'lte'?: (number); + /** + * Gt specifies that this field must be greater than the specified value, + * exclusive. If the value of Gt is larger than a specified Lt or Lte, the + * range is reversed. + */ + 'gt'?: (number); + /** + * Gte specifies that this field must be greater than or equal to the + * specified value, inclusive. If the value of Gte is larger than a + * specified Lt or Lte, the range is reversed. + */ + 'gte'?: (number); + /** + * In specifies that this field must be equal to one of the specified + * values + */ + 'in'?: (number)[]; + /** + * NotIn specifies that this field cannot be equal to one of the specified + * values + */ + 'not_in'?: (number)[]; +} + +/** + * UInt32Rules describes the constraints applied to `uint32` values + */ +export interface UInt32Rules__Output { + /** + * Const specifies that this field must be exactly the specified value + */ + 'const': (number); + /** + * Lt specifies that this field must be less than the specified value, + * exclusive + */ + 'lt': (number); + /** + * Lte specifies that this field must be less than or equal to the + * specified value, inclusive + */ + 'lte': (number); + /** + * Gt specifies that this field must be greater than the specified value, + * exclusive. If the value of Gt is larger than a specified Lt or Lte, the + * range is reversed. + */ + 'gt': (number); + /** + * Gte specifies that this field must be greater than or equal to the + * specified value, inclusive. If the value of Gte is larger than a + * specified Lt or Lte, the range is reversed. + */ + 'gte': (number); + /** + * In specifies that this field must be equal to one of the specified + * values + */ + 'in': (number)[]; + /** + * NotIn specifies that this field cannot be equal to one of the specified + * values + */ + 'not_in': (number)[]; +} diff --git a/packages/grpc-js/src/generated/validate/UInt64Rules.ts b/packages/grpc-js/src/generated/validate/UInt64Rules.ts new file mode 100644 index 000000000..263431ad7 --- /dev/null +++ b/packages/grpc-js/src/generated/validate/UInt64Rules.ts @@ -0,0 +1,87 @@ +// Original file: deps/protoc-gen-validate/validate/validate.proto + +import { Long } from '@grpc/proto-loader'; + +/** + * UInt64Rules describes the constraints applied to `uint64` values + */ +export interface UInt64Rules { + /** + * Const specifies that this field must be exactly the specified value + */ + 'const'?: (number | string | Long); + /** + * Lt specifies that this field must be less than the specified value, + * exclusive + */ + 'lt'?: (number | string | Long); + /** + * Lte specifies that this field must be less than or equal to the + * specified value, inclusive + */ + 'lte'?: (number | string | Long); + /** + * Gt specifies that this field must be greater than the specified value, + * exclusive. If the value of Gt is larger than a specified Lt or Lte, the + * range is reversed. + */ + 'gt'?: (number | string | Long); + /** + * Gte specifies that this field must be greater than or equal to the + * specified value, inclusive. If the value of Gte is larger than a + * specified Lt or Lte, the range is reversed. + */ + 'gte'?: (number | string | Long); + /** + * In specifies that this field must be equal to one of the specified + * values + */ + 'in'?: (number | string | Long)[]; + /** + * NotIn specifies that this field cannot be equal to one of the specified + * values + */ + 'not_in'?: (number | string | Long)[]; +} + +/** + * UInt64Rules describes the constraints applied to `uint64` values + */ +export interface UInt64Rules__Output { + /** + * Const specifies that this field must be exactly the specified value + */ + 'const': (string); + /** + * Lt specifies that this field must be less than the specified value, + * exclusive + */ + 'lt': (string); + /** + * Lte specifies that this field must be less than or equal to the + * specified value, inclusive + */ + 'lte': (string); + /** + * Gt specifies that this field must be greater than the specified value, + * exclusive. If the value of Gt is larger than a specified Lt or Lte, the + * range is reversed. + */ + 'gt': (string); + /** + * Gte specifies that this field must be greater than or equal to the + * specified value, inclusive. If the value of Gte is larger than a + * specified Lt or Lte, the range is reversed. + */ + 'gte': (string); + /** + * In specifies that this field must be equal to one of the specified + * values + */ + 'in': (string)[]; + /** + * NotIn specifies that this field cannot be equal to one of the specified + * values + */ + 'not_in': (string)[]; +} diff --git a/packages/grpc-js/src/xds-bootstrap.ts b/packages/grpc-js/src/xds-bootstrap.ts new file mode 100644 index 000000000..b8e446b25 --- /dev/null +++ b/packages/grpc-js/src/xds-bootstrap.ts @@ -0,0 +1,249 @@ +/* + * Copyright 2020 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +import * as fs from 'fs'; +import { Struct } from './generated/google/protobuf/Struct'; +import { Node } from './generated/envoy/api/v2/core/Node'; +import { Value } from './generated/google/protobuf/Value'; + +/* eslint-disable @typescript-eslint/no-explicit-any */ + +export interface ChannelCredsConfig { + type: string; + config?: object; +} + +export interface XdsServerConfig { + serverUri: string; + channelCreds: ChannelCredsConfig[]; +} + +export interface BootstrapInfo { + xdsServers: XdsServerConfig[]; + node: Node; +} + +function validateChannelCredsConfig(obj: any): ChannelCredsConfig { + if (!('type' in obj)) { + throw new Error('type field missing in xds_servers.channel_creds element'); + } + if (typeof obj.type !== 'string') { + throw new Error( + `xds_servers.channel_creds.type field: expected string, got ${typeof obj.type}` + ); + } + if ('config' in obj) { + if (typeof obj.config !== 'object' || obj.config === null) { + throw new Error( + 'xds_servers.channel_creds config field must be an object if provided' + ); + } + } + return { + type: obj.type, + config: obj.config, + }; +} + +function validateXdsServerConfig(obj: any): XdsServerConfig { + if (!('server_uri' in obj)) { + throw new Error('server_uri field missing in xds_servers element'); + } + if (typeof obj.server_uri !== 'string') { + throw new Error( + `xds_servers.server_uri field: expected string, got ${typeof obj.server_uri}` + ); + } + if (!('channel_creds' in obj)) { + throw new Error('channel_creds missing in xds_servers element'); + } + if (!Array.isArray(obj.channel_creds)) { + throw new Error( + `xds_servers.channel_creds field: expected array, got ${typeof obj.channel_creds}` + ); + } + if (obj.channel_creds.length === 0) { + throw new Error( + 'xds_servers.channel_creds field: at least one entry is required' + ); + } + return { + serverUri: obj.server_uri, + channelCreds: obj.channel_creds.map(validateChannelCredsConfig), + }; +} + +function validateValue(obj: any): Value { + if (Array.isArray(obj)) { + return { + kind: 'listValue', + listValue: { + values: obj.map((value) => validateValue(value)), + }, + }; + } else { + switch (typeof obj) { + case 'boolean': + return { + kind: 'boolValue', + boolValue: obj, + }; + case 'number': + return { + kind: 'numberValue', + numberValue: obj, + }; + case 'string': + return { + kind: 'stringValue', + stringValue: obj, + }; + case 'object': + if (obj === null) { + return { + kind: 'nullValue', + nullValue: 'NULL_VALUE', + }; + } else { + return { + kind: 'structValue', + structValue: getStructFromJson(obj), + }; + } + default: + throw new Error(`Could not handle struct value of type ${typeof obj}`); + } + } +} + +function getStructFromJson(obj: any): Struct { + if (typeof obj !== 'object' || obj === null) { + throw new Error('Invalid JSON object for Struct field'); + } + const fields: { [key: string]: Value } = {}; + for (const [fieldName, value] of Object.entries(obj)) { + fields[fieldName] = validateValue(value); + } + return { + fields, + }; +} + +/** + * Validate that the input obj is a valid Node proto message. Only checks the + * fields we expect to see: id, cluster, locality, and metadata. + * @param obj + */ +function validateNode(obj: any): Node { + const result: Node = {}; + if (!('id' in obj)) { + throw new Error('id field missing in node element'); + } + if (typeof obj.id !== 'string') { + throw new Error(`node.id field: expected string, got ${typeof obj.id}`); + } + result.id = obj.id; + if (!('cluster' in obj)) { + throw new Error('cluster field missing in node element'); + } + if (typeof obj.cluster !== 'string') { + throw new Error( + `node.cluster field: expected string, got ${typeof obj.cluster}` + ); + } + result.cluster = obj.cluster; + if (!('locality' in obj)) { + throw new Error('locality field missing in node element'); + } + result.locality = {}; + if ('region' in obj.locality) { + if (typeof obj.locality.region !== 'string') { + throw new Error( + `node.locality.region field: expected string, got ${typeof obj.locality + .region}` + ); + } + result.locality.region = obj.locality.region; + } + if ('zone' in obj.locality) { + if (typeof obj.locality.region !== 'string') { + throw new Error( + `node.locality.zone field: expected string, got ${typeof obj.locality + .zone}` + ); + } + result.locality.zone = obj.locality.zone; + } + if ('sub_zone' in obj.locality) { + if (typeof obj.locality.sub_zone !== 'string') { + throw new Error( + `node.locality.sub_zone field: expected string, got ${typeof obj + .locality.sub_zone}` + ); + } + result.locality.sub_zone = obj.locality.sub_zone; + } + if ('metadata' in obj) { + result.metadata = getStructFromJson(obj.metadata); + } + return result; +} + +function validateBootstrapFile(obj: any): BootstrapInfo { + return { + xdsServers: obj.xds_servers.map(validateXdsServerConfig), + node: validateNode(obj.node), + }; +} + +let loadedBootstrapInfo: Promise | null = null; + +export async function loadBootstrapInfo(): Promise { + if (loadedBootstrapInfo !== null) { + return loadedBootstrapInfo; + } + const bootstrapPath = process.env.GRPC_XDS_BOOTSTRAP; + if (bootstrapPath === undefined) { + return Promise.reject( + new Error( + 'The GRPC_XDS_BOOTSTRAP environment variable needs to be set to the path to the bootstrap file to use xDS' + ) + ); + } + loadedBootstrapInfo = new Promise((resolve, reject) => { + fs.readFile(bootstrapPath, { encoding: 'utf8' }, (err, data) => { + if (err) { + reject( + new Error( + `Failed to read xDS bootstrap file from path ${bootstrapPath} with error ${err.message}` + ) + ); + } + try { + const parsedFile = JSON.parse(data); + resolve(validateBootstrapFile(parsedFile)); + } catch (e) { + reject( + new Error( + `Failed to parse xDS bootstrap file at path ${bootstrapPath} with error ${e.message}` + ) + ); + } + }); + }); + return loadedBootstrapInfo; +} diff --git a/packages/grpc-js/src/xds-client.ts b/packages/grpc-js/src/xds-client.ts new file mode 100644 index 000000000..98454817f --- /dev/null +++ b/packages/grpc-js/src/xds-client.ts @@ -0,0 +1,389 @@ +/* + * Copyright 2020 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +import * as protoLoader from '@grpc/proto-loader'; +import { loadPackageDefinition } from './make-client'; +import * as adsTypes from './generated/ads'; +import { createGoogleDefaultCredentials } from './channel-credentials'; +import { loadBootstrapInfo } from './xds-bootstrap'; +import { ClientDuplexStream, ServiceError } from './call'; +import { StatusObject } from './call-stream'; +import { isIPv4, isIPv6 } from 'net'; +import { Status, LogVerbosity } from './constants'; +import { Metadata } from './metadata'; +import * as logging from './logging'; +import { ServiceConfig } from './service-config'; +import { ChannelOptions } from './channel-options'; +import { Node } from './generated/envoy/api/v2/core/Node'; +import { AggregatedDiscoveryServiceClient } from './generated/envoy/service/discovery/v2/AggregatedDiscoveryService'; +import { DiscoveryRequest } from './generated/envoy/api/v2/DiscoveryRequest'; +import { DiscoveryResponse__Output } from './generated/envoy/api/v2/DiscoveryResponse'; +import { ClusterLoadAssignment__Output } from './generated/envoy/api/v2/ClusterLoadAssignment'; + +const TRACER_NAME = 'xds_client'; + +function trace(text: string): void { + logging.trace(LogVerbosity.DEBUG, TRACER_NAME, text); +} + +const clientVersion = require('../../package.json').version; + +const EDS_TYPE_URL = 'type.googleapis.com/envoy.api.v2.ClusterLoadAssignment'; + +let loadedProtos: Promise | null = null; + +function loadAdsProtos(): Promise { + if (loadedProtos !== null) { + return loadedProtos; + } + loadedProtos = protoLoader + .load( + [ + 'envoy/service/discovery/v2/ads.proto', + 'envoy/api/v2/listener.proto', + 'envoy/api/v2/route.proto', + 'envoy/api/v2/cluster.proto', + 'envoy/api/v2/endpoint.proto', + ], + { + keepCase: true, + longs: String, + enums: String, + defaults: true, + oneofs: true, + includeDirs: [ + // Paths are relative to src/build + __dirname + '/../../deps/envoy-api/', + __dirname + '/../../deps/udpa/', + __dirname + '/../../deps/googleapis/', + __dirname + '/../../deps/protoc-gen-validate/', + ], + } + ) + .then( + (packageDefinition) => + (loadPackageDefinition( + packageDefinition + ) as unknown) as adsTypes.ProtoGrpcType + ); + return loadedProtos; +} + +export interface Watcher { + onValidUpdate(update: UpdateType): void; + onTransientError(error: StatusObject): void; + onResourceDoesNotExist(): void; +} + +export class XdsClient { + private node: Node | null = null; + private client: AggregatedDiscoveryServiceClient | null = null; + private adsCall: ClientDuplexStream< + DiscoveryRequest, + DiscoveryResponse__Output + > | null = null; + + private hasShutdown = false; + + private endpointWatchers: Map< + string, + Watcher[] + > = new Map[]>(); + private lastEdsVersionInfo = ''; + private lastEdsNonce = ''; + + constructor( + private targetName: string, + private serviceConfigWatcher: Watcher, + channelOptions: ChannelOptions + ) { + const channelArgs = { ...channelOptions }; + const channelArgsToRemove = [ + /* The SSL target name override corresponds to the target, and this + * client has its own target */ + 'grpc.ssl_target_name_override', + /* The default authority also corresponds to the target */ + 'grpc.default_authority', + /* This client will have its own specific keepalive time setting */ + 'grpc.keepalive_time_ms', + /* The service config specifies the load balancing policy. This channel + * needs its own separate load balancing policy setting. In particular, + * recursively using an xDS load balancer for the xDS client would be + * bad */ + 'grpc.service_config', + ]; + for (const arg of channelArgsToRemove) { + delete channelArgs[arg]; + } + channelArgs['grpc.keepalive_time_ms'] = 5000; + Promise.all([loadBootstrapInfo(), loadAdsProtos()]).then( + ([bootstrapInfo, protoDefinitions]) => { + if (this.hasShutdown) { + return; + } + this.node = { + ...bootstrapInfo.node, + build_version: `gRPC Node Pure JS ${clientVersion}`, + user_agent_name: 'gRPC Node Pure JS', + }; + this.client = new protoDefinitions.envoy.service.discovery.v2.AggregatedDiscoveryService( + bootstrapInfo.xdsServers[0].serverUri, + createGoogleDefaultCredentials(), + channelArgs + ); + this.maybeStartAdsStream(); + }, + (error) => { + trace('Failed to initialize xDS Client. ' + error.message); + // Bubble this error up to any listeners + this.reportStreamError({ + code: Status.INTERNAL, + details: `Failed to initialize xDS Client. ${error.message}`, + metadata: new Metadata(), + }); + } + ); + } + + /** + * Start the ADS stream if the client exists and there is not already an + * existing stream, and there + */ + private maybeStartAdsStream() { + if (this.client === null) { + return; + } + if (this.adsCall !== null) { + return; + } + if (this.hasShutdown) { + return; + } + this.adsCall = this.client.StreamAggregatedResources(); + this.adsCall.on('data', (message: DiscoveryResponse__Output) => { + switch (message.type_url) { + case EDS_TYPE_URL: { + const edsResponses: ClusterLoadAssignment__Output[] = []; + for (const resource of message.resources) { + if ( + protoLoader.isAnyExtension(resource) && + resource['@type'] === EDS_TYPE_URL + ) { + const resp = resource as protoLoader.AnyExtension & + ClusterLoadAssignment__Output; + if (!this.validateEdsResponse(resp)) { + this.nackEds('ClusterLoadAssignment validation failed'); + return; + } + edsResponses.push(resp); + } else { + this.nackEds( + `Invalid resource type ${ + protoLoader.isAnyExtension(resource) + ? resource['@type'] + : resource.type_url + }` + ); + return; + } + } + for (const message of edsResponses) { + this.handleEdsResponse(message); + } + this.lastEdsVersionInfo = message.version_info; + this.lastEdsNonce = message.nonce; + this.ackEds(); + break; + } + default: + this.nackUnknown( + message.type_url, + message.version_info, + message.nonce + ); + } + }); + this.adsCall.on('error', (error: ServiceError) => { + trace( + 'ADS stream ended. code=' + error.code + ' details= ' + error.details + ); + this.adsCall = null; + this.reportStreamError(error); + /* Connection backoff is handled by the client object, so we can + * immediately start a new request to indicate that it should try to + * reconnect */ + this.maybeStartAdsStream(); + }); + const endpointWatcherNames = Array.from(this.endpointWatchers.keys()); + if (endpointWatcherNames.length > 0) { + this.adsCall.write({ + node: this.node!, + type_url: EDS_TYPE_URL, + resource_names: endpointWatcherNames, + }); + } + } + + private nackUnknown(typeUrl: string, versionInfo: string, nonce: string) { + if (!this.adsCall) { + return; + } + this.adsCall.write({ + node: this.node!, + type_url: typeUrl, + version_info: versionInfo, + response_nonce: nonce, + error_detail: { + message: `Unknown type_url ${typeUrl}`, + }, + }); + } + + /** + * Acknowledge an EDS update. This should be called after the local nonce and + * version info are updated so that it sends the post-update values. + */ + private ackEds() { + if (!this.adsCall) { + return; + } + this.adsCall.write({ + node: this.node!, + type_url: EDS_TYPE_URL, + resource_names: Array.from(this.endpointWatchers.keys()), + response_nonce: this.lastEdsNonce, + version_info: this.lastEdsVersionInfo, + }); + } + + /** + * Reject an EDS update. This should be called without updating the local + * nonce and version info. + */ + private nackEds(message: string) { + if (!this.adsCall) { + return; + } + this.adsCall.write({ + node: this.node!, + type_url: EDS_TYPE_URL, + resource_names: Array.from(this.endpointWatchers.keys()), + response_nonce: this.lastEdsNonce, + version_info: this.lastEdsVersionInfo, + error_detail: { + message, + }, + }); + } + + /** + * Validate the ClusterLoadAssignment object by these rules: + * https://github.com/grpc/proposal/blob/master/A27-xds-global-load-balancing.md#clusterloadassignment-proto + * @param message + */ + private validateEdsResponse(message: ClusterLoadAssignment__Output): boolean { + for (const endpoint of message.endpoints) { + for (const lb of endpoint.lb_endpoints) { + const socketAddress = lb.endpoint?.address?.socket_address; + if (!socketAddress) { + return false; + } + if (socketAddress.port_specifier !== 'port_value') { + return false; + } + if (!(isIPv4(socketAddress.address) || isIPv6(socketAddress.address))) { + return false; + } + } + } + return true; + } + + private handleEdsResponse(message: ClusterLoadAssignment__Output) { + const watchers = this.endpointWatchers.get(message.cluster_name) ?? []; + for (const watcher of watchers) { + watcher.onValidUpdate(message); + } + } + + private updateEdsNames() { + if (this.adsCall) { + this.adsCall.write({ + node: this.node!, + type_url: EDS_TYPE_URL, + resource_names: Array.from(this.endpointWatchers.keys()), + response_nonce: this.lastEdsNonce, + version_info: this.lastEdsVersionInfo, + }); + } + } + + private reportStreamError(status: StatusObject) { + for (const watcherList of this.endpointWatchers.values()) { + for (const watcher of watcherList) { + watcher.onTransientError(status); + } + } + // Also do the same for other types of watchers when those are implemented + } + + addEndpointWatcher( + edsServiceName: string, + watcher: Watcher + ) { + trace('Watcher added for endpoint ' + edsServiceName); + let watchersEntry = this.endpointWatchers.get(edsServiceName); + let addedServiceName = false; + if (watchersEntry === undefined) { + addedServiceName = true; + watchersEntry = []; + this.endpointWatchers.set(edsServiceName, watchersEntry); + } + watchersEntry.push(watcher); + if (addedServiceName) { + this.updateEdsNames(); + } + } + + removeEndpointWatcher( + edsServiceName: string, + watcher: Watcher + ) { + trace('Watcher removed for endpoint ' + edsServiceName); + const watchersEntry = this.endpointWatchers.get(edsServiceName); + let removedServiceName = false; + if (watchersEntry !== undefined) { + const entryIndex = watchersEntry.indexOf(watcher); + if (entryIndex >= 0) { + watchersEntry.splice(entryIndex, 1); + } + if (watchersEntry.length === 0) { + removedServiceName = true; + this.endpointWatchers.delete(edsServiceName); + } + } + if (removedServiceName) { + this.updateEdsNames(); + } + } + + shutdown(): void { + this.adsCall?.cancel(); + this.client?.close(); + this.hasShutdown = true; + } +}