github.com/anycable/anycable-go@v1.5.1/nats/config.go (about) 1 package nats 2 3 import ( 4 natsgo "github.com/nats-io/nats.go" 5 ) 6 7 type NATSConfig struct { 8 Servers string 9 Channel string 10 DontRandomizeServers bool 11 MaxReconnectAttempts int 12 // Internal channel name for node-to-node broadcasting 13 InternalChannel string 14 } 15 16 func NewNATSConfig() NATSConfig { 17 return NATSConfig{ 18 Servers: natsgo.DefaultURL, 19 Channel: "__anycable__", 20 MaxReconnectAttempts: 5, 21 InternalChannel: "__anycable_internal__", 22 } 23 }