Skip to content

Commit 0f6d481

Browse files
authored
Merge pull request #68 from opensciencegrid/copilot/add-xrootd-parsing-feature
Add collector binary with XRootD packet parsing and stateful correlation
2 parents e56c254 + 352d93b commit 0f6d481

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+8972
-277
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,6 @@
2121
go.work
2222

2323
dist/
24+
shoveler
25+
bin/
26+
references/

.goreleaser.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,18 @@ builds:
1919
ignore:
2020
- goos: windows
2121
goarch: arm64
22+
- env:
23+
- CGO_ENABLED=0
24+
goos:
25+
- linux
26+
- windows
27+
- darwin
28+
id: "xrootd-monitoring-collector"
29+
binary: xrootd-monitoring-collector
30+
main: ./cmd/collector
31+
ignore:
32+
- goos: windows
33+
goarch: arm64
2234
- env:
2335
- CGO_ENABLED=0
2436
goos:
@@ -56,6 +68,7 @@ archives:
5668
format: zip
5769
builds:
5870
- xrootd-monitoring-shoveler
71+
- xrootd-monitoring-collector
5972
- createtoken
6073
- shoveler-status
6174
wrap_in_directory: true
@@ -80,6 +93,7 @@ nfpms:
8093
- package_name: xrootd-monitoring-shoveler
8194
builds:
8295
- xrootd-monitoring-shoveler
96+
- xrootd-monitoring-collector
8397
- createtoken
8498
- shoveler-status
8599
file_name_template: '{{ .ProjectName }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
@@ -94,7 +108,7 @@ nfpms:
94108
- deb
95109
- rpm
96110
bindir: /usr/bin
97-
release: 1
111+
release: "1"
98112
section: default
99113
priority: extra
100114
contents:
@@ -140,17 +154,14 @@ dockers:
140154
- "ghcr.io/opensciencegrid/xrootd-monitoring-shoveler:{{ .Tag }}"
141155
- "opensciencegrid/xrootd-monitoring-shoveler:{{ .Tag }}"
142156
- "opensciencegrid/xrootd-monitoring-shoveler:latest"
143-
# GOOS of the built binaries/packages that should be used.
144157
goos: linux
145-
146-
# GOARCH of the built binaries/packages that should be used.
147158
goarch: amd64
148-
149-
# IDs to filter the binaries/packages.
159+
use: buildx
150160
ids:
151161
- xrootd-monitoring-shoveler-nfpms
152162
build_flag_templates:
153163
- "--pull"
164+
- "--platform=linux/amd64"
154165
- "--label=org.opencontainers.image.created={{.Date}}"
155166
- "--label=org.opencontainers.image.title={{.ProjectName}}"
156167
- "--label=org.opencontainers.image.revision={{.FullCommit}}"

Makefile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
VERSION=1.0.0
22
GO_FLAGS=CGO_ENABLED=0
33

4-
all: bin/shoveler bin/createtoken
4+
all: bin/shoveler bin/xrootd-monitoring-collector bin/createtoken
55

66
bin/shoveler: *.go
7-
$(GO_FLAGS) go build -ldflags "-X main.VERSION=$(VERSION)" -o bin/shoveler .
8-
$(GO_FLAGS) GOOS=linux GOARCH=amd64 go build -ldflags "-X main.VERSION=$(VERSION)" -o bin/linux-x64-shoveler .
7+
$(GO_FLAGS) go build -ldflags "-X main.VERSION=$(VERSION)" -o bin/shoveler ./cmd/shoveler
8+
$(GO_FLAGS) GOOS=linux GOARCH=amd64 go build -ldflags "-X main.VERSION=$(VERSION)" -o bin/linux-x64-shoveler ./cmd/shoveler
9+
10+
bin/xrootd-monitoring-collector: cmd/collector/main.go
11+
$(GO_FLAGS) go build -ldflags "-X main.VERSION=$(VERSION)" -o bin/xrootd-monitoring-collector ./cmd/collector
12+
$(GO_FLAGS) GOOS=linux GOARCH=amd64 go build -ldflags "-X main.VERSION=$(VERSION)" -o bin/linux-x64-xrootd-monitoring-collector ./cmd/collector
913

1014
bin/createtoken: cmd/createtoken/main.go
1115
$(GO_FLAGS) GOOS=linux GOARCH=amd64 go build -o bin/linux-x64-createtoken ./cmd/createtoken

0 commit comments

Comments
 (0)