anycable / anycable-go

AnyCable real-time server
https://anycable.io
MIT License
377 stars 65 forks source link

ability to configure redis sentinel is nebulous and documentation is missing #206

Open josh-m-sharpe opened 2 months ago

josh-m-sharpe commented 2 months ago

Tell us about your environment

docker

AnyCable-Go version: anycable/anycable-go:1.5.3

What did you do?

tried finding explicit documentation for connecting to redis sentinels but they are not present here: https://docs.anycable.io/anycable-go/configuration?id=redis-configuration found related changelog entry: https://github.com/anycable/anycable-go/blob/master/CHANGELOG.md#101-2020-07-07

But then I see there's no EnvVars thing (sorry, my go sucks) in https://github.com/anycable/anycable-go/blob/master/cli/options.go#L543-L546 for the sentinel config, so makes me second guess that changelog entry or the viability of using ANYCABLE_REDIS_SENTINELS

Would be amazeballs if I could use env vars to connect to redis sentinel and the docs could reflect that information. Thank you!

palkan commented 2 months ago

Thanks for reporting!

Yeah, we have the configuration properly covered at the Ruby side: https://docs.anycable.io/ruby/broadcast_adapters?id=redis-sentinel-support

It's the same for the Go server, meaning the env var works (there's no EnvVars thing because we do that implicitly—convention over configuration appleid to Go: https://github.com/anycable/anycable-go/blob/3e19ee9b6ad4e443154f4688a610d1d9c7f2038f/cli/options.go#L1219