WithReplicas sets the number of JetStream KV replicas for the NATS bucket. Defaults to 1 if not set. Set to match the cluster size (e.g. 3) for production NATS clusters. Ignored for in-memory backend.
(n int)
| 87 | // Defaults to 1 if not set. Set to match the cluster size (e.g. 3) for |
| 88 | // production NATS clusters. Ignored for in-memory backend. |
| 89 | func WithReplicas(n int) Option { |
| 90 | return func(c *config) { c.replicas = n } |
| 91 | } |
| 92 | |
| 93 | // WithReconnect provides a channel that signals NATS reconnection events. |
| 94 | func WithReconnect(ch <-chan struct{}) Option { |
no outgoing calls