Skip to content

Commit

Permalink
refactor!: update module to v4
Browse files Browse the repository at this point in the history
BREAKING CHANGE: import paths will need to change to v4, also replace consul with keeper

Signed-off-by: Ginny Guan <[email protected]>
  • Loading branch information
jinlinGuan committed Nov 12, 2024
1 parent 5ad8c94 commit 99be71c
Show file tree
Hide file tree
Showing 15 changed files with 66 additions and 289 deletions.
8 changes: 4 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ updates:
schedule:
interval: "daily"
ignore:
- dependency-name: "github.com/edgexfoundry/go-mod-core-contracts/v3"
- dependency-name: "github.com/edgexfoundry/go-mod-core-contracts/*"
# Included when go-mod-bootstrap is updated
- dependency-name: "github.com/edgexfoundry/go-mod-messaging/v3"
- dependency-name: "github.com/edgexfoundry/go-mod-messaging/*"
# Included when go-mod-bootstrap is updated
- dependency-name: "github.com/edgexfoundry/go-mod-registry/v3"
- dependency-name: "github.com/edgexfoundry/go-mod-registry/*"
# Included when go-mod-bootstrap is updated
- dependency-name: "github.com/edgexfoundry/go-mod-secrets/v3"
- dependency-name: "github.com/edgexfoundry/go-mod-secrets/*"
# Included when go-mod-bootstrap is updated

91 changes: 7 additions & 84 deletions Attribution.txt
Original file line number Diff line number Diff line change
@@ -1,73 +1,35 @@
The following open source projects are referenced by app-rfid-llrp-inventory:

bertimus9/systemstat (MIT) https://bitbucket.org/bertimus9/systemstat
https://bitbucket.org/bertimus9/systemstat/src/master/LICENSE

armon/go-metrics (MIT) https://github.com/armon/go-metrics
https://github.com/armon/go-metrics/blob/master/LICENSE

cenkalti/backoff (MIT) https://github.com/cenkalti/backoff
https://github.com/cenkalti/backoff/blob/master/LICENSE

eclipse/paho.mqtt.golang (Eclipse Public License 2.0) https://github.com/eclipse/paho.mqtt.golang
https://github.com/eclipse/paho.mqtt.golang/blob/master/LICENSE

edgexfoundry/app-functions-sdk-go/v3 (Apache 2.0) https://github.com/edgexfoundry/app-functions-sdk-go/v3
edgexfoundry/app-functions-sdk-go/v4 (Apache 2.0) https://github.com/edgexfoundry/app-functions-sdk-go/v4
https://github.com/edgexfoundry/app-functions-sdk-go/blob/master/LICENSE

edgexfoundry/go-mod-core-contracts/v3 (Apache 2.0) https://github.com/edgexfoundry/go-mod-core-contracts/v3
edgexfoundry/go-mod-core-contracts/v4 (Apache 2.0) https://github.com/edgexfoundry/go-mod-core-contracts/v4
https://github.com/edgexfoundry/go-mod-core-contracts/blob/master/LICENSE

edgexfoundry/go-mod-registry/v3 (Apache 2.0) https://github.com/edgexfoundry/go-mod-registry/v3
edgexfoundry/go-mod-registry/v4 (Apache 2.0) https://github.com/edgexfoundry/go-mod-registry/v4
https://github.com/edgexfoundry/go-mod-registry/blob/master/LICENSE

edgexfoundry/go-mod-messaging/v3 (Apache 2.0) https://github.com/edgexfoundry/go-mod-messaging/v3
edgexfoundry/go-mod-messaging/v4 (Apache 2.0) https://github.com/edgexfoundry/go-mod-messaging/v4
https://github.com/edgexfoundry/go-mod-messaging/blob/master/LICENSE

edgexfoundry/go-mod-secrets/v3 (Apache 2.0) https://github.com/edgexfoundry/go-mod-secrets/v3
edgexfoundry/go-mod-secrets/v4 (Apache 2.0) https://github.com/edgexfoundry/go-mod-secrets/v4
https://github.com/edgexfoundry/go-mod-secrets/blob/master/LICENSE

edgexfoundry/go-mod-bootstrap/v3 (Apache 2.0) https://github.com/edgexfoundry/go-mod-bootstrap/v3
edgexfoundry/go-mod-bootstrap/v4 (Apache 2.0) https://github.com/edgexfoundry/go-mod-bootstrap/v4
https://github.com/edgexfoundry/go-mod-bootstrap/blob/master/LICENSE

