Nextdoor / ndserviceregistry

Nextdoor ServiceRegistry Foundational Python Class
27 stars 12 forks source link

Add get_state() method to KazooServiceRegistry. #36

Closed diranged closed 10 years ago

diranged commented 10 years ago

The get_state() method returns the current known conection state of the KazooServiceRegistry object to Zookeeper. This state is managed by the _state_listener() method and is updated any time a connection state change is detected.

get_state() also accepts an optional callback argument that will add a callback to the state listener and update that callback any time the connection state changes.

mikhail commented 10 years ago

Stylistic suggestions, but overall lgtm; +2