This is a fork of Integralist/go-elasticache with a few changes and additions:
- Watcher support for detecting and applying server changes.
- Removed logging and reliance on environment variables.
- Remove unnecessary
Node
andItem
types. - Replaced
glide
withdep
as dependency manager. - Moved package to
go-elasticache
instead ofgo-elasticache/elasticache
.
You can use the Watch
method to detect changes in cluster configuration. The client is updated automatically when changes are detected.
// Make sure the endpoint has ".cfg" in it!
client, _ := elasticache.New("mycluster.fnjyzo.cfg.use1.cache.amazonaws.com")
ctx := context.WithCancel(context.Background())
defer cancel() // Call cancel when you are done with the memcache client
go client.Watch(ctx)
See Elasticache Auto Discovery docs for details.