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

⚠️ Inteceptor: Unify Client and Subresource Client #2306

Merged

Commits on May 7, 2023

  1. ⚠️ Inteceptor: Unify Client and Subresource Client

    At the moment, the inteceptor has two different constructors for a
    client interceptor and a subresource interceptor. This means that in
    order to intercept subresource requests, one has to set up a normal
    interceptor, set the `SubResource` func to return a subresource
    interceptor and then configure the desired behavior on the subresource
    interceptor.
    
    This is needlessly complex, unify the two and add the parameters for the
    subresource funcs into the top-level `Funcs` struct.
    
    Also, change the signature of the subresource funcs to contain a `Client`
    instead of a `SubResourceClient` and the name of the subresource. This
    makes more sense, as for example if someone were to implement `Scale`
    this way, they likely want to check if the object to be scaled actually
    exists in the client and then modify it.
    alvaroaleman committed May 7, 2023
    Configuration menu
    Copy the full SHA
    6ca0111 View commit details
    Browse the repository at this point in the history