Skip to content

Commit

Permalink
Merge pull request #323 from weichou1229/v4-module
Browse files Browse the repository at this point in the history
refactor!: update module to v4
  • Loading branch information
cloudxxx8 authored Oct 30, 2024
2 parents e953b5d + f13a230 commit d5009d9
Show file tree
Hide file tree
Showing 13 changed files with 59 additions and 59 deletions.
8 changes: 4 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ updates:
schedule:
interval: "daily"
ignore:
- dependency-name: "github.com/edgexfoundry/go-mod-core-contracts/v3"
- dependency-name: "github.com/edgexfoundry/go-mod-core-contracts/v4"
# Included when device-sdk-go is updated
- dependency-name: "github.com/edgexfoundry/go-mod-messaging/v3"
- dependency-name: "github.com/edgexfoundry/go-mod-messaging/v4"
# Included when device-sdk-go is updated
- dependency-name: "github.com/edgexfoundry/go-mod-registry/v3"
- dependency-name: "github.com/edgexfoundry/go-mod-registry/v4"
# Included when device-sdk-go is updated
- dependency-name: "github.com/edgexfoundry/go-mod-secrets/v3"
- dependency-name: "github.com/edgexfoundry/go-mod-secrets/v4"
# Included when device-sdk-go is updated
- dependency-name: "github.com/edgexfoundry/go-mod-bootstrap/v3"
# Included when device-sdk-go is updated
Expand Down
22 changes: 11 additions & 11 deletions Attribution.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ https://github.com/cenkalti/backoff/blob/master/LICENSE
edsrzf/mmap-go (BSD-3) https://github.com/edsrzf/mmap-go
https://github.com/edsrzf/mmap-go/blob/master/LICENSE

edgexfoundry/go-mod-core-contracts/v3 (Apache 2.0) https://github.com/edgexfoundry/go-mod-core-contracts/v3
https://github.com/edgexfoundry/go-mod-core-contracts/v3/blob/master/LICENSE
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/v4/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/device-sdk-go/v3 (Apache 2.0) https://github.com/edgexfoundry/device-sdk-go/v3
https://github.com/edgexfoundry/device-sdk-go/v3/blob/master/LICENSE
edgexfoundry/device-sdk-go/v4 (Apache 2.0) https://github.com/edgexfoundry/device-sdk-go/v4
https://github.com/edgexfoundry/device-sdk-go/v4/blob/master/LICENSE

go-kit/kit (MIT) github.com/go-kit/kit
https://github.com/go-kit/kit/blob/master/LICENSE
Expand Down Expand Up @@ -111,14 +111,14 @@ https://github.com/OneOfOne/xxhash/blob/master/LICENCE
hashicorp/consul/api (Mozilla Public License 2.0) https://github.com/hashicorp/consul/api
https://github.com/hashicorp/consul/blob/master/LICENSE

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

edgexfoundry/go-mod-secret/v3 (Apache 2.0) https://github.com/edgexfoundry/go-mod-secrets/v3
edgexfoundry/go-mod-secret/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-configuration/v3 (Apache 2.0) https://github.com/edgexfoundry/go-mod-configuration/v3
https://github.com/edgexfoundry/go-mod-configuration/v3/blob/master/LICENSE
edgexfoundry/go-mod-configuration/v4 (Apache 2.0) https://github.com/edgexfoundry/go-mod-configuration/v4
https://github.com/edgexfoundry/go-mod-configuration/v4/blob/master/LICENSE

fxamacker/cbor (MIT) https://github.com/fxamacker/cbor/v2
https://github.com/fxamacker/cbor/blob/master/LICENSE
Expand Down Expand Up @@ -153,7 +153,7 @@ https://github.com/davecgh/go-spew/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/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

github.com/fatih/color (MIT) https://github.com/fatih/color
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ COPY --from=builder /app/cmd/ /
EXPOSE 59989

ENTRYPOINT ["/device-rfid-llrp"]
CMD ["-cp=consul.http://edgex-core-consul:8500", "--registry"]
CMD ["-cp=keeper.http://edgex-core-keeper:59890", "--registry"]
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ MICROSERVICES=cmd/device-rfid-llrp

