-
Notifications
You must be signed in to change notification settings - Fork 0
Leon/dev #1
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
Merged
Leon/dev #1
Changes from 9 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
718f557
Skeleton for handling incoming observations
zluudg 26f70a5
Control debug logs for different components
zluudg 2c756b9
Aggregate observations based on lookup of NATS subject
zluudg 52243be
Keep subject prefix internal to nats, set bucket name, ttl and prefix…
zluudg 83b67e0
Generate observation JSON from flags
zluudg a14a98c
go fmt
zluudg 24dadd3
Actual publish
zluudg 5b67468
go fmt
zluudg 3487463
some GH workflow action pipeline stuff
zluudg fddce0f
dependabot integration
zluudg 2a191a2
make sure go version 1.26.6 is used
zluudg 2f2ff9e
prevent hot loop in MAIN_APP_LOOP
zluudg b5dda84
avoid duplicating observation encodings
zluudg 8066475
fix fragile manipulation of NATS subjects
zluudg cd2bb30
actually expire keys. skip history of key/val during connect
zluudg d0b948e
Add bounds check before checking observation flag type
zluudg b765d8b
go fmt
zluudg 8e18768
fixed typo that caused compilation failure
zluudg 9d4a693
Do not accept negative TTL values in NATS
zluudg d700f57
More robust manipulation of NATS keys/subjects. Also with tests!
zluudg 3b5302a
go fmt
zluudg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| name: Base Pipeline | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ "main" ] | ||
| pull_request: | ||
| branches: [ "main" ] | ||
|
|
||
| env: | ||
| GO_VERSION: "1.25.6" | ||
| jobs: | ||
| format: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Go | ||
| uses: actions/setup-go@v5.5.0 | ||
| with: | ||
| go-version: ${{ env.GO_VERSION }} | ||
|
|
||
| - name: Check formatting | ||
| run: | | ||
| files=$(gofmt -l ./) | ||
|
|
||
| if [ -n "$files" ]; then | ||
| while IFS= read -r file; do | ||
| echo "::warning file=$file::File is not gofmt formatted" | ||
| done <<< "$files" | ||
| exit 1 | ||
| else | ||
| echo "✅ All files are properly formatted." | ||
| fi | ||
|
|
||
| test: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Go | ||
| uses: actions/setup-go@v5.5.0 | ||
| with: | ||
| go-version: ${{ env.GO_VERSION }} | ||
|
|
||
| - name: Build | ||
| run: | | ||
| make build | ||
|
|
||
| - name: Test | ||
| run: | | ||
| make test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| name: Build container | ||
|
|
||
| on: | ||
| workflow_run: | ||
| workflows: | ||
| - "Base Pipeline" | ||
| branches: | ||
| - "main" | ||
| types: | ||
| - completed | ||
| push: | ||
| tags: | ||
| - "v*.*.*" | ||
|
|
||
| env: | ||
| GO_VERSION: "1.25.5" | ||
| jobs: | ||
| container: | ||
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
| name: Build and push container | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| actions: write | ||
| contents: read | ||
| packages: write | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-go@v5 | ||
| with: | ||
| go-version: ${{ env.GO_VERSION }} | ||
| - uses: ko-build/setup-ko@v0.7 | ||
| - run: ko build --bare ./cmd/observation-encoder | ||
zluudg marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| defaultPlatforms: | ||
| - linux/amd64 | ||
| - linux/arm64 | ||
| defaultLdflags: | ||
| - -X main.commit={{.Git.FullCommit}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,50 @@ | ||
| module github.com/dnstapir/observation-encoder | ||
|
|
||
| go 1.24.6 | ||
| go 1.25.6 | ||
zluudg marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| require github.com/pelletier/go-toml/v2 v2.2.4 | ||
| require ( | ||
| github.com/dnstapir/tapir v0.0.0-20260115113810-71a904f35f68 | ||
| github.com/nats-io/nats.go v1.48.0 | ||
| github.com/pelletier/go-toml/v2 v2.2.4 | ||
| ) | ||
|
|
||
| require ( | ||
| github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect | ||
| github.com/eclipse/paho.golang v0.23.0 // indirect | ||
| github.com/fsnotify/fsnotify v1.9.0 // indirect | ||
| github.com/go-viper/mapstructure/v2 v2.5.0 // indirect | ||
| github.com/goccy/go-json v0.10.5 // indirect | ||
| github.com/gookit/goutil v0.7.3 // indirect | ||
| github.com/gorilla/websocket v1.5.3 // indirect | ||
| github.com/klauspost/compress v1.18.4 // indirect | ||
| github.com/lestrrat-go/blackmagic v1.0.4 // indirect | ||
| github.com/lestrrat-go/httpcc v1.0.1 // indirect | ||
| github.com/lestrrat-go/httprc v1.0.6 // indirect | ||
| github.com/lestrrat-go/iter v1.0.2 // indirect | ||
| github.com/lestrrat-go/jwx/v2 v2.1.6 // indirect | ||
| github.com/lestrrat-go/option v1.0.1 // indirect | ||
| github.com/miekg/dns v1.1.72 // indirect | ||
| github.com/nats-io/nkeys v0.4.15 // indirect | ||
| github.com/nats-io/nuid v1.0.1 // indirect | ||
| github.com/rogpeppe/go-internal v1.14.1 // indirect | ||
| github.com/ryanuber/columnize v2.1.2+incompatible // indirect | ||
| github.com/sagikazarmark/locafero v0.12.0 // indirect | ||
| github.com/segmentio/asm v1.2.1 // indirect | ||
| github.com/smhanov/dawg v0.0.0-20220118194912-66057bdbf2e3 // indirect | ||
| github.com/spf13/afero v1.15.0 // indirect | ||
| github.com/spf13/cast v1.10.0 // indirect | ||
| github.com/spf13/pflag v1.0.10 // indirect | ||
| github.com/spf13/viper v1.21.0 // indirect | ||
| github.com/subosito/gotenv v1.6.0 // indirect | ||
| go.yaml.in/yaml/v3 v3.0.4 // indirect | ||
| golang.org/x/crypto v0.48.0 // indirect | ||
| golang.org/x/exp v0.0.0-20260209203927-2842357ff358 // indirect | ||
| golang.org/x/mod v0.33.0 // indirect | ||
| golang.org/x/net v0.50.0 // indirect | ||
| golang.org/x/sync v0.19.0 // indirect | ||
| golang.org/x/sys v0.41.0 // indirect | ||
| golang.org/x/term v0.40.0 // indirect | ||
| golang.org/x/text v0.34.0 // indirect | ||
| golang.org/x/tools v0.42.0 // indirect | ||
| gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect | ||
| ) | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.