From 33215018664813fb034b9b9f9fa98a1ae01ccb8b Mon Sep 17 00:00:00 2001 From: Alex Ullrich Date: Mon, 20 Mar 2023 10:48:55 -0400 Subject: [PATCH] docs: include JetStreamConfig detail in nats pubsub documentation --- docs/content/pubsubs/nats.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/content/pubsubs/nats.md b/docs/content/pubsubs/nats.md index 4b94d3e45..90b00847b 100644 --- a/docs/content/pubsubs/nats.md +++ b/docs/content/pubsubs/nats.md @@ -27,10 +27,20 @@ NATS Jetstream is a data streaming system powered by NATS, and written in the Go #### Configuration +Configuration is done through PublisherConfig and SubscriberConfig types. These share a common JetStreamConfig. To use the experimental nats-core support, set Disabled=true. + +{{% render-md %}} +{{% load-snippet-partial file="src-link/watermill-nats/pkg/nats/jetstream.go" first_line_contains="// JetStreamConfig contains" last_line_contains="type DurableCalculator =" %}} +{{% /render-md %}} + +PublisherConfig: + {{% render-md %}} {{% load-snippet-partial file="src-link/watermill-nats/pkg/nats/publisher.go" first_line_contains="type PublisherConfig struct" last_line_contains="type Publisher struct {" %}} {{% /render-md %}} +Subscriber Config: + {{% render-md %}} {{% load-snippet-partial file="src-link/watermill-nats/pkg/nats/subscriber.go" first_line_contains="type SubscriberConfig struct" last_line_contains="type Subscriber struct" %}} {{% /render-md %}}