Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/casualjim/go-curator
https://github.com/casualjim/go-curator
Last synced: 23 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/casualjim/go-curator
- Owner: casualjim
- Created: 2014-08-14T05:54:29.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-09-22T08:00:25.000Z (about 10 years ago)
- Last Synced: 2024-10-04T19:43:36.721Z (about 1 month ago)
- Language: Go
- Size: 207 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# go-curator
==========A port of the netflix curator zookeeper framework, mostly for service discovery
Provides a zookeeper client with a high tolerance for disconnections. It optionally hooks into the netflix exhibitor
framework, so that it can reconfigure itself as the zookeeper ensemble changes.## Ensemble providers
An ensemble provider interface represents a dynamic connection string. The library detects when there are changes in the
connection string and will reconnect as needed.## Event bus
You can register channels as event handlers for connection events. When the message sent to a handler channel isn't
handled withing 50ms (by default) then the handler gets unregistered and a warning is logged.### How it works
Connection
* every operation is handled in a retry loop
* a connection is watched and when a session event occurs an appropriate action is taken, on expired session it reconnects
* the retry loop does:
* check for connection string changes, on change reconnect
* try the operation when fails check policy (predicate) and retry or bail
* consumers can register channels as event handlers for connection events so they know how to change internal stateNode Cache
* caches a single nodeChildren Cache
* caches a map of children