Compare commits

...

41 Commits
v3 ... master

Author SHA1 Message Date
Василий Толстов 8bc98510eb update deps
build / test (push) Failing after 1m7s Details
codeql / analyze (go) (push) Failing after 1m55s Details
build / lint (push) Successful in 9m20s Details
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2024-03-06 17:42:16 +03:00
Василий Толстов ed0f35133d Merge pull request 'update for latest micro changes' (#123) from microv4 into master
build / test (push) Failing after 1m28s Details
build / lint (push) Failing after 2m31s Details
codeql / analyze (go) (push) Failing after 3m6s Details
Reviewed-on: #123
2023-08-15 07:44:02 +03:00
Василий Толстов c36b9e002f update for latest micro changes
codeql / analyze (go) (pull_request) Failing after 3m20s Details
dependabot-automerge / automerge (pull_request) Has been skipped Details
prbuild / test (pull_request) Failing after 1m29s Details
prbuild / lint (pull_request) Failing after 2m41s Details
autoapprove / autoapprove (pull_request) Failing after 1m25s Details
automerge / automerge (pull_request) Failing after 4s Details
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2023-08-15 07:43:43 +03:00
Василий Толстов 106ef7ba77 Merge pull request 'move to micro v4' (#122) from v4 into master
Reviewed-on: #122
2023-05-05 20:06:47 +03:00
Василий Толстов 67d5795e89 move to micro v4
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2023-05-05 20:06:27 +03:00
Василий Толстов 29507e05c2 Merge branch 'v3' 2023-05-05 20:01:50 +03:00
Василий Толстов e1824d489f update workflows
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2022-03-05 19:09:05 +03:00
Василий Толстов d04faa57f4
Merge pull request #67 from unistack-org/dependabot/github_actions/golangci/golangci-lint-action-3
Bump golangci/golangci-lint-action from 2 to 3
2022-02-25 15:34:56 +03:00
dependabot[bot] ca4217c39b
Bump golangci/golangci-lint-action from 2 to 3
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 2 to 3.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-25 12:21:13 +00:00
Василий Толстов ee7b577836
Merge pull request #66 from unistack-org/dependabot/github_actions/dependabot/fetch-metadata-1.2.1
Bump dependabot/fetch-metadata from 1.1.1 to 1.2.1
2022-02-25 13:31:01 +03:00
dependabot[bot] ee00f5b23a
Bump dependabot/fetch-metadata from 1.1.1 to 1.2.1
Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 1.1.1 to 1.2.1.
- [Release notes](https://github.com/dependabot/fetch-metadata/releases)
- [Commits](https://github.com/dependabot/fetch-metadata/compare/v1.1.1...v1.2.1)

---
updated-dependencies:
- dependency-name: dependabot/fetch-metadata
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-25 10:29:51 +00:00
Василий Толстов cb8eefb5cc
Merge pull request #64 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.8.21
Bump go.unistack.org/micro/v3 from 3.8.20 to 3.8.21
2022-02-25 13:28:06 +03:00
dependabot[bot] 5f77c1bcd4
Bump go.unistack.org/micro/v3 from 3.8.20 to 3.8.21
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.8.20 to 3.8.21.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.8.20...v3.8.21)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-25 06:51:24 +00:00
Василий Толстов c3254e64b0
Merge pull request #62 from unistack-org/dependabot/go_modules/google.golang.org/grpc-1.44.0
Bump google.golang.org/grpc from 1.43.0 to 1.44.0
2022-02-25 09:50:34 +03:00
dependabot[bot] 625714c64f
Bump google.golang.org/grpc from 1.43.0 to 1.44.0
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.43.0 to 1.44.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.43.0...v1.44.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-26 12:18:16 +00:00
Василий Толстов 0bead0e5e5
Merge pull request #63 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.8.20
Bump go.unistack.org/micro/v3 from 3.8.19 to 3.8.20
2022-01-26 15:17:11 +03:00
dependabot[bot] 98bc5e8f2d
Bump go.unistack.org/micro/v3 from 3.8.19 to 3.8.20
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.8.19 to 3.8.20.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.8.19...v3.8.20)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-26 12:14:33 +00:00
Василий Толстов e54ebcf3b8
Merge pull request #61 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.8.19
Bump go.unistack.org/micro/v3 from 3.8.18 to 3.8.19
2022-01-25 15:24:31 +03:00
dependabot[bot] caa3516c41
Bump go.unistack.org/micro/v3 from 3.8.18 to 3.8.19
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.8.18 to 3.8.19.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.8.18...v3.8.19)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-25 12:22:02 +00:00
Василий Толстов 9b97c43cd2
Merge pull request #60 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.8.18
Bump go.unistack.org/micro/v3 from 3.8.16 to 3.8.18
2022-01-24 15:28:58 +03:00
dependabot[bot] 77b20afc4a
Bump go.unistack.org/micro/v3 from 3.8.16 to 3.8.18
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.8.16 to 3.8.18.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.8.16...v3.8.18)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-24 12:26:46 +00:00
Василий Толстов 42d74ac2d3
Merge pull request #59 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.8.16
Bump go.unistack.org/micro/v3 from 3.8.15 to 3.8.16
2022-01-21 15:19:06 +03:00
dependabot[bot] 5a2b527e50
Bump go.unistack.org/micro/v3 from 3.8.15 to 3.8.16
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.8.15 to 3.8.16.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.8.15...v3.8.16)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-21 12:17:07 +00:00
Василий Толстов d135d10118
Merge pull request #58 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.8.15
Bump go.unistack.org/micro/v3 from 3.8.14 to 3.8.15
2022-01-20 15:22:12 +03:00
dependabot[bot] dfd95b422b
Bump go.unistack.org/micro/v3 from 3.8.14 to 3.8.15
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.8.14 to 3.8.15.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.8.14...v3.8.15)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-20 12:20:09 +00:00
Василий Толстов 8449ef31ff
Merge pull request #54 from unistack-org/dependabot/go_modules/google.golang.org/grpc-1.43.0
Bump google.golang.org/grpc from 1.42.0 to 1.43.0
2022-01-12 15:31:45 +03:00
dependabot[bot] 5cb00f71ae
Bump google.golang.org/grpc from 1.42.0 to 1.43.0
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.42.0 to 1.43.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.42.0...v1.43.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-11 12:22:36 +00:00
Василий Толстов 50b15cffbe
Merge pull request #57 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.8.14
Bump go.unistack.org/micro/v3 from 3.8.11 to 3.8.14
2022-01-11 15:21:37 +03:00
dependabot[bot] 64bc5fbbd0
Bump go.unistack.org/micro/v3 from 3.8.11 to 3.8.14
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.8.11 to 3.8.14.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.8.11...v3.8.14)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-11 12:19:20 +00:00
Василий Толстов 7767cfb631
Merge pull request #53 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.8.11
Bump go.unistack.org/micro/v3 from 3.8.10 to 3.8.11
2021-11-24 15:22:36 +03:00
dependabot[bot] c987c7b8ce
Bump go.unistack.org/micro/v3 from 3.8.10 to 3.8.11
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.8.10 to 3.8.11.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.8.10...v3.8.11)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-24 12:20:45 +00:00
Василий Толстов fcc32e1858
Merge pull request #51 from unistack-org/dependabot/go_modules/google.golang.org/grpc-1.42.0
Bump google.golang.org/grpc from 1.41.0 to 1.42.0
2021-11-24 14:51:13 +03:00
dependabot[bot] d35c84de91
Bump google.golang.org/grpc from 1.41.0 to 1.42.0
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.41.0 to 1.42.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.41.0...v1.42.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-19 12:29:11 +00:00
Василий Толстов 259428c24f
Merge pull request #52 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.8.10
Bump go.unistack.org/micro/v3 from 3.8.7 to 3.8.10
2021-11-19 15:26:04 +03:00
dependabot[bot] d350e6eaec
Bump go.unistack.org/micro/v3 from 3.8.7 to 3.8.10
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.8.7 to 3.8.10.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.8.7...v3.8.10)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-19 12:23:40 +00:00
Василий Толстов 145dd9efd2
Merge pull request #50 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.8.7
Bump go.unistack.org/micro/v3 from 3.8.6 to 3.8.7
2021-10-28 15:21:50 +03:00
dependabot[bot] c07c3dea24
Bump go.unistack.org/micro/v3 from 3.8.6 to 3.8.7
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.8.6 to 3.8.7.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.8.6...v3.8.7)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-28 12:19:17 +00:00
Василий Толстов 3e391f0cda update workflows
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-10-27 19:05:12 +03:00
Василий Толстов 821ac7b986
Merge pull request #45 from unistack-org/dependabot/github_actions/actions/github-script-5
Bump actions/github-script from 4 to 5
2021-10-27 18:33:19 +03:00
dependabot[bot] d07cc91d74
Bump actions/github-script from 4 to 5
Bumps [actions/github-script](https://github.com/actions/github-script) from 4 to 5.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-27 15:29:25 +00:00
github-actions[bot] dd31aa13b7
Merge pull request #49 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.8.6
Bump go.unistack.org/micro/v3 from 3.8.5 to 3.8.6
2021-10-27 12:19:40 +00:00
11 changed files with 112 additions and 282 deletions

View File

@ -1,3 +1,5 @@
package service
//go:generate protoc -I./proto -I. --go-grpc_out=paths=source_relative:./proto --go_out=paths=source_relative:./proto --go-micro_out=components=micro|grpc,standalone=true,debug=true,paths=source_relative:./micro proto/service.proto
//go:generate protoc -I./proto -I. --go_out=paths=source_relative:./proto proto/service.proto
//go:generate protoc -I./proto -I. --go-micro_out=components=micro,standalone=false,debug=true,paths=source_relative:./proto proto/service.proto
//go:generate protoc -I./proto -I. --go-micro_out=components=grpc,standalone=true,debug=true,paths=source_relative:./micro proto/service.proto

19
go.mod
View File

@ -1,19 +1,14 @@
module go.unistack.org/micro-config-service/v3
module go.unistack.org/micro-config-service/v4
go 1.18
go 1.20
require (
github.com/imdario/mergo v0.3.13
go.unistack.org/micro-server-http/v3 v3.10.13
go.unistack.org/micro/v3 v3.10.16
google.golang.org/grpc v1.52.3
google.golang.org/protobuf v1.28.1
dario.cat/mergo v1.0.0
go.unistack.org/micro/v4 v4.0.17
google.golang.org/protobuf v1.33.0
)
require (
github.com/golang/protobuf v1.5.2 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/text v0.7.0 // indirect
google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/uuid v1.6.0 // indirect
)

37
go.sum
View File

@ -1,32 +1,13 @@
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk=
dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk=
github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg=
github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ=
github.com/silas/dag v0.0.0-20211117232152-9d50aa809f35/go.mod h1:7RTUFBdIRC9nZ7/3RyRNH1bdqIShrDejd1YbLwgPS+I=
go.unistack.org/micro-server-http/v3 v3.10.13 h1:rt50Hos9hSuyvyYEmw0p5L2eq7HDDz2GpAOUO6M0QC8=
go.unistack.org/micro-server-http/v3 v3.10.13/go.mod h1:phNG9aosjbneXvZxEVaVQI+NHLLZ3eA82mOH6gGSShY=
go.unistack.org/micro/v3 v3.10.16 h1:2er/SKKYbV60M+UuJM4eYCF0MZYAIq/yNUrAbTfgq8Q=
go.unistack.org/micro/v3 v3.10.16/go.mod h1:uMAc0U/x7dmtICCrblGf0ZLgYegu3VwQAquu+OFCw1Q=
golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6 h1:a2S6M0+660BgMNl++4JPlcAO/CjkqYItDEZwkoDQK7c=
google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg=
google.golang.org/grpc v1.52.3 h1:pf7sOysg4LdgBqduXveGKrcEwbStiK2rtfghdzlUYDQ=
google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
go.unistack.org/micro/v4 v4.0.17 h1:mF7uM+J4ILdG+1fcwzKYCwDlxhdbF/e1WnGzKKLnIXc=
go.unistack.org/micro/v4 v4.0.17/go.mod h1:ZDgU9931vm2l7X6RN/6UuwRIVp24GRdmQ7dKmegArk4=
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

View File

@ -1,31 +0,0 @@
// Code generated by protoc-gen-go-micro. DO NOT EDIT.
// versions:
// - protoc-gen-go-micro v3.10.2
// - protoc v3.21.12
// source: service.proto
package servicepb
import (
context "context"
proto "go.unistack.org/micro-config-service/v3/proto"
v3 "go.unistack.org/micro-server-http/v3"
client "go.unistack.org/micro/v3/client"
)
var (
ConfigName = "Config"
)
var (
ConfigServerEndpoints = []v3.EndpointMetadata{}
)
type ConfigClient interface {
Load(ctx context.Context, req *proto.LoadRequest, opts ...client.CallOption) (*proto.LoadResponse, error)
Save(ctx context.Context, req *proto.SaveRequest, opts ...client.CallOption) (*proto.SaveResponse, error)
}
type ConfigServer interface {
Load(ctx context.Context, req *proto.LoadRequest, rsp *proto.LoadResponse) error
Save(ctx context.Context, req *proto.SaveRequest, rsp *proto.SaveResponse) error
}

View File

@ -1,64 +1,65 @@
// Code generated by protoc-gen-go-micro. DO NOT EDIT.
// protoc-gen-go-micro version: v3.10.2
// protoc-gen-go-micro version: v4.0.2
// source: service.proto
package servicepb
import (
context "context"
proto "go.unistack.org/micro-config-service/v3/proto"
client "go.unistack.org/micro/v3/client"
server "go.unistack.org/micro/v3/server"
proto "go.unistack.org/micro-config-service/v4/proto"
client "go.unistack.org/micro/v4/client"
options "go.unistack.org/micro/v4/options"
server "go.unistack.org/micro/v4/server"
)
type configClient struct {
type configServiceClient struct {
c client.Client
name string
}
func NewConfigClient(name string, c client.Client) ConfigClient {
return &configClient{c: c, name: name}
func NewConfigServiceClient(name string, c client.Client) proto.ConfigServiceClient {
return &configServiceClient{c: c, name: name}
}
func (c *configClient) Load(ctx context.Context, req *proto.LoadRequest, opts ...client.CallOption) (*proto.LoadResponse, error) {
func (c *configServiceClient) Load(ctx context.Context, req *proto.LoadRequest, opts ...options.Option) (*proto.LoadResponse, error) {
rsp := &proto.LoadResponse{}
err := c.c.Call(ctx, c.c.NewRequest(c.name, "Config.Load", req), rsp, opts...)
err := c.c.Call(ctx, c.c.NewRequest(c.name, "ConfigService.Load", req), rsp, opts...)
if err != nil {
return nil, err
}
return rsp, nil
}
func (c *configClient) Save(ctx context.Context, req *proto.SaveRequest, opts ...client.CallOption) (*proto.SaveResponse, error) {
func (c *configServiceClient) Save(ctx context.Context, req *proto.SaveRequest, opts ...options.Option) (*proto.SaveResponse, error) {
rsp := &proto.SaveResponse{}
err := c.c.Call(ctx, c.c.NewRequest(c.name, "Config.Save", req), rsp, opts...)
err := c.c.Call(ctx, c.c.NewRequest(c.name, "ConfigService.Save", req), rsp, opts...)
if err != nil {
return nil, err
}
return rsp, nil
}
type configServer struct {
ConfigServer
type configServiceServer struct {
proto.ConfigServiceServer
}
func (h *configServer) Load(ctx context.Context, req *proto.LoadRequest, rsp *proto.LoadResponse) error {
return h.ConfigServer.Load(ctx, req, rsp)
func (h *configServiceServer) Load(ctx context.Context, req *proto.LoadRequest, rsp *proto.LoadResponse) error {
return h.ConfigServiceServer.Load(ctx, req, rsp)
}
func (h *configServer) Save(ctx context.Context, req *proto.SaveRequest, rsp *proto.SaveResponse) error {
return h.ConfigServer.Save(ctx, req, rsp)
func (h *configServiceServer) Save(ctx context.Context, req *proto.SaveRequest, rsp *proto.SaveResponse) error {
return h.ConfigServiceServer.Save(ctx, req, rsp)
}
func RegisterConfigServer(s server.Server, sh ConfigServer, opts ...server.HandlerOption) error {
type config interface {
func RegisterConfigServiceServer(s server.Server, sh proto.ConfigServiceServer, opts ...options.Option) error {
type configService interface {
Load(ctx context.Context, req *proto.LoadRequest, rsp *proto.LoadResponse) error
Save(ctx context.Context, req *proto.SaveRequest, rsp *proto.SaveResponse) error
}
type Config struct {
config
type ConfigService struct {
configService
}
h := &configServer{sh}
var nopts []server.HandlerOption
return s.Handle(s.NewHandler(&Config{h}, append(nopts, opts...)...))
h := &configServiceServer{sh}
var nopts []options.Option
return s.Handle(&ConfigService{h}, append(nopts, opts...)...)
}

View File

@ -1,20 +1,20 @@
package service
import (
"go.unistack.org/micro/v3/client"
"go.unistack.org/micro/v3/config"
"go.unistack.org/micro/v4/client"
"go.unistack.org/micro/v4/options"
)
type clientKey struct{}
// Client to call config service
func Client(c client.Client) config.Option {
return config.SetOption(clientKey{}, c)
func Client(c client.Client) options.Option {
return options.ContextOption(clientKey{}, c)
}
type serviceKey struct{}
// Service to which data load
func Service(s string) config.Option {
return config.SetOption(serviceKey{}, s)
func Service(s string) options.Option {
return options.ContextOption(serviceKey{}, s)
}

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.21.12
// protoc v4.23.4
// source: service.proto
package servicepb
@ -221,19 +221,19 @@ var file_service_proto_rawDesc = []byte{
0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0c, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x0e, 0x0a, 0x0c, 0x53, 0x61,
0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x76, 0x0a, 0x06, 0x43, 0x6f,
0x6e, 0x66, 0x69, 0x67, 0x12, 0x35, 0x0a, 0x04, 0x4c, 0x6f, 0x61, 0x64, 0x12, 0x14, 0x2e, 0x73,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4c, 0x6f, 0x61,
0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x35, 0x0a, 0x04, 0x53,
0x61, 0x76, 0x65, 0x12, 0x14, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x53, 0x61,
0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x22, 0x00, 0x42, 0x39, 0x5a, 0x37, 0x67, 0x6f, 0x2e, 0x75, 0x6e, 0x69, 0x73, 0x74, 0x61, 0x63,
0x6b, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x66,
0x69, 0x67, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x3b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x70, 0x62, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x7d, 0x0a, 0x0d, 0x43, 0x6f,
0x6e, 0x66, 0x69, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x04, 0x4c,
0x6f, 0x61, 0x64, 0x12, 0x14, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4c, 0x6f,
0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x22, 0x00, 0x12, 0x35, 0x0a, 0x04, 0x53, 0x61, 0x76, 0x65, 0x12, 0x14, 0x2e, 0x73, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x15, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x39, 0x5a, 0x37, 0x67, 0x6f, 0x2e,
0x75, 0x6e, 0x69, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6d, 0x69, 0x63,
0x72, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x2f, 0x76, 0x34, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x73, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -256,10 +256,10 @@ var file_service_proto_goTypes = []interface{}{
(*SaveResponse)(nil), // 3: service.SaveResponse
}
var file_service_proto_depIdxs = []int32{
0, // 0: service.Config.Load:input_type -> service.LoadRequest
2, // 1: service.Config.Save:input_type -> service.SaveRequest
1, // 2: service.Config.Load:output_type -> service.LoadResponse
3, // 3: service.Config.Save:output_type -> service.SaveResponse
0, // 0: service.ConfigService.Load:input_type -> service.LoadRequest
2, // 1: service.ConfigService.Save:input_type -> service.SaveRequest
1, // 2: service.ConfigService.Load:output_type -> service.LoadResponse
3, // 3: service.ConfigService.Save:output_type -> service.SaveResponse
2, // [2:4] is the sub-list for method output_type
0, // [0:2] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name

View File

@ -1,9 +1,9 @@
syntax = "proto3";
package service;
option go_package="go.unistack.org/micro-config-service/v3/proto;servicepb";
option go_package="go.unistack.org/micro-config-service/v4/proto;servicepb";
service Config {
service ConfigService {
rpc Load(LoadRequest) returns (LoadResponse) {};
rpc Save(SaveRequest) returns (SaveResponse) {};
}

View File

@ -1,146 +0,0 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc v3.21.12
// source: service.proto
package servicepb
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
const (
Config_Load_FullMethodName = "/service.Config/Load"
Config_Save_FullMethodName = "/service.Config/Save"
)
// ConfigClient is the client API for Config service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type ConfigClient interface {
Load(ctx context.Context, in *LoadRequest, opts ...grpc.CallOption) (*LoadResponse, error)
Save(ctx context.Context, in *SaveRequest, opts ...grpc.CallOption) (*SaveResponse, error)
}
type configClient struct {
cc grpc.ClientConnInterface
}
func NewConfigClient(cc grpc.ClientConnInterface) ConfigClient {
return &configClient{cc}
}
func (c *configClient) Load(ctx context.Context, in *LoadRequest, opts ...grpc.CallOption) (*LoadResponse, error) {
out := new(LoadResponse)
err := c.cc.Invoke(ctx, Config_Load_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *configClient) Save(ctx context.Context, in *SaveRequest, opts ...grpc.CallOption) (*SaveResponse, error) {
out := new(SaveResponse)
err := c.cc.Invoke(ctx, Config_Save_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ConfigServer is the server API for Config service.
// All implementations must embed UnimplementedConfigServer
// for forward compatibility
type ConfigServer interface {
Load(context.Context, *LoadRequest) (*LoadResponse, error)
Save(context.Context, *SaveRequest) (*SaveResponse, error)
mustEmbedUnimplementedConfigServer()
}
// UnimplementedConfigServer must be embedded to have forward compatible implementations.
type UnimplementedConfigServer struct {
}
func (UnimplementedConfigServer) Load(context.Context, *LoadRequest) (*LoadResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Load not implemented")
}
func (UnimplementedConfigServer) Save(context.Context, *SaveRequest) (*SaveResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Save not implemented")
}
func (UnimplementedConfigServer) mustEmbedUnimplementedConfigServer() {}
// UnsafeConfigServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ConfigServer will
// result in compilation errors.
type UnsafeConfigServer interface {
mustEmbedUnimplementedConfigServer()
}
func RegisterConfigServer(s grpc.ServiceRegistrar, srv ConfigServer) {
s.RegisterService(&Config_ServiceDesc, srv)
}
func _Config_Load_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(LoadRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ConfigServer).Load(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Config_Load_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ConfigServer).Load(ctx, req.(*LoadRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Config_Save_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SaveRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ConfigServer).Save(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Config_Save_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ConfigServer).Save(ctx, req.(*SaveRequest))
}
return interceptor(ctx, in, info, handler)
}
// Config_ServiceDesc is the grpc.ServiceDesc for Config service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Config_ServiceDesc = grpc.ServiceDesc{
ServiceName: "service.Config",
HandlerType: (*ConfigServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Load",
Handler: _Config_Load_Handler,
},
{
MethodName: "Save",
Handler: _Config_Save_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "service.proto",
}

27
proto/service_micro.pb.go Normal file
View File

@ -0,0 +1,27 @@
// Code generated by protoc-gen-go-micro. DO NOT EDIT.
// versions:
// - protoc-gen-go-micro v4.0.2
// - protoc v4.23.4
// source: service.proto
package servicepb
import (
context "context"
_ "go.unistack.org/micro/v4/client"
options "go.unistack.org/micro/v4/options"
)
var (
ConfigServiceName = "ConfigService"
)
type ConfigServiceClient interface {
Load(ctx context.Context, req *LoadRequest, opts ...options.Option) (*LoadResponse, error)
Save(ctx context.Context, req *SaveRequest, opts ...options.Option) (*SaveResponse, error)
}
type ConfigServiceServer interface {
Load(ctx context.Context, req *LoadRequest, rsp *LoadResponse) error
Save(ctx context.Context, req *SaveRequest, rsp *SaveResponse) error
}

View File

@ -1,15 +1,16 @@
package service // import "go.unistack.org/micro-config-service/v3"
package service // import "go.unistack.org/micro-config-service/v4"
import (
"context"
"fmt"
"github.com/imdario/mergo"
pbmicro "go.unistack.org/micro-config-service/v3/micro"
pb "go.unistack.org/micro-config-service/v3/proto"
"go.unistack.org/micro/v3/client"
"go.unistack.org/micro/v3/config"
rutil "go.unistack.org/micro/v3/util/reflect"
"dario.cat/mergo"
pbmicro "go.unistack.org/micro-config-service/v4/micro"
pb "go.unistack.org/micro-config-service/v4/proto"
"go.unistack.org/micro/v4/client"
"go.unistack.org/micro/v4/config"
"go.unistack.org/micro/v4/options"
rutil "go.unistack.org/micro/v4/util/reflect"
)
var _ config.Config = &serviceConfig{}
@ -19,14 +20,14 @@ var DefaultStructTag = "service"
type serviceConfig struct {
opts config.Options
service string
client pbmicro.ConfigClient
client pb.ConfigServiceClient
}
func (c *serviceConfig) Options() config.Options {
return c.opts
}
func (c *serviceConfig) Init(opts ...config.Option) error {
func (c *serviceConfig) Init(opts ...options.Option) error {
if err := config.DefaultBeforeInit(c.opts.Context, c); err != nil && !c.opts.AllowFail {
return err
}
@ -71,7 +72,7 @@ func (c *serviceConfig) Init(opts ...config.Option) error {
return nil
}
c.client = pbmicro.NewConfigClient(c.service, cli)
c.client = pbmicro.NewConfigServiceClient(c.service, cli)
if err := config.DefaultAfterInit(c.opts.Context, c); err != nil && !c.opts.AllowFail {
return err
@ -80,7 +81,7 @@ func (c *serviceConfig) Init(opts ...config.Option) error {
return nil
}
func (c *serviceConfig) Load(ctx context.Context, opts ...config.LoadOption) error {
func (c *serviceConfig) Load(ctx context.Context, opts ...options.Option) error {
if err := config.DefaultBeforeLoad(ctx, c); err != nil && !c.opts.AllowFail {
return err
}
@ -131,7 +132,7 @@ func (c *serviceConfig) Load(ctx context.Context, opts ...config.LoadOption) err
return nil
}
func (c *serviceConfig) Save(ctx context.Context, opts ...config.SaveOption) error {
func (c *serviceConfig) Save(ctx context.Context, opts ...options.Option) error {
if err := config.DefaultBeforeSave(ctx, c); err != nil && !c.opts.AllowFail {
return err
}
@ -166,11 +167,11 @@ func (c *serviceConfig) Name() string {
return c.opts.Name
}
func (c *serviceConfig) Watch(ctx context.Context, opts ...config.WatchOption) (config.Watcher, error) {
func (c *serviceConfig) Watch(ctx context.Context, opts ...options.Option) (config.Watcher, error) {
return nil, fmt.Errorf("not implemented")
}
func NewConfig(opts ...config.Option) *serviceConfig {
func NewConfig(opts ...options.Option) *serviceConfig {
options := config.NewOptions(opts...)
if len(options.StructTag) == 0 {
options.StructTag = DefaultStructTag