multi: registration complete MW interceptor msg
In this commit, we change the flow of the rpc middleware registration a bit. In order to allow a client to add rpc middleware interceptors in a deterministic order, we now make the server send a "registration complete" message to the client after compeleting the registration process so that the client knows when it can go ahead and register the next client.
This commit is contained in:
6 files changed
+566
-485
No files matched your search
+498
-476
File diff suppressed because it is too large.
Load diff
@@ -4379,6 +4379,14 @@ message RPCMiddlewareRequest {
|
||||
the same type, or replaced by an error message.
|
||||
*/
|
||||
RPCMessage response = 6;
|
||||
|
||||
/*
|
||||
This is used to indicate to the client that the server has successfully
|
||||
registered the interceptor. This is only used in the very first message
|
||||
that the server sends to the client after the client sends the server
|
||||
the middleware registration message.
|
||||
*/
|
||||
bool reg_complete = 8;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -5995,6 +5995,10 @@
|
||||
"$ref": "#/definitions/lnrpcRPCMessage",
|
||||
"description": "Intercept outgoing gRPC response message: all outgoing messages, both on\nstreaming and unary RPCs, are forwarded to the middleware for inspection\nand amendment. The response in this message is the original response as\nit was generated by the main RPC server. It can either be accepted\n(=forwarded to the client), replaced/overwritten with a new message of\nthe same type, or replaced by an error message."
|
||||
},
|
||||
"reg_complete": {
|
||||
"type": "boolean",
|
||||
"description": "This is used to indicate to the client that the server has successfully\nregistered the interceptor. This is only used in the very first message\nthat the server sends to the client after the client sends the server\nthe middleware registration message."
|
||||
},
|
||||
"msg_id": {
|
||||
"type": "string",
|
||||
"format": "uint64",
|
||||
|
||||
Reference in new issue
Block a user