edgexfoundry/go-mod-configuration/v3 (Apache 2.0) https://github.com/edgexfoundry/go-mod-configuration/v3
edgexfoundry/go-mod-configuration/v4 (Apache 2.0) https://github.com/edgexfoundry/go-mod-configuration/v4
https://github.com/edgexfoundry/go-mod-configuration/blob/master/LICENSE

go-kit/kit (MIT) github.com/go-kit/kit
https://github.com/go-kit/kit/blob/master/LICENSE

go-logfmt/logfmt (MIT) https://github.com/go-logfmt/logfmt
https://github.com/go-logfmt/logfmt/blob/master/LICENSE

google/uuid (BSD-3) https://github.com/google/uuid
https://github.com/google/uuid/blob/master/LICENSE

gorilla/mux (BSD-3) https://github.com/gorilla/mux
https://github.com/gorilla/mux/blob/master/LICENSE

hashicorp/consul/api (Mozilla Public License 2.0) - https://github.com/hashicorp/consul/api
https://github.com/hashicorp/consul/blob/master/LICENSE

hashicorp/go-cleanhttp (Mozilla Public License 2.0) - https://github.com/hashicorp/go-cleanhttp
https://github.com/hashicorp/go-cleanhttp/blob/master/LICENSE

hashicorp/go-immutable-radix (Mozilla Public License 2.0) https://github.com/hashicorp/go-immutable-radix
https://github.com/hashicorp/go-immutable-radix/blob/master/LICENSE

hashicorp/go-rootcerts (Mozilla Public License 2.0) https://github.com/hashicorp/go-rootcerts
https://github.com/hashicorp/go-rootcerts/blob/master/LICENSE

hashicorp/golang-lru (Mozilla Public License 2.0) https://github.com/hashicorp/golang-lru
https://github.com/hashicorp/golang-lru/blob/master/LICENSE

hashicorp/serf (Mozilla Public License 2.0) https://github.com/hashicorp/serf
https://github.com/hashicorp/serf/blob/master/LICENSE

kr/logfmt (Unspecified) https://github.com/kr/logfmt
https://github.com/kr/logfmt/blob/master/Readme

mitchellh/consulstructure (MIT) https://github.com/mitchellh/consulstructure
https://github.com/mitchellh/consulstructure/blob/master/LICENSE

mitchellh/mapstructure (MIT) https://github.com/mitchellh/mapstructure
https://github.com/mitchellh/mapstructure/blob/master/LICENSE
Expand All @@ -78,9 +40,6 @@ https://github.com/mitchellh/copystructure/blob/master/LICENSE
mitchellh/reflectwalk (MIT) https://github.com/mitchellh/reflectwalk
https://github.com/mitchellh/reflectwalk/blob/master/LICENSE

mitchellh/go-homedir (MIT) https://github.com/mitchellh/go-homedir
https://github.com/mitchellh/go-homedir/blob/master/LICENSE

fxamacker/cbor/v2 (MIT) https://github.com/fxamacker/cbor/v2
https://github.com/fxamacker/cbor/blob/master/LICENSE

Expand All @@ -93,18 +52,6 @@ https://github.com/golang/net/blob/master/LICENSE
gomodule/redigo (Apache 2.0) https://github.com/gomodule/redigo
https://github.com/gomodule/redigo/blob/master/LICENSE

github.com/go-stack/stack (MIT) https://github.com/go-stack/stack
https://github.com/go-stack/stack/blob/master/LICENSE.md

github.com/golang/snappy (BSD-3) https://github.com/golang/snappy
https://github.com/golang/snappy/blob/master/LICENSE

github.com/xdg/scram (Apache 2.0) https://github.com/xdg-go/scram
https://github.com/xdg-go/scram/blob/master/LICENSE

github.com/xdg/stringprep (Apache 2.0) https://github.com/xdg-go/stringprep
https://github.com/xdg-go/stringprep/blob/master/LICENSE

go.mongodb.org/mongo-driver (Apache 2.0) https://github.com/mongodb/mongo-go-driver
https://github.com/mongodb/mongo-go-driver/blob/master/LICENSE

Expand All @@ -120,9 +67,6 @@ https://github.com/golang/text/blob/master/LICENSE
github.com/diegoholiveira/jsonlogic/v3 (MIT) https://github.com/diegoholiveira/
https://github.com/diegoholiveira/jsonlogic/blob/master/LICENSE

github.com/go-redis/redis/v7 (BSD-2) https://github.com/go-redis/redis
https://github.com/go-redis/redis/blob/master/LICENSE

go-playground/locales (MIT) https://github.com/go-playground/locales
https://github.com/go-playground/locales/blob/master/LICENSE

Expand All @@ -147,12 +91,6 @@ https://github.com/stretchr/testify/blob/master/LICENSE
gopkg.in/yaml.v3 (Apache 2.0) https://github.com/go-yaml/yaml/tree/v3
https://github.com/go-yaml/yaml/blob/v2/LICENSE

github.com/fatih/color (MIT) https://github.com/fatih/color
https://github.com/fatih/color/blob/master/LICENSE.md

github.com/hashicorp/go-hclog (MIT) https://github.com/hashicorp/go-hclog
https://github.com/hashicorp/go-hclog/blob/master/LICENSE

github.com/mattn/go-colorable (MIT) https://github.com/mattn/go-colorable
https://github.com/mattn/go-colorable/blob/master/LICENSE

Expand Down Expand Up @@ -183,18 +121,12 @@ https://github.com/spiffe/go-spiffe/blob/main/LICENSE
github.com/zeebo/errs (MIT) https://github.com/zeebo/errs
https://github.com/zeebo/errs/blob/master/LICENSE

google.golang.org/genproto (Apache-2.0) https://github.com/googleapis/go-genproto
https://github.com/googleapis/go-genproto/blob/main/LICENSE

google.golang.org/grpc (Apache-2.0) https://github.com/grpc/grpc-go
https://github.com/grpc/grpc-go/blob/master/LICENSE

google.golang.org/protobuf (Unspecified) https://github.com/protocolbuffers/protobuf-go
https://github.com/protocolbuffers/protobuf-go/blob/master/LICENSE

gopkg.in/square/go-jose.v2 (Apache-2.0) https://github.com/square/go-jose/tree/v2.6.0
https://github.com/square/go-jose/blob/v2.6.0/LICENSE

rcrowley/go-metrics (Unspecified) https://github.com/rcrowley/go-metrics
https://github.com/rcrowley/go-metrics/blob/master/LICENSE

Expand All @@ -213,18 +145,9 @@ https://github.com/nats-io/nkeys/blob/master/LICENSE
github.com/nats-io/nuid (Apache-2.0) https://github.com/nats-io/nuid
https://github.com/nats-io/nuid/blob/master/LICENSE

golang.org/x/mod (BSD-3) https://github.com/golang/mod
https://github.com/golang/mod/blob/master/LICENSE

golang.org/x/tools (BSD-3) https://github.com/golang/tools
https://github.com/golang/tools/blob/master/LICENSE

golang.org/x/exp (BSD-3) https://github.com/golang/tools
https://github.com/golang/tools/blob/master/LICENSE

github.com/go-jose/go-jose/v3 (Apache-2.0) https://github.com/go-jose/go-jose
https://github.com/go-jose/go-jose/blob/v3/LICENSE

github.com/klauspost/compress (Apache-2.0) https://github.com/klauspost/compress
https://github.com/klauspost/compress/blob/master/LICENSE

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ VOLUME /cache
EXPOSE 59711

ENTRYPOINT ["/app-rfid-llrp-inventory"]
CMD ["-cp=consul.http://edgex-core-consul:8500", "-registry"]
CMD ["-cp=keeper.http://edgex-core-keeper:59890", "-registry"]
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ GIT_SHA=$(shell git rev-parse HEAD)

# This pulls the version of the SDK from the go.mod file. It works by looking for the line
# with the SDK and printing just the version number that comes after it.
SDKVERSION=$(shell sed -En 's|.*github.com/edgexfoundry/app-functions-sdk-go/v3 (v[\.0-9a-zA-Z-]+).*|\1|p' go.mod)
SDKVERSION=$(shell sed -En 's|.*github.com/edgexfoundry/app-functions-sdk-go/v4 (v[\.0-9a-zA-Z-]+).*|\1|p' go.mod)

ifeq ($(ENABLE_FULL_RELRO), true)
ENABLE_FULL_RELRO_GOFLAGS = -bindnow
endif

GOFLAGS=-ldflags "-s -w -X github.com/edgexfoundry/app-functions-sdk-go/v3/internal.SDKVersion=$(SDKVERSION) \
-X github.com/edgexfoundry/app-functions-sdk-go/v3/internal.ApplicationVersion=$(APPVERSION) \
GOFLAGS=-ldflags "-s -w -X github.com/edgexfoundry/app-functions-sdk-go/v4/internal.SDKVersion=$(SDKVERSION) \
-X github.com/edgexfoundry/app-functions-sdk-go/v4/internal.ApplicationVersion=$(APPVERSION) \
-X edgexfoundry/app-rfid-llrp-inventory.Version=$(APPVERSION) $(ENABLE_FULL_RELRO_GOFLAGS)" -trimpath -mod=readonly
GOTESTFLAGS?=-race

Expand Down Expand Up @@ -82,7 +82,7 @@ docker-nats:
make -C . -e ADD_BUILD_TAGS=include_nats_messaging docker

run: build
./$(MICROSERVICE) -cp=consul.http://localhost:8500 -confdir=res
./$(MICROSERVICE) -cp=keeper.http://localhost:59890 -confdir=res

vendor:
go mod vendor
27 changes: 7 additions & 20 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,26 @@ module edgexfoundry/app-rfid-llrp-inventory
go 1.23

require (
github.com/edgexfoundry/app-functions-sdk-go/v3 v3.2.0-dev.57
github.com/edgexfoundry/go-mod-core-contracts/v3 v3.2.0-dev.53
github.com/edgexfoundry/app-functions-sdk-go/v4 v4.0.0-dev.9
github.com/edgexfoundry/go-mod-core-contracts/v4 v4.0.0-dev.4
github.com/google/uuid v1.6.0
github.com/labstack/echo/v4 v4.12.0
github.com/stretchr/testify v1.9.0
)

require (
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/armon/go-metrics v0.4.1 // indirect
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
github.com/barkimedes/go-deepcopy v0.0.0-20220514131651-17c30cfc62df // indirect
github.com/cenkalti/backoff v2.2.1+incompatible // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/diegoholiveira/jsonlogic/v3 v3.5.3 // indirect
github.com/eclipse/paho.mqtt.golang v1.5.0 // indirect
github.com/edgexfoundry/go-mod-bootstrap/v3 v3.2.0-dev.66 // indirect
github.com/edgexfoundry/go-mod-configuration/v3 v3.2.0-dev.19 // indirect
github.com/edgexfoundry/go-mod-messaging/v3 v3.2.0-dev.40 // indirect
github.com/edgexfoundry/go-mod-registry/v3 v3.2.0-dev.18 // indirect
github.com/edgexfoundry/go-mod-secrets/v3 v3.2.0-dev.18 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/edgexfoundry/go-mod-bootstrap/v4 v4.0.0-dev.5 // indirect
github.com/edgexfoundry/go-mod-configuration/v4 v4.0.0-dev.4 // indirect
github.com/edgexfoundry/go-mod-messaging/v4 v4.0.0-dev.5 // indirect
github.com/edgexfoundry/go-mod-registry/v4 v4.0.0-dev.2 // indirect
github.com/edgexfoundry/go-mod-secrets/v4 v4.0.0-dev.3 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa // indirect
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
Expand All @@ -49,7 +46,6 @@ require (
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.22.1 // indirect
github.com/go-redis/redis/v7 v7.3.0 // indirect
github.com/go-resty/resty/v2 v2.15.3 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
Expand All @@ -59,15 +55,8 @@ require (
github.com/gorilla/schema v1.4.1 // indirect
github.com/gorilla/securecookie v1.1.2 // indirect
github.com/gorilla/websocket v1.5.3 // indirect
github.com/hashicorp/consul/api v1.29.4 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-hclog v1.5.0 // indirect
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-rootcerts v1.0.2 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/hashicorp/serf v0.10.1 // indirect
github.com/jackc/pgerrcode v0.0.0-20240316143900-6e2875d9b438 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
Expand All @@ -85,9 +74,7 @@ require (
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
github.com/michaelquigley/pfxlog v0.6.10 // indirect
github.com/miekg/pkcs11 v1.1.1 // indirect
github.com/mitchellh/consulstructure v0.0.0-20190329231841-56fdc4d2da54 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-ps v1.0.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
Expand Down
Loading

0 comments on commit 99be71c

Please sign in to comment.