Skip to content

Commit

Permalink
docs: include JetStreamConfig detail in nats pubsub documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexCuse committed May 13, 2023
1 parent 5592220 commit 3321501
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/content/pubsubs/nats.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}}
Expand Down

0 comments on commit 3321501

Please sign in to comment.