mirror of https://github.com/grpc/grpc-node.git
Update code generation with PickFirst message
This commit is contained in:
parent
f68ceaa44e
commit
6567f8d7cd
|
@ -12,7 +12,7 @@
|
|||
"prepare": "npm run compile",
|
||||
"pretest": "npm run compile",
|
||||
"posttest": "npm run check",
|
||||
"generate-types": "proto-loader-gen-types --keepCase --longs String --enums String --defaults --oneofs --includeComments --includeDirs deps/envoy-api/ deps/xds/ deps/googleapis/ deps/protoc-gen-validate/ -O src/generated/ --grpcLib @grpc/grpc-js envoy/service/discovery/v3/ads.proto envoy/service/load_stats/v3/lrs.proto envoy/config/listener/v3/listener.proto envoy/config/route/v3/route.proto envoy/config/cluster/v3/cluster.proto envoy/config/endpoint/v3/endpoint.proto envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto udpa/type/v1/typed_struct.proto xds/type/v3/typed_struct.proto envoy/extensions/filters/http/fault/v3/fault.proto envoy/service/status/v3/csds.proto envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.proto envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.proto",
|
||||
"generate-types": "proto-loader-gen-types --keepCase --longs String --enums String --defaults --oneofs --includeComments --includeDirs deps/envoy-api/ deps/xds/ deps/googleapis/ deps/protoc-gen-validate/ -O src/generated/ --grpcLib @grpc/grpc-js envoy/service/discovery/v3/ads.proto envoy/service/load_stats/v3/lrs.proto envoy/config/listener/v3/listener.proto envoy/config/route/v3/route.proto envoy/config/cluster/v3/cluster.proto envoy/config/endpoint/v3/endpoint.proto envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto udpa/type/v1/typed_struct.proto xds/type/v3/typed_struct.proto envoy/extensions/filters/http/fault/v3/fault.proto envoy/service/status/v3/csds.proto envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.proto envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.proto envoy/extensions/load_balancing_policies/pick_first/v3/pick_first.proto",
|
||||
"generate-interop-types": "proto-loader-gen-types --keep-case --longs String --enums String --defaults --oneofs --json --includeComments --includeDirs proto/ -O interop/generated --grpcLib @grpc/grpc-js grpc/testing/test.proto",
|
||||
"generate-test-types": "proto-loader-gen-types --keep-case --longs String --enums String --defaults --oneofs --json --includeComments --includeDirs proto/ -O test/generated --grpcLib @grpc/grpc-js grpc/testing/echo.proto"
|
||||
},
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
// Original file: deps/envoy-api/envoy/extensions/load_balancing_policies/pick_first/v3/pick_first.proto
|
||||
|
||||
|
||||
/**
|
||||
* This configuration allows the built-in PICK_FIRST LB policy to be configured
|
||||
* via the LB policy extension point.
|
||||
*/
|
||||
export interface PickFirst {
|
||||
/**
|
||||
* If set to true, instructs the LB policy to shuffle the list of addresses
|
||||
* received from the name resolver before attempting to connect to them.
|
||||
*/
|
||||
'shuffle_address_list'?: (boolean);
|
||||
}
|
||||
|
||||
/**
|
||||
* This configuration allows the built-in PICK_FIRST LB policy to be configured
|
||||
* via the LB policy extension point.
|
||||
*/
|
||||
export interface PickFirst__Output {
|
||||
/**
|
||||
* If set to true, instructs the LB policy to shuffle the list of addresses
|
||||
* received from the name resolver before attempting to connect to them.
|
||||
*/
|
||||
'shuffle_address_list': (boolean);
|
||||
}
|
|
@ -1,18 +1,15 @@
|
|||
// Original file: null
|
||||
|
||||
import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption';
|
||||
import type { 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 | null);
|
||||
}
|
||||
|
||||
export interface EnumOptions__Output {
|
||||
'allowAlias': (boolean);
|
||||
'deprecated': (boolean);
|
||||
'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[];
|
||||
'.udpa.annotations.enum_migrate': (_udpa_annotations_MigrateAnnotation__Output | null);
|
||||
}
|
||||
|
|
|
@ -1,20 +1,13 @@
|
|||
// Original file: null
|
||||
|
||||
import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption';
|
||||
import type { 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 | null);
|
||||
'.envoy.annotations.deprecated_at_minor_version_enum'?: (string);
|
||||
}
|
||||
|
||||
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 | null);
|
||||
'.envoy.annotations.deprecated_at_minor_version_enum': (string);
|
||||
}
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
// Original file: null
|
||||
|
||||
import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption';
|
||||
import type { FieldRules as _validate_FieldRules, FieldRules__Output as _validate_FieldRules__Output } from '../../validate/FieldRules';
|
||||
import type { FieldMigrateAnnotation as _udpa_annotations_FieldMigrateAnnotation, FieldMigrateAnnotation__Output as _udpa_annotations_FieldMigrateAnnotation__Output } from '../../udpa/annotations/FieldMigrateAnnotation';
|
||||
import type { FieldStatusAnnotation as _xds_annotations_v3_FieldStatusAnnotation, FieldStatusAnnotation__Output as _xds_annotations_v3_FieldStatusAnnotation__Output } from '../../xds/annotations/v3/FieldStatusAnnotation';
|
||||
|
||||
// Original file: null
|
||||
|
||||
|
@ -29,11 +26,6 @@ export interface FieldOptions {
|
|||
'jstype'?: (_google_protobuf_FieldOptions_JSType | keyof typeof _google_protobuf_FieldOptions_JSType);
|
||||
'weak'?: (boolean);
|
||||
'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[];
|
||||
'.validate.rules'?: (_validate_FieldRules | null);
|
||||
'.envoy.annotations.deprecated_at_minor_version'?: (string);
|
||||
'.udpa.annotations.field_migrate'?: (_udpa_annotations_FieldMigrateAnnotation | null);
|
||||
'.envoy.annotations.disallowed_by_default'?: (boolean);
|
||||
'.xds.annotations.v3.field_status'?: (_xds_annotations_v3_FieldStatusAnnotation | null);
|
||||
}
|
||||
|
||||
export interface FieldOptions__Output {
|
||||
|
@ -44,9 +36,4 @@ export interface FieldOptions__Output {
|
|||
'jstype': (keyof typeof _google_protobuf_FieldOptions_JSType);
|
||||
'weak': (boolean);
|
||||
'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[];
|
||||
'.validate.rules': (_validate_FieldRules__Output | null);
|
||||
'.envoy.annotations.deprecated_at_minor_version': (string);
|
||||
'.udpa.annotations.field_migrate': (_udpa_annotations_FieldMigrateAnnotation__Output | null);
|
||||
'.envoy.annotations.disallowed_by_default': (boolean);
|
||||
'.xds.annotations.v3.field_status': (_xds_annotations_v3_FieldStatusAnnotation__Output | null);
|
||||
}
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
// Original file: null
|
||||
|
||||
import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption';
|
||||
import type { FileMigrateAnnotation as _udpa_annotations_FileMigrateAnnotation, FileMigrateAnnotation__Output as _udpa_annotations_FileMigrateAnnotation__Output } from '../../udpa/annotations/FileMigrateAnnotation';
|
||||
import type { StatusAnnotation as _udpa_annotations_StatusAnnotation, StatusAnnotation__Output as _udpa_annotations_StatusAnnotation__Output } from '../../udpa/annotations/StatusAnnotation';
|
||||
import type { FileStatusAnnotation as _xds_annotations_v3_FileStatusAnnotation, FileStatusAnnotation__Output as _xds_annotations_v3_FileStatusAnnotation__Output } from '../../xds/annotations/v3/FileStatusAnnotation';
|
||||
|
||||
// Original file: null
|
||||
|
||||
|
@ -29,9 +27,7 @@ export interface FileOptions {
|
|||
'objcClassPrefix'?: (string);
|
||||
'csharpNamespace'?: (string);
|
||||
'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[];
|
||||
'.udpa.annotations.file_migrate'?: (_udpa_annotations_FileMigrateAnnotation | null);
|
||||
'.udpa.annotations.file_status'?: (_udpa_annotations_StatusAnnotation | null);
|
||||
'.xds.annotations.v3.file_status'?: (_xds_annotations_v3_FileStatusAnnotation | null);
|
||||
}
|
||||
|
||||
export interface FileOptions__Output {
|
||||
|
@ -50,7 +46,5 @@ export interface FileOptions__Output {
|
|||
'objcClassPrefix': (string);
|
||||
'csharpNamespace': (string);
|
||||
'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[];
|
||||
'.udpa.annotations.file_migrate': (_udpa_annotations_FileMigrateAnnotation__Output | null);
|
||||
'.udpa.annotations.file_status': (_udpa_annotations_StatusAnnotation__Output | null);
|
||||
'.xds.annotations.v3.file_status': (_xds_annotations_v3_FileStatusAnnotation__Output | null);
|
||||
}
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
// Original file: null
|
||||
|
||||
import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption';
|
||||
import type { VersioningAnnotation as _udpa_annotations_VersioningAnnotation, VersioningAnnotation__Output as _udpa_annotations_VersioningAnnotation__Output } from '../../udpa/annotations/VersioningAnnotation';
|
||||
import type { MigrateAnnotation as _udpa_annotations_MigrateAnnotation, MigrateAnnotation__Output as _udpa_annotations_MigrateAnnotation__Output } from '../../udpa/annotations/MigrateAnnotation';
|
||||
import type { MessageStatusAnnotation as _xds_annotations_v3_MessageStatusAnnotation, MessageStatusAnnotation__Output as _xds_annotations_v3_MessageStatusAnnotation__Output } from '../../xds/annotations/v3/MessageStatusAnnotation';
|
||||
|
||||
export interface MessageOptions {
|
||||
'messageSetWireFormat'?: (boolean);
|
||||
|
@ -11,10 +8,6 @@ export interface MessageOptions {
|
|||
'deprecated'?: (boolean);
|
||||
'mapEntry'?: (boolean);
|
||||
'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[];
|
||||
'.validate.disabled'?: (boolean);
|
||||
'.udpa.annotations.versioning'?: (_udpa_annotations_VersioningAnnotation | null);
|
||||
'.udpa.annotations.message_migrate'?: (_udpa_annotations_MigrateAnnotation | null);
|
||||
'.xds.annotations.v3.message_status'?: (_xds_annotations_v3_MessageStatusAnnotation | null);
|
||||
}
|
||||
|
||||
export interface MessageOptions__Output {
|
||||
|
@ -23,8 +16,4 @@ export interface MessageOptions__Output {
|
|||
'deprecated': (boolean);
|
||||
'mapEntry': (boolean);
|
||||
'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[];
|
||||
'.validate.disabled': (boolean);
|
||||
'.udpa.annotations.versioning': (_udpa_annotations_VersioningAnnotation__Output | null);
|
||||
'.udpa.annotations.message_migrate': (_udpa_annotations_MigrateAnnotation__Output | null);
|
||||
'.xds.annotations.v3.message_status': (_xds_annotations_v3_MessageStatusAnnotation__Output | null);
|
||||
}
|
||||
|
|
|
@ -4,10 +4,8 @@ import type { UninterpretedOption as _google_protobuf_UninterpretedOption, Unint
|
|||
|
||||
export interface OneofOptions {
|
||||
'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[];
|
||||
'.validate.required'?: (boolean);
|
||||
}
|
||||
|
||||
export interface OneofOptions__Output {
|
||||
'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[];
|
||||
'.validate.required': (boolean);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
import type * as grpc from '@grpc/grpc-js';
|
||||
import type { EnumTypeDefinition, MessageTypeDefinition } from '@grpc/proto-loader';
|
||||
|
||||
|
||||
type SubtypeConstructor<Constructor extends new (...args: any) => any, Subtype> = {
|
||||
new(...args: ConstructorParameters<Constructor>): Subtype;
|
||||
};
|
||||
|
||||
export interface ProtoGrpcType {
|
||||
envoy: {
|
||||
extensions: {
|
||||
load_balancing_policies: {
|
||||
pick_first: {
|
||||
v3: {
|
||||
PickFirst: MessageTypeDefinition
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
google: {
|
||||
protobuf: {
|
||||
DescriptorProto: MessageTypeDefinition
|
||||
EnumDescriptorProto: MessageTypeDefinition
|
||||
EnumOptions: MessageTypeDefinition
|
||||
EnumValueDescriptorProto: MessageTypeDefinition
|
||||
EnumValueOptions: MessageTypeDefinition
|
||||
FieldDescriptorProto: MessageTypeDefinition
|
||||
FieldOptions: MessageTypeDefinition
|
||||
FileDescriptorProto: MessageTypeDefinition
|
||||
FileDescriptorSet: MessageTypeDefinition
|
||||
FileOptions: MessageTypeDefinition
|
||||
GeneratedCodeInfo: MessageTypeDefinition
|
||||
MessageOptions: MessageTypeDefinition
|
||||
MethodDescriptorProto: MessageTypeDefinition
|
||||
MethodOptions: MessageTypeDefinition
|
||||
OneofDescriptorProto: MessageTypeDefinition
|
||||
OneofOptions: MessageTypeDefinition
|
||||
ServiceDescriptorProto: MessageTypeDefinition
|
||||
ServiceOptions: MessageTypeDefinition
|
||||
SourceCodeInfo: MessageTypeDefinition
|
||||
UninterpretedOption: MessageTypeDefinition
|
||||
}
|
||||
}
|
||||
udpa: {
|
||||
annotations: {
|
||||
PackageVersionStatus: EnumTypeDefinition
|
||||
StatusAnnotation: MessageTypeDefinition
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue