WithNATS enables the NATS JetStream KV backend.
(conn *nats.Conn, bucketName string)
| 66 | |
| 67 | // WithNATS enables the NATS JetStream KV backend. |
| 68 | func WithNATS(conn *nats.Conn, bucketName string) Option { |
| 69 | return func(c *config) { |
| 70 | c.natsConn = conn |
| 71 | c.bucketName = bucketName |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | // WithMaxBytes sets the maximum total size (in bytes) for the NATS KV bucket. |
| 76 | // When the limit is reached, NATS discards the oldest entries. Ignored for in-memory backend. |
no outgoing calls