# 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/device-sdk-go/v3 (v[\.0-9a-zA-Z-]+).*|\1|p' go.mod)
SDKVERSION=$(shell sed -En 's|.*github.com/edgexfoundry/device-sdk-go/v4 (v[\.0-9a-zA-Z-]+).*|\1|p' go.mod)

# this pulls the version from local VERSION file that is created by the Jenkins Pipeline.
VERSION=$(shell cat ./VERSION 2>/dev/null || echo 0.0.0)

GIT_SHA=$(shell git rev-parse HEAD)
GOFLAGS=-ldflags "-X github.com/edgexfoundry/device-rfid-llrp-go.Version=$(VERSION) \
-X github.com/edgexfoundry/device-sdk-go/v3/internal/common.SDKVersion=$(SDKVERSION)" \
-X github.com/edgexfoundry/device-sdk-go/v4/internal/common.SDKVersion=$(SDKVERSION)" \
-trimpath -mod=readonly

ifeq ($(ENABLE_FULL_RELRO), "true")
Expand Down
2 changes: 1 addition & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package main
import (
device_llrp "github.com/edgexfoundry/device-rfid-llrp-go"
"github.com/edgexfoundry/device-rfid-llrp-go/internal/driver"
"github.com/edgexfoundry/device-sdk-go/v3/pkg/startup"
"github.com/edgexfoundry/device-sdk-go/v4/pkg/startup"
)

