Skip to content

Commit

Permalink
Merge pull request #14 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 e57816f + bec349e commit 8abf735
Show file tree
Hide file tree
Showing 8 changed files with 1,059 additions and 151 deletions.
219 changes: 195 additions & 24 deletions Attribution.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,25 @@ https://github.com/cenkalti/backoff/blob/v3/LICENSE
davecgh/go-spew (ISC) https://github.com/davecgh/go-spew
https://github.com/davecgh/go-spew/blob/master/LICENSE

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

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

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

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

go-logfmt/logfmt (MIT) https://github.com/go-logfmt/logfmt
Expand Down Expand Up @@ -90,15 +93,6 @@ https://github.com/kr/logfmt/blob/master/Readme
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 (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-secrets (Apache 2.0) https://github.com/edgexfoundry/go-mod-secrets/v2
https://github.com/edgexfoundry/go-mod-secrets/v2/blob/master/LICENSE

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

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

Expand Down Expand Up @@ -141,9 +135,6 @@ https://github.com/golang/sys/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 (Apache 2.0) https://github.com/edgexfoundry/go-mod-messaging/v3
https://github.com/edgexfoundry/go-mod-messaging/blob/master/LICENSE

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

Expand Down Expand Up @@ -216,12 +207,6 @@ 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

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

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

github.com/robinson/gos7 (Apache 2.0) https://github.com/robinson/gos7
https://github.com/robinson/gos7/blob/master/LICENSE

Expand Down Expand Up @@ -272,3 +257,189 @@ https://github.com/go-jose/go-jose/blob/main/LICENSE

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

github.com/asaskevich/govalidator (MIT) https://github.com/asaskevich/govalidator
https://github.com/asaskevich/govalidator/blob/master/LICENSE

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

github.com/fsnotify/fsnotify (BSD-3) https://github.com/fsnotify/fsnotify
https://github.com/fsnotify/fsnotify/blob/main/LICENSE

github.com/fullsailor/pkcs7 (MIT) https://github.com/fullsailor/pkcs7
https://github.com/fullsailor/pkcs7/blob/master/LICENSE

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

github.com/go-logr/stdr (Apache-2.0) https://github.com/go-log/stdr
https://github.com/go-logr/stdr/blob/master/LICENSE

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

github.com/go-openapi/analysis (Apache-2.0) https://github.com/go-openapi/analysis
https://github.com/go-openapi/analysis/blob/master/LICENSE

github.com/go-openapi/errors (Apache-2.0) https://github.com/go-openapi/errors
https://github.com/go-openapi/errors/blob/master/LICENSE

github.com/go-openapi/jsonpointer (Apache-2.0) https://github.com/go-openapi/jsonpointer
https://github.com/go-openapi/jsonpointer/blob/master/LICENSE

github.com/go-openapi/jsonreference (Apache-2.0) https://github.com/go-openapi/jsonreference
https://github.com/go-openapi/jsonreference/blob/master/LICENSE

github.com/go-openapi/loads (Apache-2.0) https://github.com/go-openapi/loads
https://github.com/go-openapi/loads/blob/master/LICENSE

github.com/go-openapi/runtime (Apache-2.0) https://github.com/go-openapi/runtime
https://github.com/go-openapi/runtime/blob/master/LICENSE

github.com/go-openapi/spec (Apache-2.0) https://github.com/go-openapi/spec
https://github.com/go-openapi/spec/blob/master/LICENSE

github.com/go-openapi/strfmt (Apache-2.0) https://github.com/go-openapi/strfmt
https://github.com/go-openapi/strfmt/blob/master/LICENSE

github.com/go-openapi/swag (Apache-2.0) https://github.com/go-openapi/swag
https://github.com/go-openapi/swag/blob/master/LICENSE

github.com/go-openapi/validate (Apache-2.0) https://github.com/go-openapi/validate
https://github.com/go-openapi/validate/blob/master/LICENSE

github.com/go-resty/resty/v2 (MIT) https://github.com/go-resty/resty
https://github.com/go-resty/resty/blob/v2/LICENSE

github.com/golang-jwt/jwt/v5 (MIT) github.com/golang-jwt/jwt
https://github.com/golang-jwt/jwt/blob/main/LICENSE

github.com/gorilla/schema (BSD-3) https://github.com/gorilla/schema
https://github.com/gorilla/schema/blob/main/LICENSE

github.com/gorilla/securecookie (BSD-3) https://github.com/gorilla/securecookie
https://github.com/gorilla/securecookie/blob/main/LICENSE

github.com/josharian/intern (MIT) https://github.com/josharian/intern
https://github.com/josharian/intern/blob/master/LICENSE.md

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

github.com/lufia/plan9stats (BSD-3) https://github.com/lufia/plan9stats
https://github.com/lufia/plan9stats/blob/main/LICENSE

github.com/mailru/easyjson (MIT) https://github.com/mailru/easyjson
https://github.com/mailru/easyjson/blob/master/LICENSE

github.com/mgutz/ansi (MIT) https://github.com/mgutz/ansi
https://github.com/mgutz/ansi/blob/master/LICENSE

github.com/michaelquigley/pfxlog (MIT) https://github.com/michaelquigley/pfxlog
https://github.com/michaelquigley/pfxlog/blob/main/LICENSE

github.com/miekg/pkcs11 (BSD-3) https://github.com/miekg/pkcs11
https://github.com/miekg/pkcs11/blob/master/LICENSE

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

github.com/muhlemmer/gu (Unspecified) https://github.com/muhlemmer/gu
https://github.com/muhlemmer/gu/blob/main/LICENSE

github.com/oklog/ulid (Apache-2.0) https://github.com/oklog/ulid
https://github.com/oklog/ulid/blob/main/LICENSE

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

github.com/openziti/channel/v3 (Apache 2.0) - github.com/openziti/channel/v3
https://github.com/openziti/channel/blob/main/LICENSE

github.com/openziti/edge-api (Apache-2.0) https://github.com/openziti/edge-api
https://github.com/openziti/edge-api/blob/main/LICENSE

github.com/openziti/foundation/v2 (Apache-2.0) https://github.com/openziti/foundation
https://github.com/openziti/foundation/blob/main/LICENSE

github.com/openziti/identity (Apache-2.0) https://github.com/openziti/identity
https://github.com/openziti/identity/blob/main/LICENSE

github.com/openziti/metrics (Apache-2.0) https://github.com/openziti/metrics
https://github.com/openziti/metrics/blob/main/LICENSE

github.com/openziti/sdk-golang (Apache-2.0) https://github.com/openziti/sdk-golang
https://github.com/openziti/sdk-golang/blob/main/LICENSE

github.com/openziti/secretstream (MIT) https://github.com/openziti/secretstream
https://github.com/openziti/secretstream/blob/main/LICENSE

github.com/openziti/transport/v2 (Apache-2.0) https://github.com/openziti/transport
https://github.com/openziti/transport/blob/main/LICENSE

github.com/orcaman/concurrent-map/v2 (MIT) https://github.com/orcaman/concurrent-map/
https://github.com/orcaman/concurrent-map/blob/master/LICENSE

github.com/panjf2000/ants/v2 (MIT) https://github.com/panjf2000/ants
https://github.com/panjf2000/ants/blob/dev/LICENSE

github.com/parallaxsecond/parsec-client-go (Apache-2.0) https://github.com/parallaxsecond/parsec-client-go
https://github.com/parallaxsecond/parsec-client-go/blob/main/LICENSE

github.com/pkg/errors (BSD-2) https://github.com/pkg/errors
https://github.com/pkg/errors/blob/master/LICENSE

github.com/power-devops/perfstat (MIT) https://github.com/power-devops/perfstat
https://github.com/power-devops/perfstat/blob/main/LICENSE

github.com/shirou/gopsutil/v3 (BSD) https://github.com/shirou/gopsutil
https://github.com/shirou/gopsutil/blob/master/LICENSE

github.com/shoenig/go-m1cpu (Mozilla Public License 2.0) https://github.com/shoenig/go-m1cpu
https://github.com/shoenig/go-m1cpu/blob/main/LICENSE

github.com/sirupsen/logrus (MIT) https://github.com/sirupsen/logrus
https://github.com/sirupsen/logrus/blob/master/LICENSE

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

github.com/tklauser/go-sysconf (BSD-3) https://github.com/tklauser/go-sysconf
https://github.com/tklauser/go-sysconf/blob/main/LICENSE

github.com/tklauser/numcpus (Apache-2.0) https://github.com/tklauser/numcpus
https://github.com/tklauser/numcpus/blob/main/LICENSE

github.com/yusufpapurcu/wmi (MIT) https://github.com/yusufpapurcu/wmi/
https://github.com/yusufpapurcu/wmi/blob/master/LICENSE

github.com/zitadel/oidc/v2 (Apache-2.0) https://github.com/zitadel/oidc
https://github.com/zitadel/oidc/blob/main/LICENSE

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

go.mozilla.org/pkcs7 (MIT) https://github.com/mozilla-services/pkcs7
https://github.com/mozilla-services/pkcs7/blob/master/LICENSE

go.opentelemetry.io/otel (Apache-2.0) https://github.com/open-telemetry/opentelemetry-go
https://github.com/open-telemetry/opentelemetry-go/blob/main/LICENSE

go.opentelemetry.io/otel/metric (Apache-2.0) https://github.com/open-telemetry/opentelemetry-go
https://github.com/open-telemetry/opentelemetry-go/blob/main/LICENSE

go.opentelemetry.io/otel/trace (Apache-2.0) https://github.com/open-telemetry/opentelemetry-go
https://github.com/open-telemetry/opentelemetry-go/blob/main/LICENSE

golang.org/x/oauth2 (Unspecified) https://cs.opensource.google/go/x/oauth2
https://cs.opensource.google/go/x/oauth2/+/master:LICENSE

golang.org/x/term (Unspecified) https://cs.opensource.google/go/x/term
https://cs.opensource.google/go/x/term/+/master:LICENSE

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

nhooyr.io/websocket (ISC) https://github.com/nhooyr/websocket
https://github.com/nhooyr/websocket/blob/master/LICENSE.txt
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ COPY --from=builder /device-s7/cmd/res /res
EXPOSE 59994

ENTRYPOINT ["/device-s7"]
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 @@ -6,12 +6,12 @@ MICROSERVICES=cmd/device-s7
.PHONY: $(MICROSERVICES)

VERSION=$(shell cat ./VERSION 2>/dev/null || echo 0.0.0)
SDKVERSION=$(shell cat ./go.mod | grep 'github.com/edgexfoundry/device-sdk-go/v3 v' | sed 's/require//g' | awk '{print $$2}')
SDKVERSION=$(shell cat ./go.mod | grep 'github.com/edgexfoundry/device-sdk-go/v4 v' | sed 's/require//g' | awk '{print $$2}')

DOCKER_TAG=$(VERSION)-dev

GOFLAGS=-ldflags "-X github.com/edgexfoundry/device-s7.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
GOTESTFLAGS?=-race

Expand Down
2 changes: 1 addition & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
device_s7 "github.com/edgexfoundry/device-s7"

"github.com/edgexfoundry/device-s7/internal/driver"
"github.com/edgexfoundry/device-sdk-go/v3/pkg/startup"
"github.com/edgexfoundry/device-sdk-go/v4/pkg/startup"
)

const (
Expand Down
Loading

0 comments on commit 8abf735

Please sign in to comment.