diff --git a/spec/02-integration/05-proxy/19-grpc_proxy_spec.lua b/spec/02-integration/05-proxy/19-grpc_proxy_spec.lua index 0043977b7ef7..aa4c092d4144 100644 --- a/spec/02-integration/05-proxy/19-grpc_proxy_spec.lua +++ b/spec/02-integration/05-proxy/19-grpc_proxy_spec.lua @@ -30,6 +30,8 @@ for _, strategy in helpers.each_strategy() do reload_router(flavor) lazy_setup(function() + assert(helpers.start_grpc_target()) + local bp = helpers.get_db_utils(strategy, { "routes", "services", @@ -47,12 +49,16 @@ for _, strategy in helpers.each_strategy() do local mock_grpc_service = assert(bp.services:insert { name = "mock_grpc_service", - url = "grpc://localhost:8765", + protocol = "grpc", + host = "127.0.0.1", + port = helpers.get_grpc_target_port(), }) local mock_grpc_service_retry = assert(bp.services:insert { name = "mock_grpc_service_retry", - url = "grpc://grpc_retry", + protocol = "grpc", + host = "127.0.0.1", + port = helpers.get_grpc_target_port(), }) local upstream_retry = assert(bp.upstreams:insert { @@ -111,30 +117,10 @@ for _, strategy in helpers.each_strategy() do }, }) - local fixtures = { - http_mock = {} - } - - fixtures.http_mock.my_server_block = [[ - server { - server_name myserver; - listen 8765; - http2 on; - - location ~ / { - content_by_lua_block { - ngx.header.content_type = "application/grpc" - ngx.header.received_host = ngx.req.get_headers()["Host"] - } - } - } - ]] - assert(helpers.start_kong({ router_flavor = flavor, database = strategy, - nginx_conf = "spec/fixtures/custom_nginx.template", - }, nil, nil, fixtures)) + })) proxy_client_grpc = helpers.proxy_client_grpc() proxy_client_grpcs = helpers.proxy_client_grpcs() @@ -150,6 +136,7 @@ for _, strategy in helpers.each_strategy() do lazy_teardown(function() helpers.stop_kong() + helpers.stop_grpc_target() end) it("proxies grpc", function() @@ -228,32 +215,33 @@ for _, strategy in helpers.each_strategy() do it("proxies :authority header if `preserve_host` is set", function() local _, resp = proxy_client_grpc({ - service = "hello.HelloService.SayHello", + service = "targetservice.Bouncer.EchoHeaders", body = { - greeting = "world!" }, opts = { + ["-proto"] = "./spec/fixtures/grpc/proto/targetservice.proto", + ["-import-path"] = "./spec/fixtures/grpc/proto", ["-authority"] = "grpc_authority_1.example", - ["-v"] = true, } }) - - assert.matches("received%-host: grpc_authority_1.example", resp) + local headers = cjson.decode(resp).headers + assert.matches("grpc_authority_1.example", headers[":authority"]) end) it("sets default :authority header if `preserve_host` isn't set", function() local _, resp = proxy_client_grpc({ - service = "hello.HelloService.SayHello", + service = "targetservice.Bouncer.EchoHeaders", body = { - greeting = "world!" }, opts = { + ["-proto"] = "./spec/fixtures/grpc/proto/targetservice.proto", + ["-import-path"] = "./spec/fixtures/grpc/proto", ["-authority"] = "grpc_authority_2.example", - ["-v"] = true, } }) - assert.matches("received%-host: localhost:8765", resp) + local headers = cjson.decode(resp).headers + assert.matches("127.0.0.1:15010", headers[":authority"]) end) it("proxies :authority header on balancer retry", function() diff --git a/spec/fixtures/grpc/proto/targetservice.proto b/spec/fixtures/grpc/proto/targetservice.proto index 5b010a8864a4..5df2a20896a6 100644 --- a/spec/fixtures/grpc/proto/targetservice.proto +++ b/spec/fixtures/grpc/proto/targetservice.proto @@ -100,13 +100,8 @@ message EchoMsg { string nullable = 2; } -message Header { - string key = 1; - string value = 2; -} - message Headers { - repeated Header headers = 1; + map headers = 1; } message Void {} diff --git a/spec/fixtures/grpc/target.go b/spec/fixtures/grpc/target.go index 5e534384a8b3..bed03a4aa0df 100644 --- a/spec/fixtures/grpc/target.go +++ b/spec/fixtures/grpc/target.go @@ -63,13 +63,11 @@ func (s *server) EchoHeaders(ctx context.Context, in *pb.Void) (*pb.Headers, err return nil, status.Errorf(codes.DataLoss, "UnaryEcho: failed to get metadata") } headers := &pb.Headers{} + var headersMap = make(map[string]string, len(md)) for k, v := range md { - header := &pb.Header{ - Key: k, - Value: strings.Join(v, ", "), - } - headers.Headers = append(headers.Headers, header) + headersMap[k] = strings.Join(v, ", ") } + headers.Headers = headersMap return headers, nil } diff --git a/spec/fixtures/grpc/targetservice/targetservice.pb.go b/spec/fixtures/grpc/targetservice/targetservice.pb.go index ebd252ad16fd..b17629e2f79f 100644 --- a/spec/fixtures/grpc/targetservice/targetservice.pb.go +++ b/spec/fixtures/grpc/targetservice/targetservice.pb.go @@ -418,68 +418,16 @@ func (x *EchoMsg) GetNullable() string { return "" } -type Header struct { - state protoimpl.MessageState `protogen:"open.v1"` - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Header) Reset() { - *x = Header{} - mi := &file_targetservice_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Header) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Header) ProtoMessage() {} - -func (x *Header) ProtoReflect() protoreflect.Message { - mi := &file_targetservice_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Header.ProtoReflect.Descriptor instead. -func (*Header) Descriptor() ([]byte, []int) { - return file_targetservice_proto_rawDescGZIP(), []int{7} -} - -func (x *Header) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *Header) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - type Headers struct { state protoimpl.MessageState `protogen:"open.v1"` - Headers []*Header `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"` + Headers map[string]string `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *Headers) Reset() { *x = Headers{} - mi := &file_targetservice_proto_msgTypes[8] + mi := &file_targetservice_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -491,7 +439,7 @@ func (x *Headers) String() string { func (*Headers) ProtoMessage() {} func (x *Headers) ProtoReflect() protoreflect.Message { - mi := &file_targetservice_proto_msgTypes[8] + mi := &file_targetservice_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -504,10 +452,10 @@ func (x *Headers) ProtoReflect() protoreflect.Message { // Deprecated: Use Headers.ProtoReflect.Descriptor instead. func (*Headers) Descriptor() ([]byte, []int) { - return file_targetservice_proto_rawDescGZIP(), []int{8} + return file_targetservice_proto_rawDescGZIP(), []int{7} } -func (x *Headers) GetHeaders() []*Header { +func (x *Headers) GetHeaders() map[string]string { if x != nil { return x.Headers } @@ -522,7 +470,7 @@ type Void struct { func (x *Void) Reset() { *x = Void{} - mi := &file_targetservice_proto_msgTypes[9] + mi := &file_targetservice_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -534,7 +482,7 @@ func (x *Void) String() string { func (*Void) ProtoMessage() {} func (x *Void) ProtoReflect() protoreflect.Message { - mi := &file_targetservice_proto_msgTypes[9] + mi := &file_targetservice_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -547,7 +495,7 @@ func (x *Void) ProtoReflect() protoreflect.Message { // Deprecated: Use Void.ProtoReflect.Descriptor instead. func (*Void) Descriptor() ([]byte, []int) { - return file_targetservice_proto_rawDescGZIP(), []int{9} + return file_targetservice_proto_rawDescGZIP(), []int{8} } var File_targetservice_proto protoreflect.FileDescriptor @@ -601,53 +549,55 @@ var file_targetservice_proto_rawDesc = []byte{ 0x0a, 0x05, 0x61, 0x72, 0x72, 0x61, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x61, 0x72, 0x72, 0x61, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, - 0x22, 0x30, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x22, 0x3a, 0x0a, 0x07, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x2f, 0x0a, - 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, + 0x22, 0x84, 0x01, 0x0a, 0x07, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x3d, 0x0a, 0x07, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x06, 0x0a, 0x04, 0x56, 0x6f, 0x69, 0x64, 0x32, + 0xd5, 0x04, 0x0a, 0x07, 0x42, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x72, 0x12, 0x9f, 0x01, 0x0a, 0x08, + 0x53, 0x61, 0x79, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x12, 0x1b, 0x2e, 0x74, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x58, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x52, 0x3a, 0x01, 0x2a, 0x5a, 0x34, + 0x5a, 0x0f, 0x22, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, + 0x2f, 0x12, 0x21, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2f, + 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x2f, 0x7b, 0x67, 0x72, 0x65, 0x65, 0x74, 0x69, 0x6e, 0x67, + 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x73, 0x2f, 0x7b, 0x67, 0x72, 0x65, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x7d, 0x12, 0x6a, 0x0a, + 0x0d, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x1b, 0x2e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x22, 0x06, - 0x0a, 0x04, 0x56, 0x6f, 0x69, 0x64, 0x32, 0xd5, 0x04, 0x0a, 0x07, 0x42, 0x6f, 0x75, 0x6e, 0x63, - 0x65, 0x72, 0x12, 0x9f, 0x01, 0x0a, 0x08, 0x53, 0x61, 0x79, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x12, - 0x1b, 0x2e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x74, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x48, 0x65, 0x6c, - 0x6c, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x58, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x52, 0x3a, 0x01, 0x2a, 0x5a, 0x34, 0x5a, 0x0f, 0x22, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x12, 0x21, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x2f, 0x7b, 0x67, - 0x72, 0x65, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x17, 0x2f, 0x76, 0x31, - 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x7b, 0x67, 0x72, 0x65, 0x65, 0x74, - 0x69, 0x6e, 0x67, 0x7d, 0x12, 0x6a, 0x0a, 0x0d, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x4d, - 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x1b, 0x2e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x6e, - 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x2f, 0x7b, 0x67, 0x72, 0x65, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x7d, - 0x12, 0x4d, 0x0a, 0x08, 0x42, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x49, 0x74, 0x12, 0x15, 0x2e, 0x74, + 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x74, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x48, 0x65, 0x6c, 0x6c, + 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x18, 0x12, 0x16, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x2f, 0x7b, + 0x67, 0x72, 0x65, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x7d, 0x12, 0x4d, 0x0a, 0x08, 0x42, 0x6f, 0x75, + 0x6e, 0x63, 0x65, 0x49, 0x74, 0x12, 0x15, 0x2e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x42, 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x1a, 0x16, 0x2e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x42, 0x61, 0x6c, - 0x6c, 0x49, 0x6e, 0x1a, 0x16, 0x2e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x42, 0x61, 0x6c, 0x6c, 0x4f, 0x75, 0x74, 0x22, 0x12, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x0c, 0x3a, 0x01, 0x2a, 0x22, 0x07, 0x2f, 0x62, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x12, - 0x4b, 0x0a, 0x08, 0x47, 0x72, 0x6f, 0x77, 0x54, 0x61, 0x69, 0x6c, 0x12, 0x13, 0x2e, 0x74, 0x61, - 0x72, 0x67, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, - 0x1a, 0x13, 0x2e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, 0x2f, - 0x76, 0x31, 0x2f, 0x67, 0x72, 0x6f, 0x77, 0x2f, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x4b, 0x0a, 0x04, - 0x45, 0x63, 0x68, 0x6f, 0x12, 0x16, 0x2e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x4d, 0x73, 0x67, 0x1a, 0x16, 0x2e, 0x74, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x63, 0x68, - 0x6f, 0x4d, 0x73, 0x67, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x3a, 0x01, 0x2a, 0x22, - 0x08, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x12, 0x53, 0x0a, 0x0b, 0x45, 0x63, 0x68, - 0x6f, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x13, 0x2e, 0x74, 0x61, 0x72, 0x67, 0x65, - 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x56, 0x6f, 0x69, 0x64, 0x1a, 0x16, 0x2e, - 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x73, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, - 0x76, 0x31, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x42, 0x11, - 0x5a, 0x0f, 0x2e, 0x2f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6c, 0x4f, 0x75, 0x74, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x3a, 0x01, 0x2a, 0x22, + 0x07, 0x2f, 0x62, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x12, 0x4b, 0x0a, 0x08, 0x47, 0x72, 0x6f, 0x77, + 0x54, 0x61, 0x69, 0x6c, 0x12, 0x13, 0x2e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x1a, 0x13, 0x2e, 0x74, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x22, 0x15, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x72, 0x6f, 0x77, + 0x2f, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x4b, 0x0a, 0x04, 0x45, 0x63, 0x68, 0x6f, 0x12, 0x16, 0x2e, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x63, + 0x68, 0x6f, 0x4d, 0x73, 0x67, 0x1a, 0x16, 0x2e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x4d, 0x73, 0x67, 0x22, 0x13, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x3a, 0x01, 0x2a, 0x22, 0x08, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x63, + 0x68, 0x6f, 0x12, 0x53, 0x0a, 0x0b, 0x45, 0x63, 0x68, 0x6f, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x12, 0x13, 0x2e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x56, 0x6f, 0x69, 0x64, 0x1a, 0x16, 0x2e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x22, 0x17, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x63, 0x68, 0x6f, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x42, 0x11, 0x5a, 0x0f, 0x2e, 0x2f, 0x74, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -671,9 +621,9 @@ var file_targetservice_proto_goTypes = []any{ (*Limb)(nil), // 4: targetservice.Limb (*Body)(nil), // 5: targetservice.Body (*EchoMsg)(nil), // 6: targetservice.EchoMsg - (*Header)(nil), // 7: targetservice.Header - (*Headers)(nil), // 8: targetservice.Headers - (*Void)(nil), // 9: targetservice.Void + (*Headers)(nil), // 7: targetservice.Headers + (*Void)(nil), // 8: targetservice.Void + nil, // 9: targetservice.Headers.HeadersEntry (*timestamp.Timestamp)(nil), // 10: google.protobuf.Timestamp } var file_targetservice_proto_depIdxs = []int32{ @@ -683,19 +633,19 @@ var file_targetservice_proto_depIdxs = []int32{ 4, // 3: targetservice.Body.hands:type_name -> targetservice.Limb 4, // 4: targetservice.Body.legs:type_name -> targetservice.Limb 4, // 5: targetservice.Body.tail:type_name -> targetservice.Limb - 7, // 6: targetservice.Headers.headers:type_name -> targetservice.Header + 9, // 6: targetservice.Headers.headers:type_name -> targetservice.Headers.HeadersEntry 0, // 7: targetservice.Bouncer.SayHello:input_type -> targetservice.HelloRequest 0, // 8: targetservice.Bouncer.UnknownMethod:input_type -> targetservice.HelloRequest 2, // 9: targetservice.Bouncer.BounceIt:input_type -> targetservice.BallIn 5, // 10: targetservice.Bouncer.GrowTail:input_type -> targetservice.Body 6, // 11: targetservice.Bouncer.Echo:input_type -> targetservice.EchoMsg - 9, // 12: targetservice.Bouncer.EchoHeaders:input_type -> targetservice.Void + 8, // 12: targetservice.Bouncer.EchoHeaders:input_type -> targetservice.Void 1, // 13: targetservice.Bouncer.SayHello:output_type -> targetservice.HelloResponse 1, // 14: targetservice.Bouncer.UnknownMethod:output_type -> targetservice.HelloResponse 3, // 15: targetservice.Bouncer.BounceIt:output_type -> targetservice.BallOut 5, // 16: targetservice.Bouncer.GrowTail:output_type -> targetservice.Body 6, // 17: targetservice.Bouncer.Echo:output_type -> targetservice.EchoMsg - 8, // 18: targetservice.Bouncer.EchoHeaders:output_type -> targetservice.Headers + 7, // 18: targetservice.Bouncer.EchoHeaders:output_type -> targetservice.Headers 13, // [13:19] is the sub-list for method output_type 7, // [7:13] is the sub-list for method input_type 7, // [7:7] is the sub-list for extension type_name