Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: example for NATS cluster #2591

Merged
merged 2 commits into from
Jun 20, 2024
Merged

Conversation

mdelapenya
Copy link
Member

@mdelapenya mdelapenya commented Jun 18, 2024

What does this PR do?

It adds a testable example for the creation of a NATS cluster, which includes:

  • a docker network in which the containers will live. Then, containers can resolve by hostname/alias in the network
  • three NATS containers properly configured for the cluster setup
  • NATS client configured with the servers URL
  • some example operations for interacting with the cluster (subscribe, unsubscribe, etc)

This PR finally updates the current docs, as the WithArgument option was missing:

Why is it important?

Show by example how to set up a NATS cluster without adding anything to the current API, just configuring it properly.

Related issues

@mdelapenya mdelapenya requested a review from a team as a code owner June 18, 2024 05:40
@mdelapenya mdelapenya added the documentation Docs, docs, docs. label Jun 18, 2024
@mdelapenya mdelapenya self-assigned this Jun 18, 2024
Copy link

netlify bot commented Jun 18, 2024

Deploy Preview for testcontainers-go ready!

Name Link
🔨 Latest commit 4883f19
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-go/deploys/66711dc7b13b2e0008ccc06c
😎 Deploy Preview https://deploy-preview-2591--testcontainers-go.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@mdelapenya
Copy link
Member Author

@bearrito could you please take a look at this? 🙏

@mdelapenya
Copy link
Member Author

I'm going to merge this one, @bearrito please reopen the original issue in case you have any other consideration.

@mdelapenya mdelapenya merged commit 540052f into testcontainers:main Jun 20, 2024
106 checks passed
mdelapenya added a commit that referenced this pull request Jun 20, 2024
* main:
  docs: example for NATS cluster (#2591)
mdelapenya added a commit to mdelapenya/testcontainers-go that referenced this pull request Jun 24, 2024
* main:
  docs: document disabling ryuk with properties (testcontainers#2603)
  fix: allow compose files and readers to be used together (testcontainers#2598)
  chore(deps): bump urllib3 from 2.2.1 to 2.2.2 (testcontainers#2590)
  docs: example for NATS cluster (testcontainers#2591)
mdelapenya added a commit to mdelapenya/testcontainers-go that referenced this pull request Jun 24, 2024
* main:
  docs: document disabling ryuk with properties (testcontainers#2603)
  fix: allow compose files and readers to be used together (testcontainers#2598)
  chore(deps): bump urllib3 from 2.2.1 to 2.2.2 (testcontainers#2590)
  docs: example for NATS cluster (testcontainers#2591)
  docs: fix deprecation for material extensions emoji (testcontainers#2592)
  gha: update golangci-lint to v1.59.1 (testcontainers#2588)
  network: WithCheckDuplicate: don't set CheckDuplicate value (testcontainers#2589)
  fix: proper synchronisation for start/stop log production (testcontainers#2576)
  chore(deps): bump github.com/docker/docker from v25.0.5 to v26.1.4 (testcontainers#2584)
  docs: update contributing guide (testcontainers#2586)
  feat: add testcontainers labels to the built images (testcontainers#2579)
  feat(mongodb): Make the replica set name configurable (testcontainers#2538)
  chore: skip reaper tests if ryuk is disabled (testcontainers#2582)
  chore: increase check time to 60 secs instead of 20 (testcontainers#2581)
  fix: prepend substitutors for built images (testcontainers#2577)
  docs: update colima docs (testcontainers#2578)
  fix(cockroachdb): Fixes cockroachdb wait strategy handling (testcontainers#2456)
  Fix race condition when looking up reaper (ryuk) container (testcontainers#2508)
  chore: bring golangci-lint back (testcontainers#2571)
  docs(compose): Fix typo docker compose docs (testcontainers#2565)
@mdelapenya mdelapenya deleted the nats-cluster branch June 27, 2024 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Docs, docs, docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: NATS Cluster
1 participant