Compare commits

..

60 Commits
v3.8.0 ... v3

Author SHA1 Message Date
a271ac6a7c
Merge pull request #118 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.10.11
Bump go.unistack.org/micro/v3 from 3.10.9 to 3.10.11
2023-02-14 08:59:41 +03:00
dependabot[bot]
cf898e56c3
Bump go.unistack.org/micro/v3 from 3.10.9 to 3.10.11
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.10.9 to 3.10.11.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.10.9...v3.10.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>
2023-02-14 05:58:49 +00:00
13a6eeabcd
Merge pull request #117 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.10.9
Bump go.unistack.org/micro/v3 from 3.10.8 to 3.10.9
2023-02-09 08:04:17 +03:00
dependabot[bot]
dcc86f296f
Bump go.unistack.org/micro/v3 from 3.10.8 to 3.10.9
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.10.8 to 3.10.9.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.10.8...v3.10.9)

---
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>
2023-02-09 05:03:26 +00:00
c00475f81e
Merge pull request #115 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.10.8
Bump go.unistack.org/micro/v3 from 3.10.5 to 3.10.8
2023-02-07 08:03:59 +03:00
dependabot[bot]
10c99ca3bc
Bump go.unistack.org/micro/v3 from 3.10.5 to 3.10.8
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.10.5 to 3.10.8.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.10.5...v3.10.8)

---
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>
2023-02-07 05:03:08 +00:00
dependabot[bot]
253f7098ec
Bump google.golang.org/grpc from 1.51.0 to 1.52.3 (#113)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.51.0 to 1.52.3.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.51.0...v1.52.3)

---
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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-31 06:44:24 +03:00
c33c12e4ea
Merge pull request #114 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.10.5
Bump go.unistack.org/micro/v3 from 3.10.4 to 3.10.5
2023-01-30 08:09:07 +03:00
dependabot[bot]
2b0f740a9b
Bump go.unistack.org/micro/v3 from 3.10.4 to 3.10.5
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.10.4 to 3.10.5.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.10.4...v3.10.5)

---
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>
2023-01-30 05:08:19 +00:00
dependabot[bot]
e043a86c2d
Bump dependabot/fetch-metadata from 1.3.5 to 1.3.6 (#111)
Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 1.3.5 to 1.3.6.
- [Release notes](https://github.com/dependabot/fetch-metadata/releases)
- [Commits](https://github.com/dependabot/fetch-metadata/compare/v1.3.5...v1.3.6)

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

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-24 10:07:16 +03:00
3fce9cde40
Merge pull request #110 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.10.4
Bump go.unistack.org/micro/v3 from 3.10.3 to 3.10.4
2023-01-19 08:04:49 +03:00
dependabot[bot]
258301608f
Bump go.unistack.org/micro/v3 from 3.10.3 to 3.10.4
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.10.3 to 3.10.4.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.10.3...v3.10.4)

---
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>
2023-01-19 05:03:51 +00:00
2a783a93fd
Merge pull request #109 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.10.3
Bump go.unistack.org/micro/v3 from 3.10.0 to 3.10.3
2023-01-18 08:04:11 +03:00
dependabot[bot]
32afee35cf
Bump go.unistack.org/micro/v3 from 3.10.0 to 3.10.3
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.10.0 to 3.10.3.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.10.0...v3.10.3)

---
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>
2023-01-18 05:03:21 +00:00
e752df958e
Merge pull request #107 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.10.0
Bump go.unistack.org/micro/v3 from 3.9.18 to 3.10.0
2023-01-09 08:08:13 +03:00
dependabot[bot]
9a7dbf5055
Bump go.unistack.org/micro/v3 from 3.9.18 to 3.10.0
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.9.18 to 3.10.0.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.9.18...v3.10.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-09 05:06:42 +00:00
9d336a6bd8
Merge pull request #106 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.9.18
Bump go.unistack.org/micro/v3 from 3.9.17 to 3.9.18
2022-12-28 08:05:56 +03:00
dependabot[bot]
7593b0c432
Bump go.unistack.org/micro/v3 from 3.9.17 to 3.9.18
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.9.17 to 3.9.18.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.9.17...v3.9.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-12-28 05:05:04 +00:00
35358356d6
Merge pull request #105 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.9.17
Bump go.unistack.org/micro/v3 from 3.9.15 to 3.9.17
2022-12-26 08:05:03 +03:00
dependabot[bot]
59ec7db6c6
Bump go.unistack.org/micro/v3 from 3.9.15 to 3.9.17
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.9.15 to 3.9.17.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.9.15...v3.9.17)

