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

AnyBody? #107

Closed
aviramha opened this issue Feb 19, 2024 · 1 comment
Closed

AnyBody? #107

aviramha opened this issue Feb 19, 2024 · 1 comment

Comments

@aviramha
Copy link

I'm trying to help the upgrade of kube-rs. We're a bit confused with the new Body trait and in our case kube-rs implements a tower Service so users can build their own stacks.
The issue is that it requires to know the body type ahead of time (it can be different types based on the exact request used).
https://github.com/kube-rs/kube/blob/c2983f6d196daecde39069f7ab322375ff9d1566/kube-client/src/client/mod.rs#L68

I was thinking maybe there should be an AnyBody enum, that takes the simple types that are implemented in this crate and sums it so then the service can use this as well.
Maybe I have wrong idea of that design but would be help to hear your thoughts.

@clux
Copy link

clux commented Mar 25, 2024

Update: this is resolved via a hyper contributor writing a custom Body type for us (thanks again!) that we now use in kube: https://github.com/kube-rs/kube/blob/2ff3a2d50428f3f7d1ef9633b59e938346128688/kube-client/src/client/body.rs#L14-L86

@seanmonstar seanmonstar closed this as not planned Won't fix, can't repro, duplicate, stale Mar 25, 2024
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

No branches or pull requests

3 participants