Repository navigation
Conversation
2e9cc18 to
91951ee
Compare
|
Probably it's worth getting back to the issue despite the spring-cloud/spring-cloud-netflix#419 and #41 My idea is simply, if the backing discovery service can provide the client with the metadata (like Eureka and Zookeeper) we can cover that, for Consul it could return the tags information for version 1.x and when version 2.0 will be covered the metadata could be provided from there (issues: hashicorp/consul#1131, hashicorp/consul#697, hashicorp/consul#1107). |
|
At a glance, I think I like this better than #41. |
|
The only question is whether a "static" Map would be sufficient and won't be a need to do some lookup on the fly and there therefor introduce some InstanceMetadata abstraction. |
|
When you say, "static" map, do you mean just a |
91951ee to
c4226ce
Compare
|
Yes, exactly. I was only deliberating whether introducing there would be a need to introduce some wrapper on top of the map, for instance if you could declare some interface (let's call if InstanceMetadata) then the implementation could have much more flexibility. Although I not sure whether there will be ever need for that, so for now I just propose simple key/value map for storing the metadata. |
There was a problem hiding this comment.
I think DefaultServiceInstance needs to retain the original constructor signature as well as the new one. Hadn't noticed this before.
There was a problem hiding this comment.
Done, thanks for noticing.
c4226ce to
4186f49
Compare
|
Thanks @jmnarloch! |
|
@jmnarloch so I started looking at this. The two netflix implementations in |
|
I'd have to do something like this @dsyer @adriancole @marcingrzejszczak thoughts? |
|
The above stinks because it won't work for s-c-zk and s-c-consul, which will use |
|
Actually we already have a |
|
And there is a |
* discovery-metadata: Introduced ServiceInstance metadata map.
|
Closed with some polish via aa2ddce |
|
The metadata feature is a very good idea. It can be combined together with the "dependency" approach that we have in Zookeeper. |
This pull request introduces the metadata map that can be associated with each service instance registered within discovery service (currently covered by Eureka and Zookeper, Consul is planned to have such support in version 2.0) allowing to use that information on the client side.
I had to also align the version with latest spring boot snapshot where some class has been renamed, this is way there are two commits.