Uh oh!
There was an error while loading. Please reload this page.
add getServiceCredsByLabel - #16
Conversation
srl295
commented
Apr 11, 2016
Note, other |
mathieug
commented
Apr 12, 2016
Cool, thanks 👍 |
mathieug
commented
Apr 12, 2016
Ok, I've read #3 :) |
srl295
commented
May 16, 2016
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. |
pmuellr
commented
May 17, 2016
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. |
pmuellr
commented
Feb 3, 2017
I'm still confused as to why you wouldn't want Or maybe no one ever uses anything other than |
srl295
commented
Feb 3, 2017
I think it's reasonable to complete the set here. So how about I:
|
pmuellr
commented
Feb 3, 2017
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