File tree Expand file tree Collapse file tree 4 files changed +15
-0
lines changed Expand file tree Collapse file tree 4 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ def self.hash_accessor(*names) #:nodoc:
41
41
:method_name ,
42
42
:request ,
43
43
:request_type ,
44
+ :request_wrapper ,
44
45
:response ,
45
46
:response_type ,
46
47
:rpc_method ,
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ def _call(env)
21
21
env . service_name = service_name
22
22
env . method_name = method_name
23
23
env . request = request
24
+ env . request_wrapper = request_wrapper
24
25
env . client_host = request_wrapper . caller
25
26
26
27
env . rpc_service = service
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ class ErrorReason < ::Protobuf::Enum
31
31
#
32
32
class Request < ::Protobuf ::Message ; end
33
33
class Response < ::Protobuf ::Message ; end
34
+ class Header < ::Protobuf ::Message ; end
34
35
35
36
36
37
##
@@ -41,6 +42,7 @@ class Request
41
42
required :string , :method_name , 2
42
43
optional :bytes , :request_proto , 3
43
44
optional :string , :caller , 4
45
+ repeated ::Protobuf ::Socketrpc ::Header , :headers , 5
44
46
end
45
47
46
48
class Response
@@ -51,6 +53,11 @@ class Response
51
53
optional :string , :server , 5
52
54
end
53
55
56
+ class Header
57
+ required :string , :key , 1
58
+ optional :string , :value , 2
59
+ end
60
+
54
61
end
55
62
56
63
end
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ message Request
30
30
required string method_name = 2 ; // Service method to invoke
31
31
optional bytes request_proto = 3 ; // Serialized request bytes
32
32
optional string caller = 4 ; // Calling hostname or address
33
+ repeated Header headers = 5 ; // General purpose request headers
33
34
}
34
35
35
36
message Response
@@ -41,6 +42,11 @@ message Response
41
42
optional string server = 5 ; // Server hostname or address
42
43
}
43
44
45
+ message Header {
46
+ required string key = 1 ;
47
+ optional string value = 2 ;
48
+ }
49
+
44
50
// Possible error reasons
45
51
// The server-side errors are returned in the response from the server.
46
52
// The client-side errors are returned by the client-side code when it doesn't
You can’t perform that action at this time.
0 commit comments