diff --git a/Makefile b/Makefile index 0a7ad04..13c7d1b 100644 --- a/Makefile +++ b/Makefile @@ -23,6 +23,11 @@ all: $(APP) $(APP): $(GOSRC) make -C collectors + if [ "$(shell go version | cut -d' ' -f 3 | cut -d '.' -f1-2)" == "go1.16" ]; then \ + cp go.mod.1.16 go.mod; \ + else \ + cp go.mod.1.17+ go.mod; \ + fi go get go build -o $(APP) $(GOSRC_APP) diff --git a/go.mod b/go.mod index 07d46f6..a4aacb8 100644 --- a/go.mod +++ b/go.mod @@ -1,16 +1,35 @@ module github.com/ClusterCockpit/cc-metric-collector -go 1.16 +go 1.17 require ( + github.com/ClusterCockpit/cc-units v0.0.0-20220318130935-92a0c6442220 github.com/NVIDIA/go-nvml v0.11.6-0 github.com/PaesslerAG/gval v1.1.2 github.com/gorilla/mux v1.8.0 github.com/influxdata/influxdb-client-go/v2 v2.8.1 github.com/influxdata/line-protocol v0.0.0-20210922203350-b1ad95c89adf - github.com/nats-io/nats-server/v2 v2.8.0 // indirect github.com/nats-io/nats.go v1.14.0 github.com/prometheus/client_golang v1.12.1 github.com/stmcginnis/gofish v0.13.0 golang.org/x/sys v0.0.0-20220412211240-33da011f77ad ) + +require ( + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.1.2 // indirect + github.com/deepmap/oapi-codegen v1.8.2 // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect + github.com/nats-io/nats-server/v2 v2.8.0 // indirect + github.com/nats-io/nkeys v0.3.0 // indirect + github.com/nats-io/nuid v1.0.1 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/prometheus/client_model v0.2.0 // indirect + github.com/prometheus/common v0.32.1 // indirect + github.com/prometheus/procfs v0.7.3 // indirect + golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce // indirect + golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 // indirect + google.golang.org/protobuf v1.26.0 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect +) diff --git a/go.mod.1.16 b/go.mod.1.16 new file mode 100644 index 0000000..2a72cb3 --- /dev/null +++ b/go.mod.1.16 @@ -0,0 +1,16 @@ +module github.com/ClusterCockpit/cc-metric-collector + +go 1.16 + +require ( + github.com/NVIDIA/go-nvml v0.11.6-0 + github.com/PaesslerAG/gval v1.1.2 + github.com/gorilla/mux v1.8.0 + github.com/influxdata/influxdb-client-go/v2 v2.7.0 + github.com/influxdata/line-protocol v0.0.0-20210922203350-b1ad95c89adf + github.com/nats-io/nats-server/v2 v2.8.0 // indirect + github.com/nats-io/nats.go v1.14.0 + github.com/prometheus/client_golang v1.12.1 + github.com/stmcginnis/gofish v0.13.0 + golang.org/x/sys v0.0.0-20220412211240-33da011f77ad +) diff --git a/go.mod.1.17+ b/go.mod.1.17+ new file mode 100644 index 0000000..b3dc6ca --- /dev/null +++ b/go.mod.1.17+ @@ -0,0 +1,16 @@ +module github.com/ClusterCockpit/cc-metric-collector + +go 1.17 + +require ( + github.com/NVIDIA/go-nvml v0.11.6-0 + github.com/PaesslerAG/gval v1.1.2 + github.com/gorilla/mux v1.8.0 + github.com/influxdata/influxdb-client-go/v2 v2.8.1 + github.com/influxdata/line-protocol v0.0.0-20210922203350-b1ad95c89adf + github.com/nats-io/nats-server/v2 v2.8.0 // indirect + github.com/nats-io/nats.go v1.14.0 + github.com/prometheus/client_golang v1.12.1 + github.com/stmcginnis/gofish v0.13.0 + golang.org/x/sys v0.0.0-20220412211240-33da011f77ad +)