---
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-12-26 05:04:10 +00:00
deeb1c7f20
Merge pull request #104 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.9.15
Bump go.unistack.org/micro/v3 from 3.9.14 to 3.9.15
2022-11-29 08:06:58 +03:00
dependabot[bot]
c0a819b3ab
Bump go.unistack.org/micro/v3 from 3.9.14 to 3.9.15
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.9.14 to 3.9.15.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.9.14...v3.9.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-11-29 05:05:54 +00:00
dependabot[bot]
0bbe3b2746
Bump google.golang.org/grpc from 1.50.1 to 1.51.0 (#102)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.50.1 to 1.51.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.50.1...v1.51.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>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-28 22:17:18 +03:00
dependabot[bot]
fe7cadd0e4
Bump hmarr/auto-approve-action from 2 to 3 (#101)
Bumps [hmarr/auto-approve-action](https://github.com/hmarr/auto-approve-action) from 2 to 3.
- [Release notes](https://github.com/hmarr/auto-approve-action/releases)
- [Commits](https://github.com/hmarr/auto-approve-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: hmarr/auto-approve-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-28 16:25:25 +03:00
19ba2870ce
Merge pull request #103 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.9.14
Bump go.unistack.org/micro/v3 from 3.9.13 to 3.9.14
2022-11-28 08:06:05 +03:00
dependabot[bot]
925c2ab1ff
Bump go.unistack.org/micro/v3 from 3.9.13 to 3.9.14
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.9.13 to 3.9.14.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.9.13...v3.9.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-11-28 05:05:12 +00:00
241a799cc0
Merge pull request #100 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.9.13
Bump go.unistack.org/micro/v3 from 3.9.11 to 3.9.13
2022-11-15 08:05:35 +03:00
dependabot[bot]
1f793a35ac
Bump go.unistack.org/micro/v3 from 3.9.11 to 3.9.13
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.9.11 to 3.9.13.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.9.11...v3.9.13)

---
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-11-15 05:04:56 +00:00
dependabot[bot]
04a91b69ad
Bump dependabot/fetch-metadata from 1.3.4 to 1.3.5 (#99)
Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 1.3.4 to 1.3.5.
- [Release notes](https://github.com/dependabot/fetch-metadata/releases)
- [Commits](https://github.com/dependabot/fetch-metadata/compare/v1.3.4...v1.3.5)

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

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-14 07:04:25 +03:00
dependabot[bot]
d42b759b4d
Bump google.golang.org/grpc from 1.49.0 to 1.50.1 (#98)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.49.0 to 1.50.1.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.49.0...v1.50.1)

---
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>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-12 18:36:43 +03:00
dependabot[bot]
e965a3002b
Bump dependabot/fetch-metadata from 1.3.3 to 1.3.4 (#96)
Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 1.3.3 to 1.3.4.
- [Release notes](https://github.com/dependabot/fetch-metadata/releases)
- [Commits](https://github.com/dependabot/fetch-metadata/compare/v1.3.3...v1.3.4)

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

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-04 13:08:10 +03:00
dependabot[bot]
c62cf6302e
Bump google.golang.org/protobuf from 1.28.0 to 1.28.1 (#94)
Bumps [google.golang.org/protobuf](https://github.com/protocolbuffers/protobuf-go) from 1.28.0 to 1.28.1.
- [Release notes](https://github.com/protocolbuffers/protobuf-go/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf-go/blob/master/release.bash)
- [Commits](https://github.com/protocolbuffers/protobuf-go/compare/v1.28.0...v1.28.1)

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

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-28 17:43:30 +03:00
dependabot[bot]
ac9275d0f1
Bump dependabot/fetch-metadata from 1.3.1 to 1.3.3 (#91)
Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 1.3.1 to 1.3.3.
- [Release notes](https://github.com/dependabot/fetch-metadata/releases)
- [Commits](https://github.com/dependabot/fetch-metadata/compare/v1.3.1...v1.3.3)

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

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-28 14:30:36 +00:00
dependabot[bot]
95de9e92c1
Bump google.golang.org/grpc from 1.47.0 to 1.49.0 (#95)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.47.0 to 1.49.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.47.0...v1.49.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>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-28 17:23:10 +03:00
823b9bee8f
Merge pull request #92 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.9.11
Bump go.unistack.org/micro/v3 from 3.9.10 to 3.9.11
2022-07-11 08:19:14 +03:00
dependabot[bot]
5028d90408
Bump go.unistack.org/micro/v3 from 3.9.10 to 3.9.11
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.9.10 to 3.9.11.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.9.10...v3.9.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>
2022-07-11 05:18:25 +00:00
7e9b563a57
Merge pull request #89 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.9.10
Bump go.unistack.org/micro/v3 from 3.9.8 to 3.9.10
2022-06-27 08:23:13 +03:00
dependabot[bot]
44e550f79b
Bump go.unistack.org/micro/v3 from 3.9.8 to 3.9.10
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.9.8 to 3.9.10.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.9.8...v3.9.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>
2022-06-27 05:22:30 +00:00
dependabot[bot]
fddab119de
Bump google.golang.org/grpc from 1.46.0 to 1.47.0 (#88)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.46.0 to 1.47.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.46.0...v1.47.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>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-25 22:47:15 +03:00
18fc28d580
Merge pull request #86 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.9.8
Bump go.unistack.org/micro/v3 from 3.9.7 to 3.9.8
2022-05-03 08:19:53 +03:00
dependabot[bot]
ff080c2448
Bump go.unistack.org/micro/v3 from 3.9.7 to 3.9.8
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.9.7 to 3.9.8.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.9.7...v3.9.8)

---
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-05-03 05:18:52 +00:00
dependabot[bot]
80e9c7222a
Bump github/codeql-action from 1 to 2 (#85)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1 to 2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v1...v2)

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

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-26 23:42:40 +03:00
dependabot[bot]
5857a1534e
Bump google.golang.org/grpc from 1.45.0 to 1.46.0 (#84)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.45.0 to 1.46.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.45.0...v1.46.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>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-25 16:36:13 +03:00
dependabot[bot]
6f7a0a7471
Bump dependabot/fetch-metadata from 1.3.0 to 1.3.1 (#83)
Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 1.3.0 to 1.3.1.
- [Release notes](https://github.com/dependabot/fetch-metadata/releases)
- [Commits](https://github.com/dependabot/fetch-metadata/compare/v1.3.0...v1.3.1)

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

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-21 12:47:42 +03:00
dependabot[bot]
c0fda29193
Bump actions/setup-go from 2 to 3 (#82)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 2 to 3.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v2...v3)

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

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-11 23:01:13 +03:00
4bb87b532c
Merge pull request #81 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.9.7
Bump go.unistack.org/micro/v3 from 3.9.5 to 3.9.7
2022-03-31 08:22:09 +03:00
dependabot[bot]
f4ae21a6bb
Bump go.unistack.org/micro/v3 from 3.9.5 to 3.9.7
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.9.5 to 3.9.7.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.9.5...v3.9.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>
2022-03-31 05:21:29 +00:00
3b156b79e9
Merge pull request #80 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.9.5
Bump go.unistack.org/micro/v3 from 3.9.1 to 3.9.5
2022-03-28 08:19:42 +03:00
dependabot[bot]
23200052ce
Bump go.unistack.org/micro/v3 from 3.9.1 to 3.9.5
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.9.1 to 3.9.5.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.9.1...v3.9.5)

---
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-03-28 05:19:02 +00:00
dependabot[bot]
5d5d4329b5
Bump google.golang.org/protobuf from 1.27.1 to 1.28.0 (#79)
Bumps [google.golang.org/protobuf](https://github.com/protocolbuffers/protobuf-go) from 1.27.1 to 1.28.0.
- [Release notes](https://github.com/protocolbuffers/protobuf-go/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf-go/blob/master/release.bash)
- [Commits](https://github.com/protocolbuffers/protobuf-go/compare/v1.27.1...v1.28.0)

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

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-23 12:05:57 +03:00
431de96592
Merge pull request #78 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.9.1
Bump go.unistack.org/micro/v3 from 3.9.0 to 3.9.1
2022-03-23 08:30:53 +03:00
dependabot[bot]
f94de62c5c
Bump go.unistack.org/micro/v3 from 3.9.0 to 3.9.1
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.9.0 to 3.9.1.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.9.0...v3.9.1)

---
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-03-23 05:30:14 +00:00
dependabot[bot]
119be4e203
Bump actions/cache from 2 to 3 (#76)
Bumps [actions/cache](https://github.com/actions/cache) from 2 to 3.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2...v3)

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

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-22 23:06:54 +03:00
402a6e9e5a
Merge pull request #77 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.9.0
Bump go.unistack.org/micro/v3 from 3.8.21 to 3.9.0
2022-03-22 08:17:55 +03:00
dependabot[bot]
f06d551f49
Bump go.unistack.org/micro/v3 from 3.8.21 to 3.9.0
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.8.21 to 3.9.0.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.8.21...v3.9.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-22 05:17:04 +00:00
3cd27c71d9
usability fixes (#75)
* Bump google.golang.org/grpc from 1.41.0 to 1.43.0 (#53)

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.41.0 to 1.43.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.41.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>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* logger updates (#57)

* logger: update for latest micro

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* update all

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* 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>

* 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>

* 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>

* 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>

* 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>

* Bump golangci/golangci-lint-action from 2 to 3 (#66)

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>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump dependabot/fetch-metadata from 1.1.1 to 1.2.1 (#65)

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>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump google.golang.org/grpc from 1.43.0 to 1.44.0 (#61)

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>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* Bump dependabot/fetch-metadata from 1.2.1 to 1.3.0

Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 1.2.1 to 1.3.0.
- [Release notes](https://github.com/dependabot/fetch-metadata/releases)
- [Commits](https://github.com/dependabot/fetch-metadata/compare/v1.2.1...v1.3.0)

---
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>

* Bump actions/checkout from 2 to 3

Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

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

Signed-off-by: dependabot[bot] <support@github.com>

* update workflows

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* Update pr.yml

* update go version

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* complete logger service

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-13 11:34:39 +03:00
dependabot[bot]
2b51411bdd
Bump go.unistack.org/micro/v3 from 3.8.7 to 3.8.21 (#71)
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.8.7 to 3.8.21.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.8.7...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>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2022-03-07 13:32:14 +03:00
dependabot[bot]
2978fe4e6b
Bump actions/checkout from 2 to 3 (#70)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

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

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2022-03-07 13:23:35 +03:00
dependabot[bot]
de86255236
Bump google.golang.org/grpc from 1.41.0 to 1.44.0 (#72)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.41.0 to 1.44.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.41.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>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-07 12:29:03 +03:00
dependabot[bot]
80563b7128
Bump golangci/golangci-lint-action from 2 to 3.1.0 (#69)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 2 to 3.1.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v2...v3.1.0)

---
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>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-07 12:24:46 +03:00
14 changed files with 1110 additions and 214 deletions

20
.github/workflows/autoapprove.yml vendored Normal file
View File

@ -0,0 +1,20 @@
name: "autoapprove"
on:
pull_request_target:
types: [assigned, opened, synchronize, reopened]
permissions:
pull-requests: write
contents: write
jobs:
autoapprove:
runs-on: ubuntu-latest
steps:
- name: approve
uses: hmarr/auto-approve-action@v3
if: github.actor == 'vtolstov' || github.actor == 'dependabot[bot]'
id: approve
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

21
.github/workflows/automerge.yml vendored Normal file
View File

@ -0,0 +1,21 @@
name: "automerge"
on:
pull_request_target:
types: [assigned, opened, synchronize, reopened]
permissions:
pull-requests: write
contents: write
jobs:
automerge:
runs-on: ubuntu-latest
if: github.actor == 'vtolstov'
steps:
- name: merge
id: merge
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.TOKEN}}

View File

@ -3,19 +3,20 @@ on:
push: push:
branches: branches:
- master - master
- v3
jobs: jobs:
test: test:
name: test name: test
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: setup - name: setup
uses: actions/setup-go@v2 uses: actions/setup-go@v3
with: with:
go-version: 1.16 go-version: 1.17
- name: checkout - name: checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: cache - name: cache
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: ~/go/pkg/mod path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
@ -31,9 +32,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: checkout - name: checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: lint - name: lint
uses: golangci/golangci-lint-action@v2 uses: golangci/golangci-lint-action@v3
continue-on-error: true continue-on-error: true
with: with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.

View File

@ -43,14 +43,14 @@ jobs:
steps: steps:
- name: checkout - name: checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: setup - name: setup
uses: actions/setup-go@v2 uses: actions/setup-go@v3
with: with:
go-version: 1.16 go-version: 1.17
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.
- name: init - name: init
uses: github/codeql-action/init@v1 uses: github/codeql-action/init@v2
with: with:
languages: ${{ matrix.language }} languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file. # If you wish to specify custom queries, you can do so here or in a config file.
@ -61,7 +61,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below) # If this step fails, then you should remove it and run the build manually (see below)
- name: autobuild - name: autobuild
uses: github/codeql-action/autobuild@v1 uses: github/codeql-action/autobuild@v2
# Command-line programs to run using the OS shell. # Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl # 📚 https://git.io/JvXDl
@ -75,4 +75,4 @@ jobs:
# make release # make release
- name: analyze - name: analyze
uses: github/codeql-action/analyze@v1 uses: github/codeql-action/analyze@v2

View File

@ -1,4 +1,4 @@
name: "prautomerge" name: "dependabot-automerge"
on: on:
pull_request_target: pull_request_target:
@ -9,21 +9,17 @@ permissions:
contents: write contents: write
jobs: jobs:
dependabot: automerge:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }} if: github.actor == 'dependabot[bot]'
steps: steps:
- name: metadata - name: metadata
id: metadata id: metadata
uses: dependabot/fetch-metadata@v1.1.1 uses: dependabot/fetch-metadata@v1.3.6
with: with:
github-token: "${{ secrets.TOKEN }}" github-token: "${{ secrets.TOKEN }}"
- name: approve
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.TOKEN}}
- name: merge - name: merge
id: merge
if: ${{contains(steps.metadata.outputs.dependency-names, 'go.unistack.org')}} if: ${{contains(steps.metadata.outputs.dependency-names, 'go.unistack.org')}}
run: gh pr merge --auto --merge "$PR_URL" run: gh pr merge --auto --merge "$PR_URL"
env: env:

View File

@ -3,19 +3,20 @@ on:
pull_request: pull_request:
branches: branches:
- master - master
- v3
jobs: jobs:
test: test:
name: test name: test
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: setup - name: setup
uses: actions/setup-go@v2 uses: actions/setup-go@v3
with: with:
go-version: 1.16 go-version: 1.17
- name: checkout - name: checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: cache - name: cache
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: ~/go/pkg/mod path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
@ -31,9 +32,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: checkout - name: checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: lint - name: lint
uses: golangci/golangci-lint-action@v2 uses: golangci/golangci-lint-action@v3
continue-on-error: true continue-on-error: true
with: with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.

6
go.mod
View File

@ -4,7 +4,7 @@ go 1.16
require ( require (
github.com/google/uuid v1.3.0 github.com/google/uuid v1.3.0
go.unistack.org/micro/v3 v3.8.7 go.unistack.org/micro/v3 v3.10.11
google.golang.org/grpc v1.41.0 google.golang.org/grpc v1.52.3
google.golang.org/protobuf v1.27.1 google.golang.org/protobuf v1.28.1
) )

961
go.sum

File diff suppressed because it is too large Load Diff

View File

@ -22,9 +22,9 @@ func NewLoggerServiceEndpoints() []api.Endpoint {
} }
type LoggerServiceClient interface { type LoggerServiceClient interface {
Log(ctx context.Context, req *proto.Message, opts ...client.CallOption) (*proto.Empty, error) Log(ctx context.Context, req *proto.LogReq, opts ...client.CallOption) (*proto.LogRsp, error)
} }
type LoggerServiceServer interface { type LoggerServiceServer interface {
Log(ctx context.Context, req *proto.Message, rsp *proto.Empty) error Log(ctx context.Context, req *proto.LogReq, rsp *proto.LogRsp) error
} }

View File

@ -21,8 +21,8 @@ func NewLoggerServiceClient(name string, c client.Client) LoggerServiceClient {
return &loggerServiceClient{c: c, name: name} return &loggerServiceClient{c: c, name: name}
} }
func (c *loggerServiceClient) Log(ctx context.Context, req *proto.Message, opts ...client.CallOption) (*proto.Empty, error) { func (c *loggerServiceClient) Log(ctx context.Context, req *proto.LogReq, opts ...client.CallOption) (*proto.LogRsp, error) {
rsp := &proto.Empty{} rsp := &proto.LogRsp{}
err := c.c.Call(ctx, c.c.NewRequest(c.name, "LoggerService.Log", req), rsp, opts...) err := c.c.Call(ctx, c.c.NewRequest(c.name, "LoggerService.Log", req), rsp, opts...)
if err != nil { if err != nil {
return nil, err return nil, err
@ -34,13 +34,13 @@ type loggerServiceServer struct {
LoggerServiceServer LoggerServiceServer
} }
func (h *loggerServiceServer) Log(ctx context.Context, req *proto.Message, rsp *proto.Empty) error { func (h *loggerServiceServer) Log(ctx context.Context, req *proto.LogReq, rsp *proto.LogRsp) error {
return h.LoggerServiceServer.Log(ctx, req, rsp) return h.LoggerServiceServer.Log(ctx, req, rsp)
} }
func RegisterLoggerServiceServer(s server.Server, sh LoggerServiceServer, opts ...server.HandlerOption) error { func RegisterLoggerServiceServer(s server.Server, sh LoggerServiceServer, opts ...server.HandlerOption) error {
type loggerService interface { type loggerService interface {
Log(ctx context.Context, req *proto.Message, rsp *proto.Empty) error Log(ctx context.Context, req *proto.LogReq, rsp *proto.LogRsp) error
} }
type LoggerService struct { type LoggerService struct {
loggerService loggerService

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.26.0 // protoc-gen-go v1.26.0
// protoc v3.17.3 // protoc v3.19.4
// source: service.proto // source: service.proto
package servicepb package servicepb
@ -20,14 +20,14 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
) )
type Empty struct { type LogRsp struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
} }
func (x *Empty) Reset() { func (x *LogRsp) Reset() {
*x = Empty{} *x = LogRsp{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_service_proto_msgTypes[0] mi := &file_service_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -35,13 +35,13 @@ func (x *Empty) Reset() {
} }
} }
func (x *Empty) String() string { func (x *LogRsp) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
} }
func (*Empty) ProtoMessage() {} func (*LogRsp) ProtoMessage() {}
func (x *Empty) ProtoReflect() protoreflect.Message { func (x *LogRsp) ProtoReflect() protoreflect.Message {
mi := &file_service_proto_msgTypes[0] mi := &file_service_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -53,12 +53,12 @@ func (x *Empty) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x) return mi.MessageOf(x)
} }
// Deprecated: Use Empty.ProtoReflect.Descriptor instead. // Deprecated: Use LogRsp.ProtoReflect.Descriptor instead.
func (*Empty) Descriptor() ([]byte, []int) { func (*LogRsp) Descriptor() ([]byte, []int) {
return file_service_proto_rawDescGZIP(), []int{0} return file_service_proto_rawDescGZIP(), []int{0}
} }
type Message struct { type LogReq struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
@ -69,8 +69,8 @@ type Message struct {
Fields []*Field `protobuf:"bytes,4,rep,name=fields,proto3" json:"fields,omitempty"` Fields []*Field `protobuf:"bytes,4,rep,name=fields,proto3" json:"fields,omitempty"`
} }
func (x *Message) Reset() { func (x *LogReq) Reset() {
*x = Message{} *x = LogReq{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_service_proto_msgTypes[1] mi := &file_service_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -78,13 +78,13 @@ func (x *Message) Reset() {
} }
} }
func (x *Message) String() string { func (x *LogReq) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
} }
func (*Message) ProtoMessage() {} func (*LogReq) ProtoMessage() {}
func (x *Message) ProtoReflect() protoreflect.Message { func (x *LogReq) ProtoReflect() protoreflect.Message {
mi := &file_service_proto_msgTypes[1] mi := &file_service_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -96,33 +96,33 @@ func (x *Message) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x) return mi.MessageOf(x)
} }
// Deprecated: Use Message.ProtoReflect.Descriptor instead. // Deprecated: Use LogReq.ProtoReflect.Descriptor instead.
func (*Message) Descriptor() ([]byte, []int) { func (*LogReq) Descriptor() ([]byte, []int) {
return file_service_proto_rawDescGZIP(), []int{1} return file_service_proto_rawDescGZIP(), []int{1}
} }
func (x *Message) GetLevel() int32 { func (x *LogReq) GetLevel() int32 {
if x != nil { if x != nil {
return x.Level return x.Level
} }
return 0 return 0
} }
func (x *Message) GetFormat() string { func (x *LogReq) GetFormat() string {
if x != nil { if x != nil {
return x.Format return x.Format
} }
return "" return ""
} }
func (x *Message) GetMsg() string { func (x *LogReq) GetMsg() string {
if x != nil { if x != nil {
return x.Msg return x.Msg
} }
return "" return ""
} }
func (x *Message) GetFields() []*Field { func (x *LogReq) GetFields() []*Field {
if x != nil { if x != nil {
return x.Fields return x.Fields
} }
@ -135,12 +135,7 @@ type Field struct {
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// Types that are assignable to Val: Val string `protobuf:"bytes,2,opt,name=val,proto3" json:"val,omitempty"`
// *Field_DoubleVal
// *Field_FloatVal
// *Field_Int32Val
// *Field_Int64Val
Val isField_Val `protobuf_oneof:"val"`
} }
func (x *Field) Reset() { func (x *Field) Reset() {
@ -182,101 +177,37 @@ func (x *Field) GetKey() string {
return "" return ""
} }
func (m *Field) GetVal() isField_Val { func (x *Field) GetVal() string {
if m != nil { if x != nil {
return m.Val return x.Val
} }
return nil return ""
} }
func (x *Field) GetDoubleVal() float64 {
if x, ok := x.GetVal().(*Field_DoubleVal); ok {
return x.DoubleVal
}
return 0
}
func (x *Field) GetFloatVal() float32 {
if x, ok := x.GetVal().(*Field_FloatVal); ok {
return x.FloatVal
}
return 0
}
func (x *Field) GetInt32Val() int32 {
if x, ok := x.GetVal().(*Field_Int32Val); ok {
return x.Int32Val
}
return 0
}
func (x *Field) GetInt64Val() int64 {
if x, ok := x.GetVal().(*Field_Int64Val); ok {
return x.Int64Val
}
return 0
}
type isField_Val interface {
isField_Val()
}
type Field_DoubleVal struct {
// https://developers.google.com/protocol-buffers/docs/proto3#scalar
DoubleVal float64 `protobuf:"fixed64,2,opt,name=double_val,json=doubleVal,proto3,oneof"`
}
type Field_FloatVal struct {
FloatVal float32 `protobuf:"fixed32,3,opt,name=float_val,json=floatVal,proto3,oneof"`
}
type Field_Int32Val struct {
Int32Val int32 `protobuf:"varint,4,opt,name=int32_val,json=int32Val,proto3,oneof"`
}
type Field_Int64Val struct {
Int64Val int64 `protobuf:"varint,5,opt,name=int64_val,json=int64Val,proto3,oneof"` //1
}
func (*Field_DoubleVal) isField_Val() {}
func (*Field_FloatVal) isField_Val() {}
func (*Field_Int32Val) isField_Val() {}
func (*Field_Int64Val) isField_Val() {}
var File_service_proto protoreflect.FileDescriptor var File_service_proto protoreflect.FileDescriptor
var file_service_proto_rawDesc = []byte{ var file_service_proto_rawDesc = []byte{
0x0a, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x70, 0x62, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x70, 0x62, 0x22, 0x08, 0x0a, 0x06, 0x4c, 0x6f,
0x70, 0x74, 0x79, 0x22, 0x73, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x14, 0x67, 0x52, 0x73, 0x70, 0x22, 0x72, 0x0a, 0x06, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x12, 0x14,
0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c,
0x65, 0x76, 0x65, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x10, 0x0a, 0x03,
0x6d, 0x73, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x28, 0x6d, 0x73, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x28,
0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10,
0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64,
0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x22, 0x9e, 0x01, 0x0a, 0x05, 0x46, 0x69, 0x65, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x22, 0x2b, 0x0a, 0x05, 0x46, 0x69, 0x65, 0x6c,
0x6c, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
0x03, 0x6b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x0a, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x6b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x09, 0x64, 0x6f, 0x75, 0x62, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x32, 0x3e, 0x0a, 0x0d, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x53,
0x6c, 0x65, 0x56, 0x61, 0x6c, 0x12, 0x1d, 0x0a, 0x09, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x2d, 0x0a, 0x03, 0x4c, 0x6f, 0x67, 0x12, 0x11, 0x2e,
0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x48, 0x00, 0x52, 0x08, 0x66, 0x6c, 0x6f, 0x61, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71,
0x74, 0x56, 0x61, 0x6c, 0x12, 0x1d, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x1a, 0x11, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x67,
0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x52, 0x73, 0x70, 0x22, 0x00, 0x42, 0x39, 0x5a, 0x37, 0x67, 0x6f, 0x2e, 0x75, 0x6e, 0x69, 0x73,
0x56, 0x61, 0x6c, 0x12, 0x1d, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2d, 0x6c,
0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x33,
0x61, 0x6c, 0x42, 0x05, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x32, 0x3e, 0x0a, 0x0d, 0x4c, 0x6f, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x70, 0x62,
0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x2d, 0x0a, 0x03, 0x4c, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x67, 0x12, 0x12, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x70, 0x62, 0x2e, 0x4d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x10, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x70,
0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 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, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 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,
} }
var ( var (
@ -293,14 +224,14 @@ func file_service_proto_rawDescGZIP() []byte {
var file_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_service_proto_goTypes = []interface{}{ var file_service_proto_goTypes = []interface{}{
(*Empty)(nil), // 0: servicepb.Empty (*LogRsp)(nil), // 0: servicepb.LogRsp
(*Message)(nil), // 1: servicepb.Message (*LogReq)(nil), // 1: servicepb.LogReq
(*Field)(nil), // 2: servicepb.Field (*Field)(nil), // 2: servicepb.Field
} }
var file_service_proto_depIdxs = []int32{ var file_service_proto_depIdxs = []int32{
2, // 0: servicepb.Message.fields:type_name -> servicepb.Field 2, // 0: servicepb.LogReq.fields:type_name -> servicepb.Field
1, // 1: servicepb.LoggerService.Log:input_type -> servicepb.Message 1, // 1: servicepb.LoggerService.Log:input_type -> servicepb.LogReq
0, // 2: servicepb.LoggerService.Log:output_type -> servicepb.Empty 0, // 2: servicepb.LoggerService.Log:output_type -> servicepb.LogRsp
2, // [2:3] is the sub-list for method output_type 2, // [2:3] is the sub-list for method output_type
1, // [1:2] is the sub-list for method input_type 1, // [1:2] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name 1, // [1:1] is the sub-list for extension type_name
@ -315,7 +246,7 @@ func file_service_proto_init() {
} }
if !protoimpl.UnsafeEnabled { if !protoimpl.UnsafeEnabled {
file_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { file_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Empty); i { switch v := v.(*LogRsp); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@ -327,7 +258,7 @@ func file_service_proto_init() {
} }
} }
file_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { file_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Message); i { switch v := v.(*LogReq); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@ -351,12 +282,6 @@ func file_service_proto_init() {
} }
} }
} }
file_service_proto_msgTypes[2].OneofWrappers = []interface{}{
(*Field_DoubleVal)(nil),
(*Field_FloatVal)(nil),
(*Field_Int32Val)(nil),
(*Field_Int64Val)(nil),
}
type x struct{} type x struct{}
out := protoimpl.TypeBuilder{ out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{ File: protoimpl.DescBuilder{

View File

@ -4,12 +4,12 @@ package servicepb;
option go_package="go.unistack.org/micro-logger-service/v3/proto;servicepb"; option go_package="go.unistack.org/micro-logger-service/v3/proto;servicepb";
service LoggerService { service LoggerService {
rpc Log(Message) returns (Empty) {}; rpc Log(LogReq) returns (LogRsp) {};
} }
message Empty {}; message LogRsp {};
message Message { message LogReq {
int32 level = 1; int32 level = 1;
string format = 2; string format = 2;
string msg = 3; string msg = 3;
@ -18,12 +18,5 @@ message Message {
message Field { message Field {
string key = 1; string key = 1;
oneof val { string val = 2;
// https://developers.google.com/protocol-buffers/docs/proto3#scalar
double double_val = 2;
float float_val = 3;
int32 int32_val = 4;
int64 int64_val = 5;
//1
};
}; };

View File

@ -1,4 +1,8 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.19.4
// source: service.proto
package servicepb package servicepb
@ -18,7 +22,7 @@ const _ = grpc.SupportPackageIsVersion7
// //
// 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. // 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 LoggerServiceClient interface { type LoggerServiceClient interface {
Log(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Empty, error) Log(ctx context.Context, in *LogReq, opts ...grpc.CallOption) (*LogRsp, error)
} }
type loggerServiceClient struct { type loggerServiceClient struct {
@ -29,8 +33,8 @@ func NewLoggerServiceClient(cc grpc.ClientConnInterface) LoggerServiceClient {
return &loggerServiceClient{cc} return &loggerServiceClient{cc}
} }
func (c *loggerServiceClient) Log(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Empty, error) { func (c *loggerServiceClient) Log(ctx context.Context, in *LogReq, opts ...grpc.CallOption) (*LogRsp, error) {
out := new(Empty) out := new(LogRsp)
err := c.cc.Invoke(ctx, "/servicepb.LoggerService/Log", in, out, opts...) err := c.cc.Invoke(ctx, "/servicepb.LoggerService/Log", in, out, opts...)
if err != nil { if err != nil {
return nil, err return nil, err
@ -42,7 +46,7 @@ func (c *loggerServiceClient) Log(ctx context.Context, in *Message, opts ...grpc
// All implementations must embed UnimplementedLoggerServiceServer // All implementations must embed UnimplementedLoggerServiceServer
// for forward compatibility // for forward compatibility
type LoggerServiceServer interface { type LoggerServiceServer interface {
Log(context.Context, *Message) (*Empty, error) Log(context.Context, *LogReq) (*LogRsp, error)
mustEmbedUnimplementedLoggerServiceServer() mustEmbedUnimplementedLoggerServiceServer()
} }
@ -50,7 +54,7 @@ type LoggerServiceServer interface {
type UnimplementedLoggerServiceServer struct { type UnimplementedLoggerServiceServer struct {
} }
func (UnimplementedLoggerServiceServer) Log(context.Context, *Message) (*Empty, error) { func (UnimplementedLoggerServiceServer) Log(context.Context, *LogReq) (*LogRsp, error) {
return nil, status.Errorf(codes.Unimplemented, "method Log not implemented") return nil, status.Errorf(codes.Unimplemented, "method Log not implemented")
} }
func (UnimplementedLoggerServiceServer) mustEmbedUnimplementedLoggerServiceServer() {} func (UnimplementedLoggerServiceServer) mustEmbedUnimplementedLoggerServiceServer() {}
@ -67,7 +71,7 @@ func RegisterLoggerServiceServer(s grpc.ServiceRegistrar, srv LoggerServiceServe
} }
func _LoggerService_Log_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { func _LoggerService_Log_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Message) in := new(LogReq)
if err := dec(in); err != nil { if err := dec(in); err != nil {
return nil, err return nil, err
} }
@ -79,7 +83,7 @@ func _LoggerService_Log_Handler(srv interface{}, ctx context.Context, dec func(i
FullMethod: "/servicepb.LoggerService/Log", FullMethod: "/servicepb.LoggerService/Log",
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LoggerServiceServer).Log(ctx, req.(*Message)) return srv.(LoggerServiceServer).Log(ctx, req.(*LogReq))
} }
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }

View File

@ -13,15 +13,29 @@ import (
"go.unistack.org/micro/v3/store" "go.unistack.org/micro/v3/store"
) )
var _ logger.Logger = &serviceLogger{}
type serviceLogger struct { type serviceLogger struct {
opts logger.Options opts logger.Options
service string service string
client pbmicro.LoggerServiceClient client pbmicro.LoggerServiceClient
store store.Store store store.Store
fields map[string]interface{} }
func (l *serviceLogger) Clone(opts ...logger.Option) logger.Logger {
nl := &serviceLogger{service: l.service, store: l.store, client: l.client, opts: l.opts}
for _, o := range opts {
o(&nl.opts)
}
return nl
}
func (l *serviceLogger) Level(lvl logger.Level) {
l.opts.Level = lvl
} }
func (l *serviceLogger) Init(opts ...logger.Option) error { func (l *serviceLogger) Init(opts ...logger.Option) error {
// TODO: optimize to store only []string as fields
for _, o := range opts { for _, o := range opts {
o(&l.opts) o(&l.opts)
} }
@ -49,13 +63,9 @@ func (l *serviceLogger) Init(opts ...logger.Option) error {
return nil return nil
} }
func (l *serviceLogger) Fields(fields map[string]interface{}) logger.Logger { func (l *serviceLogger) Fields(fields ...interface{}) logger.Logger {
nl := &serviceLogger{opts: l.opts, client: l.client, store: l.store} // TODO: optimize to store only []string as fields
nl.fields = make(map[string]interface{}, len(fields)) return l.Clone(logger.WithFields(fields...))
for k, v := range fields {
nl.fields[k] = v
}
return nl
} }
func (l *serviceLogger) V(level logger.Level) bool { func (l *serviceLogger) V(level logger.Level) bool {
@ -114,17 +124,15 @@ func (l *serviceLogger) Fatalf(ctx context.Context, msg string, args ...interfac
func (l *serviceLogger) Log(ctx context.Context, level logger.Level, args ...interface{}) { func (l *serviceLogger) Log(ctx context.Context, level logger.Level, args ...interface{}) {
msg := l.newMessage(level, "", args...) msg := l.newMessage(level, "", args...)
_, err := l.client.Log(ctx, msg) if _, err := l.client.Log(ctx, msg); err != nil {
if err != nil { _ = l.storeMessage(ctx, msg)
l.storeMessage(ctx, msg)
} }
} }
func (l *serviceLogger) Logf(ctx context.Context, level logger.Level, format string, args ...interface{}) { func (l *serviceLogger) Logf(ctx context.Context, level logger.Level, format string, args ...interface{}) {
msg := l.newMessage(level, "", args...) msg := l.newMessage(level, "", args...)
_, err := l.client.Log(ctx, msg) if _, err := l.client.Log(ctx, msg); err != nil {
if err != nil { _ = l.storeMessage(ctx, msg)
l.storeMessage(ctx, msg)
} }
} }
@ -143,12 +151,18 @@ func NewLogger(opts ...logger.Option) logger.Logger {
return l return l
} }
func (l *serviceLogger) newMessage(level logger.Level, format string, args ...interface{}) *pb.Message { func (l *serviceLogger) newMessage(level logger.Level, format string, args ...interface{}) *pb.LogReq {
msg := &pb.Message{Level: int32(level), Format: format} msg := &pb.LogReq{Level: int32(level), Format: format, Fields: make([]*pb.Field, 0, len(l.opts.Fields)/2)}
for idx := 0; idx < len(l.opts.Fields); idx += 2 {
msg.Fields = append(msg.Fields, &pb.Field{
Key: fmt.Sprintf("%v", l.opts.Fields[idx]),
Val: fmt.Sprintf("%v", l.opts.Fields[idx+1]),
})
}
return msg return msg
} }
func (l *serviceLogger) storeMessage(ctx context.Context, msg *pb.Message) error { func (l *serviceLogger) storeMessage(ctx context.Context, msg *pb.LogReq) error {
if l.store == nil { if l.store == nil {
return nil return nil
} }