func main() {
Expand Down
14 changes: 7 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module github.com/edgexfoundry/device-rfid-llrp-go
go 1.23

require (
github.com/edgexfoundry/device-sdk-go/v3 v3.2.0-dev.47
github.com/edgexfoundry/go-mod-core-contracts/v3 v3.2.0-dev.53
github.com/edgexfoundry/device-sdk-go/v4 v4.0.0-dev.1
github.com/edgexfoundry/go-mod-core-contracts/v4 v4.0.0-dev.2
github.com/stretchr/testify v1.9.0
)

Expand All @@ -17,11 +17,11 @@ require (
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // 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/edgexfoundry/go-mod-bootstrap/v4 v4.0.0-dev.1 // indirect
github.com/edgexfoundry/go-mod-configuration/v4 v4.0.0-dev.1 // indirect
github.com/edgexfoundry/go-mod-messaging/v4 v4.0.0-dev.2 // indirect
github.com/edgexfoundry/go-mod-registry/v4 v4.0.0-dev.1 // indirect
github.com/edgexfoundry/go-mod-secrets/v4 v4.0.0-dev.1 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa // indirect
Expand Down
28 changes: 14 additions & 14 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -86,20 +86,20 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/eclipse/paho.mqtt.golang v1.5.0 h1:EH+bUVJNgttidWFkLLVKaQPGmkTUfQQqjOsyvMGvD6o=
github.com/eclipse/paho.mqtt.golang v1.5.0/go.mod h1:du/2qNQVqJf/Sqs4MEL77kR8QTqANF7XU7Fk0aOTAgk=
github.com/edgexfoundry/device-sdk-go/v3 v3.2.0-dev.47 h1:9SF70/V3ds4ozN3xaL2QSMZsSbV2glO0wDelwybv5Ro=
github.com/edgexfoundry/device-sdk-go/v3 v3.2.0-dev.47/go.mod h1:Z+bXQh9icjVrEwht1f8wj0W7mkk89qUvHDzrfvFINvs=
github.com/edgexfoundry/go-mod-bootstrap/v3 v3.2.0-dev.66 h1:kmBEAhNi4ftrJMXM3IvEbwrRCOWUDuUOKTVAOgHnoPw=
github.com/edgexfoundry/go-mod-bootstrap/v3 v3.2.0-dev.66/go.mod h1:3IXVpc5Qez5nwFJ8IkMyJMba8Iavj620E0XB42BQzfQ=
github.com/edgexfoundry/go-mod-configuration/v3 v3.2.0-dev.19 h1:274NZdVBkJBuQP6yT3tVrb7psTFuIPogX/DLQqv7OCQ=
github.com/edgexfoundry/go-mod-configuration/v3 v3.2.0-dev.19/go.mod h1:BG6hCDxXizpgMdNEljwNfLWSsd4Op7GAHd3Pis1dVv8=
github.com/edgexfoundry/go-mod-core-contracts/v3 v3.2.0-dev.53 h1:aHnYwqpg0LcnMrgNQlkRQjzHAS/IML/9GI368OmNCz4=
github.com/edgexfoundry/go-mod-core-contracts/v3 v3.2.0-dev.53/go.mod h1:MLk37/79M26+bZr3IptNZuYmQBEVbXwzDp1VHQkFhIk=
github.com/edgexfoundry/go-mod-messaging/v3 v3.2.0-dev.40 h1:YyB21HEapV5pENG01vFlpjPI6UkmKpJuaWFfgGFVUsY=
github.com/edgexfoundry/go-mod-messaging/v3 v3.2.0-dev.40/go.mod h1:8NpZ6/eAsiyZHgn/s3DRIpcOjUrve+ZONIgvcDvA3Yg=
github.com/edgexfoundry/go-mod-registry/v3 v3.2.0-dev.18 h1:AzILZ/xcEmSYVhIwSF4zkWpXyFoBA733E/j8ttzlNnI=
github.com/edgexfoundry/go-mod-registry/v3 v3.2.0-dev.18/go.mod h1:TBgZZMF8FAJwxUl3AJgHQaT0S5pwKJKKDP3d638ttrc=
github.com/edgexfoundry/go-mod-secrets/v3 v3.2.0-dev.18 h1:UHyNs7pAdFqURAVL/BWd5riiZczVRdyb7r76dUGxqUU=
github.com/edgexfoundry/go-mod-secrets/v3 v3.2.0-dev.18/go.mod h1:2q9qMnQD4MCAZHgXyB8ltpwuct554HOiPrbRydyXyWQ=
github.com/edgexfoundry/device-sdk-go/v4 v4.0.0-dev.1 h1:p9njuoGUwnl4X+F1xlO+jDhrkVaYPKH7UsTVKr9+1xI=
github.com/edgexfoundry/device-sdk-go/v4 v4.0.0-dev.1/go.mod h1:6ChpQagcoYqlaE8b1IiFdI2YZIsMhRIDbHC6yZtVmeM=
github.com/edgexfoundry/go-mod-bootstrap/v4 v4.0.0-dev.1 h1:9uiZON4CDOVAZNNawtncvfX4Abgz31r8QcOVEWvlUD4=
github.com/edgexfoundry/go-mod-bootstrap/v4 v4.0.0-dev.1/go.mod h1:OJdeMt2HyzMZZyKy89ICwGu4Ui7ddWd+dQXGMJTAmYk=
github.com/edgexfoundry/go-mod-configuration/v4 v4.0.0-dev.1 h1:eWcDmVFwkFSmlrD745lZQ6xs+ZKJ9u6TqNUnXuWJ5AY=
github.com/edgexfoundry/go-mod-configuration/v4 v4.0.0-dev.1/go.mod h1:AHvE7RQJabfMVHXCDDDKhg3hzJNQtUqbyB9yJxv2Qbk=
github.com/edgexfoundry/go-mod-core-contracts/v4 v4.0.0-dev.2 h1:BEJKSvyW+dMTW/yzEKWjs0tGUZnMkFPYX4eypyoG0IY=
github.com/edgexfoundry/go-mod-core-contracts/v4 v4.0.0-dev.2/go.mod h1:I3EG+Tg/gcVSUJ+IJDuvVKFISnRu8oQtMXqltE1rzT8=
github.com/edgexfoundry/go-mod-messaging/v4 v4.0.0-dev.2 h1:2zRS7LTEoucQmAkZ33b/Erw13ne1LoxexPhhHGa065Q=
github.com/edgexfoundry/go-mod-messaging/v4 v4.0.0-dev.2/go.mod h1:eAmCHilZWXL0skB9Frnm2kZTeY81sF6xKOmePoWKTNE=
github.com/edgexfoundry/go-mod-registry/v4 v4.0.0-dev.1 h1:/CrP00ozrLjMR0R9OTSJlQi5zJ7/9IKnfG0zS2ZN+8U=
github.com/edgexfoundry/go-mod-registry/v4 v4.0.0-dev.1/go.mod h1:YgkZ1ThNEEXPzC2iu3/53QcrDQ3tlQHlflnjb3Jseo8=
github.com/edgexfoundry/go-mod-secrets/v4 v4.0.0-dev.1 h1:lw9GNOujQhqnPMJko6n9BGU9Pu3P9RPUQYCT5GpoSw0=
github.com/edgexfoundry/go-mod-secrets/v4 v4.0.0-dev.1/go.mod h1:p6RbhVfJ/SNBLYlz8P/v6kOJmj5Zz1In5/T3TSXylO4=
github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc=
github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
Expand Down
10 changes: 5 additions & 5 deletions internal/driver/device.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ import (
"sync"
"time"

"github.com/edgexfoundry/device-sdk-go/v3/pkg/interfaces"
dsModels "github.com/edgexfoundry/device-sdk-go/v3/pkg/models"
"github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger"
"github.com/edgexfoundry/go-mod-core-contracts/v3/common"
contract "github.com/edgexfoundry/go-mod-core-contracts/v3/models"
"github.com/edgexfoundry/device-sdk-go/v4/pkg/interfaces"
dsModels "github.com/edgexfoundry/device-sdk-go/v4/pkg/models"
"github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger"
"github.com/edgexfoundry/go-mod-core-contracts/v4/common"
contract "github.com/edgexfoundry/go-mod-core-contracts/v4/models"

"github.com/edgexfoundry/device-rfid-llrp-go/internal/retry"
"github.com/edgexfoundry/device-rfid-llrp-go/pkg/llrp"
Expand Down
4 changes: 2 additions & 2 deletions internal/driver/discover.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"time"

"github.com/edgexfoundry/device-rfid-llrp-go/pkg/llrp"
dsModels "github.com/edgexfoundry/device-sdk-go/v3/pkg/models"
contract "github.com/edgexfoundry/go-mod-core-contracts/v3/models"
dsModels "github.com/edgexfoundry/device-sdk-go/v4/pkg/models"
contract "github.com/edgexfoundry/go-mod-core-contracts/v4/models"
)

const (
Expand Down
6 changes: 3 additions & 3 deletions internal/driver/discover_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import (
"time"

"github.com/edgexfoundry/device-rfid-llrp-go/pkg/llrp"
"github.com/edgexfoundry/device-sdk-go/v3/pkg/interfaces/mocks"
"github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger"
"github.com/edgexfoundry/go-mod-core-contracts/v3/models"
"github.com/edgexfoundry/device-sdk-go/v4/pkg/interfaces/mocks"
"github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger"
"github.com/edgexfoundry/go-mod-core-contracts/v4/models"
"github.com/stretchr/testify/mock"
)

Expand Down
10 changes: 5 additions & 5 deletions internal/driver/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ import (
"sync"
"time"

"github.com/edgexfoundry/device-sdk-go/v3/pkg/interfaces"
dsModels "github.com/edgexfoundry/device-sdk-go/v3/pkg/models"
"github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger"
"github.com/edgexfoundry/go-mod-core-contracts/v3/common"
contract "github.com/edgexfoundry/go-mod-core-contracts/v3/models"
"github.com/edgexfoundry/device-sdk-go/v4/pkg/interfaces"
dsModels "github.com/edgexfoundry/device-sdk-go/v4/pkg/models"
"github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger"
"github.com/edgexfoundry/go-mod-core-contracts/v4/common"
contract "github.com/edgexfoundry/go-mod-core-contracts/v4/models"

"github.com/edgexfoundry/device-rfid-llrp-go/pkg/llrp"
)
Expand Down
6 changes: 3 additions & 3 deletions internal/driver/driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"time"

"github.com/edgexfoundry/device-rfid-llrp-go/pkg/llrp"
dsModels "github.com/edgexfoundry/device-sdk-go/v3/pkg/models"
"github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger"
"github.com/edgexfoundry/go-mod-core-contracts/v3/common"
dsModels "github.com/edgexfoundry/device-sdk-go/v4/pkg/models"
"github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger"
"github.com/edgexfoundry/go-mod-core-contracts/v4/common"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/driver/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package driver

import (
"github.com/edgexfoundry/device-rfid-llrp-go/pkg/llrp"
"github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger"
"github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger"
)

// edgexLLRPClientLogger implements the llrp.ClientLogger interface
Expand Down

0 comments on commit d5009d9

Please sign in to comment.