Skip to content

Commit 2342a31

Browse files
authored
Merge pull request #1629 from jinlinGuan/v4-module
refactor!: update module to v4
2 parents 4e127a5 + 29cfcd2 commit 2342a31

File tree

102 files changed

+701
-1052
lines changed

Some content is hidden

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

102 files changed

+701
-1052
lines changed

app-service-template/Attribution.txt

+173-254
Large diffs are not rendered by default.

app-service-template/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,4 @@ COPY --from=builder /app/app-new-service /app-new-service
5353
EXPOSE 59740
5454

5555
ENTRYPOINT ["/app-new-service"]
56-
CMD ["-cp=consul.http://edgex-core-consul:8500", "--registry"]
56+
CMD ["-cp=keeper.http://edgex-core-keeper:59890", "--registry"]

app-service-template/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ APPVERSION=$(shell cat ./VERSION 2>/dev/null || echo 0.0.0)
3434
SDKVERSION=$(shell cat ./go.mod | grep 'github.com/edgexfoundry/app-functions-sdk-go/v3 v' | sed 's/require//g' | awk '{print $$2}')
3535

3636
MICROSERVICE=app-new-service
37-
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)" -trimpath -mod=readonly
37+
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)" -trimpath -mod=readonly
3838

3939
# TODO: uncomment and remove default once files are in a Github repository or
4040
# remove totally including usage below

app-service-template/config/configuration.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
package config
1919

2020
// This file contains example of custom configuration that can be loaded from the service's configuration.yaml
21-
// and/or the Configuration Provider, aka Consul (if enabled).
21+
// and/or the Configuration Provider, aka keeper (if enabled).
2222
// For more details see https://docs.edgexfoundry.org/latest/microservices/application/GeneralAppServiceConfig/#custom-configuration
2323
// TODO: Update this configuration as needed for you service's needs and remove this comment
2424
// or remove this file if not using custom configuration.
@@ -38,7 +38,7 @@ type ServiceConfig struct {
3838
}
3939

