-
Notifications
You must be signed in to change notification settings - Fork 455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support before/after hooks on user remote RPCs #351
Conversation
Pull Request Test Coverage Report for Build 6745955476
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should create another set of hooks "remoteHooks" for Remotes as they're very different than Handlers.
Remotes -> General Server to Server RPC
Handlers -> Frontend to Backend RPC generated from a player handler call.
I considered doing that initially also to avoid introducing this behavior change unexpectedly, however I figured that every kind of RPC share the same "HandlerHooks" struct. For example "sys.push" and "sys.bindsession" already trigger the same set of HandlerHooks we have. Should be a small change, do you think it's worth doing the separation just for remotes? |
I believe it is, so that we reduce the probability of human error when creating these hooks. The separation will help with clarity of what will run when. Can you adjust the PR? |
Closing this as the work was merged/finished on this new PR: #365 |
Currently, "before" / "after" hooks are invoked only on "sys" RPCs on
remote.go
module.Therefore there's no way to add before/after hooks on "user" remote requests, only via handlers.
This MR invokes the existing hooks on remote pipeline with
ExecuteBeforePipeline
andExecuteAfterPipeline
.