MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / WithNATS

Function WithNATS

pkg/cache/cache.go:68–73  ·  view source on GitHub ↗

WithNATS enables the NATS JetStream KV backend.

(conn *nats.Conn, bucketName string)

Source from the content-addressed store, hash-verified

66
67// WithNATS enables the NATS JetStream KV backend.
68func 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.

Calls

no outgoing calls