Unverified Commit 01577daf authored by Alexandru Vasile's avatar Alexandru Vasile Committed by GitHub
Browse files

Add resource limiting for `Subscriptions` (#786)



* ws-server: Fix copyright for tests

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* rpc_module: Return a resource builder when subscribing

Registering a subscription returns the subscription'
callback wrapped into a `MethodResourcesBuilder` for resource
limiting purposes.

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* tests: Fix `register_subscription` tests

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* server: Drop `ResourceGuard` with `SubscriptionSink` for resource limit

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* tests: Check resource limits for subscription

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* proc-macros: Render resource limits for subscription macro

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* tests: Extend subscription limiting test via macro generation

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* core: Check if the `unsubscribe` method was already inserted

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* tests: Fix unsupported fields for subscriptions

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* server: Verify subscription methods before registering them

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* Update test comment for subscription limiting

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* Modify tests comments

Signed-off-by: default avatarAlexandru Vasile <[email protected]>
parent 21189759
Pipeline #198583 passed with stages
in 5 minutes and 34 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment