richardartoul / nola

MIT License
74 stars 6 forks source link

Make registry heartbeat TTL configurable #88

Open rtadepalli opened 1 year ago

rtadepalli commented 1 year ago

Saw a TODO in kv_registry.go that said that it'd be nice if the heartbeat TTL was configurable, so this change acts on that TODO.

I've made all registries that currently take options take in what the heartbeat TTL value should be, and have exposed a HeartbeatTTL() function to environment such that this value is appropriately passed to context.WithTimeout while calling Heartbeat() on the environment object. This was previously using the hardcoded default of 5 seconds.

cc @richardartoul