-
-
Notifications
You must be signed in to change notification settings - Fork 118
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
Make ContainerOptions Deserializable #217
base: master
Are you sure you want to change the base?
Conversation
- Add an `image` function to `ContainerOptionsBuilder` to allow you to set the container image after creating the builder with `new`.
OK this is turning into a little bit more than making Additionally I need to be able to change the container image after the builder has been instantiated, so I created a function for that. I am also going to need the ability to remove exposed ports, so I will add that to this PR as well if you are OK with that. Edit: I'm also curious how you feel about being able to get parameters such as the container image as well as set them. This may be too far outside of what you are wanting to go for for this API. If it is, I can make my own "ContainerOptionsBuilderBuilder" type in my project that will facilitate my needs. I think that may be better in this case, unless you want to re-craft the If you would like to pursue that option for this, then I will gladly continue working on the PR for it, but otherwise I will just add a type to my own project that I can use. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the change
Sorry about the delay on this. For a long while all of my gh motifs were going to my email spam folder so I likely missed this question before. I think this is a good change that adds some flexibility that doesn’t exist today. This is one of my earlier crates so I was still figuring out what good looked like. If I had more time I’d be doing more refactoring. I really appreciate pulls like yours |
No problem, glad it's useful. :) I think I was going to need this for a project and then didn't end up needing it. I've personally written code, and then gone back to it and been like, "oh, I wish I would have known what I know now when I wrote this, it would have been a lot nicer". 🙂 |
Ok. Let me know if you want to move forward with this. If not let's revisit this when inspiration strikes again :) |
What did you implement:
This implements Deserialize on
ContainerOptions
. I switched the keys in theContainerOptions.params
hash map to owned strings instead of&'static str
. Technically these could be borrowed from the deserialized value, but I think that would be cumbersome to use.Closes: #216
How did you verify your change:
Not at all yet ( this is work-in-progress ). I'll be testing it soon.
What (if anything) would need to be called out in the CHANGELOG for the next release:
Just a note that Deserialize is now implemented for
ContainerOptions
.