4040
// AppCustomConfig is example of service's custom structured configuration that is specified in the service's
41-
// configuration.yaml file and Configuration Provider (aka Consul), if enabled.
41+
// configuration.yaml file and Configuration Provider (aka keeper), if enabled.
4242
type AppCustomConfig struct {
4343
ResourceNames string
4444
SomeValue int

app-service-template/functions/sample.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ import (
2424

2525
gometrics "github.com/rcrowley/go-metrics"
2626

27-
"github.com/edgexfoundry/app-functions-sdk-go/v3/pkg/interfaces"
27+
"github.com/edgexfoundry/app-functions-sdk-go/v4/pkg/interfaces"
2828

29-
"github.com/edgexfoundry/go-mod-core-contracts/v3/common"
30-
"github.com/edgexfoundry/go-mod-core-contracts/v3/dtos"
29+
"github.com/edgexfoundry/go-mod-core-contracts/v4/common"
30+
"github.com/edgexfoundry/go-mod-core-contracts/v4/dtos"
3131
)
3232

3333
// TODO: Remove sample metric and implement meaningful metrics if any needed.

app-service-template/functions/sample_test.go

+9-9
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ import (
2121
"os"
2222
"testing"
2323

24-
"github.com/edgexfoundry/app-functions-sdk-go/v3/pkg"
25-
"github.com/edgexfoundry/app-functions-sdk-go/v3/pkg/interfaces"
26-
"github.com/edgexfoundry/app-functions-sdk-go/v3/pkg/interfaces/mocks"
27-
mocks2 "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/interfaces/mocks"
28-
"github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger"
29-
"github.com/edgexfoundry/go-mod-core-contracts/v3/common"
30-
"github.com/edgexfoundry/go-mod-core-contracts/v3/dtos"
31-
"github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/responses"
32-
edgexErrors "github.com/edgexfoundry/go-mod-core-contracts/v3/errors"
24+
"github.com/edgexfoundry/app-functions-sdk-go/v4/pkg"
25+
"github.com/edgexfoundry/app-functions-sdk-go/v4/pkg/interfaces"
26+
"github.com/edgexfoundry/app-functions-sdk-go/v4/pkg/interfaces/mocks"
27+
mocks2 "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/interfaces/mocks"
28+
"github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger"
29+
"github.com/edgexfoundry/go-mod-core-contracts/v4/common"
30+
"github.com/edgexfoundry/go-mod-core-contracts/v4/dtos"
31+
"github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/responses"
32+
edgexErrors "github.com/edgexfoundry/go-mod-core-contracts/v4/errors"
3333
"github.com/stretchr/testify/mock"
3434

3535
"github.com/google/uuid"

app-service-template/go.mod

+8-20
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ go 1.23
66

77
// To build local docker image of the template App you must
88
// comment out this replace statement and update the SDK version to latest
9-
replace github.com/edgexfoundry/app-functions-sdk-go/v3 => ../
9+
replace github.com/edgexfoundry/app-functions-sdk-go/v4 => ../
1010

1111
require (
12-
github.com/edgexfoundry/app-functions-sdk-go/v3 v3.1.1
13-
github.com/edgexfoundry/go-mod-core-contracts/v3 v3.2.0-dev.53
12+
github.com/edgexfoundry/app-functions-sdk-go/v4 v4.0.0
13+
github.com/edgexfoundry/go-mod-core-contracts/v4 v4.0.0-dev.2
1414
github.com/google/uuid v1.6.0
1515
github.com/labstack/echo/v4 v4.12.0
1616
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475
@@ -19,20 +19,17 @@ require (
1919

2020
require (
2121
github.com/Microsoft/go-winio v0.6.2 // indirect
22-
github.com/armon/go-metrics v0.4.1 // indirect
2322
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
2423
github.com/barkimedes/go-deepcopy v0.0.0-20220514131651-17c30cfc62df // indirect
25-
github.com/cenkalti/backoff v2.2.1+incompatible // indirect
2624
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
2725
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
2826
github.com/diegoholiveira/jsonlogic/v3 v3.5.3 // indirect
2927
github.com/eclipse/paho.mqtt.golang v1.5.0 // indirect
30-
github.com/edgexfoundry/go-mod-bootstrap/v3 v3.2.0-dev.66 // indirect
31-
github.com/edgexfoundry/go-mod-configuration/v3 v3.2.0-dev.19 // indirect
32-
github.com/edgexfoundry/go-mod-messaging/v3 v3.2.0-dev.40 // indirect
33-
github.com/edgexfoundry/go-mod-registry/v3 v3.2.0-dev.18 // indirect
34-
github.com/edgexfoundry/go-mod-secrets/v3 v3.2.0-dev.18 // indirect
35-
github.com/fatih/color v1.16.0 // indirect
28+
github.com/edgexfoundry/go-mod-bootstrap/v4 v4.0.0-dev.2 // indirect
29+
github.com/edgexfoundry/go-mod-configuration/v4 v4.0.0-dev.3 // indirect
30+
github.com/edgexfoundry/go-mod-messaging/v4 v4.0.0-dev.3 // indirect
31+
github.com/edgexfoundry/go-mod-registry/v4 v4.0.0-dev.2 // indirect
32+
github.com/edgexfoundry/go-mod-secrets/v4 v4.0.0-dev.2 // indirect
3633
github.com/fsnotify/fsnotify v1.7.0 // indirect
3734
github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa // indirect
3835
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
@@ -66,15 +63,8 @@ require (
6663
github.com/gorilla/schema v1.4.1 // indirect
6764
github.com/gorilla/securecookie v1.1.2 // indirect
6865
github.com/gorilla/websocket v1.5.3 // indirect
69-
github.com/hashicorp/consul/api v1.29.4 // indirect
7066
github.com/hashicorp/errwrap v1.1.0 // indirect
71-
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
72-
github.com/hashicorp/go-hclog v1.5.0 // indirect
73-
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
7467
github.com/hashicorp/go-multierror v1.1.1 // indirect
75-
github.com/hashicorp/go-rootcerts v1.0.2 // indirect
76-
github.com/hashicorp/golang-lru v0.5.4 // indirect
77-
github.com/hashicorp/serf v0.10.1 // indirect
7868
github.com/jackc/pgerrcode v0.0.0-20240316143900-6e2875d9b438 // indirect
7969
github.com/jackc/pgpassfile v1.0.0 // indirect
8070
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
@@ -92,9 +82,7 @@ require (
9282
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
9383
github.com/michaelquigley/pfxlog v0.6.10 // indirect
9484
github.com/miekg/pkcs11 v1.1.1 // indirect
95-
github.com/mitchellh/consulstructure v0.0.0-20190329231841-56fdc4d2da54 // indirect
9685
github.com/mitchellh/copystructure v1.2.0 // indirect
97-
github.com/mitchellh/go-homedir v1.1.0 // indirect
9886
github.com/mitchellh/go-ps v1.0.0 // indirect
9987
github.com/mitchellh/mapstructure v1.5.0 // indirect
10088
github.com/mitchellh/reflectwalk v1.0.2 // indirect

0 commit comments

Comments
 (0)