linkedin / rest.li

Rest.li is a REST+JSON framework for building robust, scalable service architectures using dynamic discovery and simple asynchronous APIs.
rest.li
Other
2.51k stars 546 forks source link

Add service discovery status event emitter to d2 client #849

Closed bohhyang closed 2 years ago

bohhyang commented 2 years ago

In a previous PR: https://github.com/linkedin/rest.li/pull/835, there was a mistake that uses ZookeeperAnnouncer as a helper to emit service discovery status events for both server-side and client-side events (reference context about service discovery status events in the previous PR), but the announcer will only work for server-side events. This PR is to fix the client-side events for d2 client by adding the event emitter directly to ZookeeperEphemeralStore thru D2ClientConfig.