Skip to content

Commit

Permalink
docs: document nats.WithConfigFile
Browse files Browse the repository at this point in the history
  • Loading branch information
vyskocilm committed Dec 2, 2024
1 parent a3636bb commit 9a9225f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docs/modules/nats.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ These arguments are passed to the NATS server when it starts, as part of the com
[Passing arguments](../../modules/nats/examples_test.go) inside_block:withArguments
<!--/codeinclude-->
#### Custom configuration file
It's possible to pass a custom config file to NATS container using `nats.WithConfigFile(strings.NewReader(config))`. The `io.Reader` is passed as a `-config /etc/nats.conf` arguments to an entrypoint.

!!! note
Changing a connectivity (listen address or ports) can break the container setup. So configuration must be done with a care.

### Container Methods

The NATS container exposes the following methods:
Expand Down Expand Up @@ -102,4 +109,4 @@ Exactly like `ConnectionString`, but it panics if an error occurs, returning jus
<!--codeinclude-->
[NATS Cluster](../../modules/nats/examples_test.go) inside_block:cluster
<!--/codeinclude-->
<!--/codeinclude-->

0 comments on commit 9a9225f

Please sign in to comment.