-
Notifications
You must be signed in to change notification settings - Fork 20
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
add getServiceCredsByLabel #16
base: master
Are you sure you want to change the base?
Conversation
Note, other |
Cool, thanks 👍 |
Ok, I've read #3 :) |
okay… so somehow I missed that Upshot is that you can use So, there's a workaround here. Not a great workaround, but a workaround. |
Not sure what's wrong with the docs; The intent was to be able to provide the original If folks are really dead-set on accessing services by label, which seems like a not great idea to me, then really you should add some new functions as this issue suggests, rather than expecting people to access the array/map thing, which is more brittle than a function accessor. |
getServiceCredsByLabel is like getServiceCreds except that the label is used. * internal function getServiceByLabel added * docs update * tests update Note, other get*ByLabel functions may be desired. This is just a starting point. See discussion cloudfoundry-community#3
@pmuellr OK. I've rebased this PR, which adds the function
tests included. Let me know if you think this is reasonable (even if it needs some caveats about labels). As a service developer, this API lets our SDK very simply find the service regardless of what the user named it. |
I'm still confused as to why you wouldn't want Or maybe no one ever uses anything other than |
I think it's reasonable to complete the set here. So how about I:
|
Sounds good! I wonder if we should a note in the docs about usage of these. The reason I never provided this function is that I've had service providers change the label on the service over time, breaking code. Users have absolutely no control over the label; but they have complete control over the name. I assume there must be some "pros" to using labels vs names? |
Because I am a service provider trying to provide an sdk- specifically, #3 (comment)
|
getServiceCredsByLabel is like getServiceCreds except that the label is used.
See discussion #3