-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rpc: introduce OncRpcSvcBuilder#withCallInterceptor
Motivation: Sometimes code need to perform an action before RPC request is executed, for example: - logging - validation - DoS protection / rate limitation ``` limiter = RateLimiter.create(500); svc = new OncRpcSvcBuilder() .withServiceName("svc") .withCallInterceptor(c -> limiter.acquire()) .build(); svc.start(); ``` Modification: introduce OncRpcSvcBuilder#withCallInterceptor that injects a RPC call consumer that is called before real work is done. Result: additional actions can be performed before rpc call execution. Acked-by: Lea Morschel Acked-by: Paul Millar Target: master
- Loading branch information
Showing
3 changed files
with
36 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters