Skip to content
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

Switch to Attribute::Storage for dealing with method annotations #345

Merged
merged 7 commits into from
Sep 12, 2024

Conversation

tom-binary
Copy link
Contributor

Our current manual implementation for attributes is not very composable, partly due to the way attributes are implemented in Perl (via MODIFY_CODE_ATTRIBUTES).

Attribute::Storage provides an API which abstracts out much of the work we were doing before, and has the advantage that any service which wants to extend RPC/Emitter/Receiver methods can do so by creating its own attributes via that interface, without losing the original attribute behaviour for the built-in RPC/etc. in the process.

This is particularly relevant for cases where permissions need to be checked before RPC methods can run, or if we want to track additional metrics on input/output for our methods.

@tom-binary tom-binary merged commit 4d6a040 into deriv-com:master Sep 12, 2024
1 check passed
@tom-binary tom-binary deleted the feature/attribute_storage branch September 12, 2024 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant