Skip to content

Commit

Permalink
add devpod integration
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiunicolaa committed Jan 14, 2024
1 parent 8c0408b commit 38e9d5a
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM mcr.microsoft.com/devcontainers/go:1-1.21

ARG TARGETOS
ARG TARGETARCH

# install nats
ARG NATS_VERSION=2.10.9
RUN curl -L https://github.com/nats-io/nats-server/releases/download/v${NATS_VERSION}/nats-server-v${NATS_VERSION}-${TARGETOS}-${TARGETARCH}.zip -o nats-server.zip
RUN unzip nats-server.zip -d nats-server && cp nats-server/nats-server-v${NATS_VERSION}-${TARGETOS}-${TARGETARCH}/nats-server /usr/bin

# install nats-cli
RUN curl -sf https://binaries.nats.dev/nats-io/natscli/nats@latest | sh && cp nats /usr/bin

18 changes: 18 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "Go",
"build": {
"dockerfile": "Dockerfile"
},
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"version": "latest"
}
},
"mounts": [
{
"type": "volume",
"source": "devpod",
"target": "/home/vscode"
}
]
}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
[![Go Report Card](https://goreportcard.com/badge/github.com/claudiunicolaa/natsdedup)](https://goreportcard.com/report/github.com/claudiunicolaa/natsdedup)
[![Run natsdedup tests](https://github.com/claudiunicolaa/natsdedup/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/claudiunicolaa/natsdedup/actions/workflows/tests.yml)

[![Open in DevPod!](https://devpod.sh/assets/open-in-devpod.svg)](https://devpod.sh/open#https://github.com/claudiunicolaa/natsdedup)

`natsdedup` is a lightweight package for deduplicating messages on NATS subjects.
It listens to messages on a specified input subject, deduplicates them using a configurable time-to-live (TTL) cache, and forwards unique messages to a specified output subject.

Expand Down

0 comments on commit 38e9d5a

Please sign in to comment.