Compare commits

...

404 Commits

Author SHA1 Message Date
dependabot[bot] 8e72ab3da0 build(deps): bump grpc from 1.73.0 to 1.74.0
Bumps `grpc` from 1.73.0 to 1.74.0.

Updates `io.grpc:grpc-core` from 1.73.0 to 1.74.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.73.0...v1.74.0)

Updates `io.grpc:grpc-netty` from 1.73.0 to 1.74.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.73.0...v1.74.0)

Updates `io.grpc:grpc-protobuf` from 1.73.0 to 1.74.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.73.0...v1.74.0)

Updates `io.grpc:grpc-stub` from 1.73.0 to 1.74.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.73.0...v1.74.0)

Updates `io.grpc:grpc-grpclb` from 1.73.0 to 1.74.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.73.0...v1.74.0)

Updates `io.grpc:grpc-inprocess` from 1.73.0 to 1.74.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.73.0...v1.74.0)

Updates `io.grpc:grpc-util` from 1.73.0 to 1.74.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.73.0...v1.74.0)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-version: 1.74.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-netty
  dependency-version: 1.74.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-protobuf
  dependency-version: 1.74.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-stub
  dependency-version: 1.74.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-grpclb
  dependency-version: 1.74.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-inprocess
  dependency-version: 1.74.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-util
  dependency-version: 1.74.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-03 21:33:58 +02:00
dependabot[bot] 3be6978e23 build(deps): bump org.apache.commons:commons-compress
Bumps [org.apache.commons:commons-compress](https://github.com/apache/commons-compress) from 1.27.1 to 1.28.0.
- [Changelog](https://github.com/apache/commons-compress/blob/master/RELEASE-NOTES.txt)
- [Commits](https://github.com/apache/commons-compress/compare/rel/commons-compress-1.27.1...rel/commons-compress-1.28.0)

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-compress
  dependency-version: 1.28.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-03 21:33:38 +02:00
yunpeng.hu 9b4c9dd2ce fix 2025-07-28 22:01:18 +02:00
Michael Vorburger 03a3b994e6 chore: Remove xiang90@ and heyitsanthony@ from OWNERS
See https://github.com/etcd-io/jetcd/pull/1487#discussion_r2178670309.

Signed-off-by: Michael Vorburger <mike@vorburger.ch>
2025-07-23 14:06:55 +02:00
Michael Vorburger 10a335bf5f chore: Add vorburger to OWNERS
See https://github.com/etcd-io/jetcd/issues/1486,

for https://github.com/kubernetes/org/issues/5665.

Signed-off-by: Michael Vorburger <mike@vorburger.ch>
2025-07-23 14:06:55 +02:00
Lan fd240de17e chore: add ci for etcd 3.6.0 and drop 3.4
Signed-off-by: Lan <gcslyp@gmail.com>
2025-07-23 14:06:22 +02:00
dependabot[bot] 602feaf479 build(deps): bump org.junit.jupiter:junit-jupiter from 5.13.3 to 5.13.4
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit-framework) from 5.13.3 to 5.13.4.
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.3...r5.13.4)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-version: 5.13.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-21 22:32:17 +02:00
dependabot[bot] 4489b3f8da build(deps): bump commons-io:commons-io from 2.19.0 to 2.20.0
Bumps [commons-io:commons-io](https://github.com/apache/commons-io) from 2.19.0 to 2.20.0.
- [Changelog](https://github.com/apache/commons-io/blob/master/RELEASE-NOTES.txt)
- [Commits](https://github.com/apache/commons-io/compare/rel/commons-io-2.19.0...rel/commons-io-2.20.0)

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  dependency-version: 2.20.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-21 22:13:28 +02:00
dependabot[bot] 40425c35d5 build(deps): bump org.testcontainers:testcontainers
Bumps [org.testcontainers:testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.21.0 to 1.21.3.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.21.0...1.21.3)

---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
  dependency-version: 1.21.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-15 08:02:36 +02:00
dependabot[bot] 990a5ea690 build(deps): bump log4j from 2.24.3 to 2.25.1
Bumps `log4j` from 2.24.3 to 2.25.1.

Updates `org.apache.logging.log4j:log4j-api` from 2.24.3 to 2.25.1

Updates `org.apache.logging.log4j:log4j-core` from 2.24.3 to 2.25.1

Updates `org.apache.logging.log4j:log4j-slf4j2-impl` from 2.24.3 to 2.25.1

Updates `org.apache.logging.log4j:log4j-1.2-api` from 2.24.3 to 2.25.1

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-version: 2.25.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-version: 2.25.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-slf4j2-impl
  dependency-version: 2.25.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-1.2-api
  dependency-version: 2.25.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-15 08:01:51 +02:00
dependabot[bot] 6843e47a96 build(deps): bump org.junit.jupiter:junit-jupiter from 5.13.2 to 5.13.3
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit-framework) from 5.13.2 to 5.13.3.
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.2...r5.13.3)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-version: 5.13.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-05 18:12:29 +09:00
dependabot[bot] 5a83bdb482 build(deps): bump mockito from 5.17.0 to 5.18.0
Bumps `mockito` from 5.17.0 to 5.18.0.

Updates `org.mockito:mockito-core` from 5.17.0 to 5.18.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.17.0...v5.18.0)

Updates `org.mockito:mockito-junit-jupiter` from 5.17.0 to 5.18.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.17.0...v5.18.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-version: 5.18.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-version: 5.18.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-01 08:13:28 +09:00
dependabot[bot] 5f0ee26f3b build(deps): bump io.vertx:vertx-grpc from 4.5.14 to 5.0.1
Bumps [io.vertx:vertx-grpc](https://github.com/vert-x3/vertx-grpc) from 4.5.14 to 5.0.1.
- [Commits](https://github.com/vert-x3/vertx-grpc/compare/4.5.14...5.0.1)

---
updated-dependencies:
- dependency-name: io.vertx:vertx-grpc
  dependency-version: 5.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-01 07:55:53 +09:00
dependabot[bot] 80b72b0b2a build(deps): bump grpc from 1.72.0 to 1.73.0
Bumps `grpc` from 1.72.0 to 1.73.0.

Updates `io.grpc:grpc-core` from 1.72.0 to 1.73.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.72.0...v1.73.0)

Updates `io.grpc:grpc-netty` from 1.72.0 to 1.73.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.72.0...v1.73.0)

Updates `io.grpc:grpc-protobuf` from 1.72.0 to 1.73.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.72.0...v1.73.0)

Updates `io.grpc:grpc-stub` from 1.72.0 to 1.73.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.72.0...v1.73.0)

Updates `io.grpc:grpc-grpclb` from 1.72.0 to 1.73.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.72.0...v1.73.0)

Updates `io.grpc:grpc-inprocess` from 1.72.0 to 1.73.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.72.0...v1.73.0)

Updates `io.grpc:grpc-util` from 1.72.0 to 1.73.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.72.0...v1.73.0)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-version: 1.73.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-netty
  dependency-version: 1.73.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-protobuf
  dependency-version: 1.73.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-stub
  dependency-version: 1.73.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-grpclb
  dependency-version: 1.73.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-inprocess
  dependency-version: 1.73.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-util
  dependency-version: 1.73.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-01 07:48:50 +09:00
dependabot[bot] 98307934fe build(deps): bump io.rest-assured:rest-assured from 5.5.1 to 5.5.5
Bumps [io.rest-assured:rest-assured](https://github.com/rest-assured/rest-assured) from 5.5.1 to 5.5.5.
- [Changelog](https://github.com/rest-assured/rest-assured/blob/master/changelog.txt)
- [Commits](https://github.com/rest-assured/rest-assured/compare/rest-assured-5.5.1...rest-assured-5.5.5)

---
updated-dependencies:
- dependency-name: io.rest-assured:rest-assured
  dependency-version: 5.5.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-01 07:47:32 +09:00
dependabot[bot] a3f85475a2 build(deps): bump org.junit.jupiter:junit-jupiter from 5.12.2 to 5.13.2
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit-framework) from 5.12.2 to 5.13.2.
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.12.2...r5.13.2)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-version: 5.13.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-01 07:46:13 +09:00
dependabot[bot] 579e05b634 build(deps): bump org.testcontainers:testcontainers
Bumps [org.testcontainers:testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.20.6 to 1.21.0.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.20.6...1.21.0)

---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
  dependency-version: 1.21.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-28 21:33:20 +02:00
dependabot[bot] 43f0f23122 build(deps): bump commons-io:commons-io from 2.18.0 to 2.19.0
Bumps commons-io:commons-io from 2.18.0 to 2.19.0.

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  dependency-version: 2.19.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-28 21:33:12 +02:00
dependabot[bot] 81ea44b082 build(deps): bump info.picocli:picocli from 4.7.6 to 4.7.7
Bumps [info.picocli:picocli](https://github.com/remkop/picocli) from 4.7.6 to 4.7.7.
- [Release notes](https://github.com/remkop/picocli/releases)
- [Changelog](https://github.com/remkop/picocli/blob/main/RELEASE-NOTES.md)
- [Commits](https://github.com/remkop/picocli/compare/v4.7.6...v4.7.7)

---
updated-dependencies:
- dependency-name: info.picocli:picocli
  dependency-version: 4.7.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-28 21:33:03 +02:00
dependabot[bot] c41c3fdc68 build(deps): bump grpc from 1.71.0 to 1.72.0
Bumps `grpc` from 1.71.0 to 1.72.0.

Updates `io.grpc:grpc-core` from 1.71.0 to 1.72.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.71.0...v1.72.0)

Updates `io.grpc:grpc-netty` from 1.71.0 to 1.72.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.71.0...v1.72.0)

Updates `io.grpc:grpc-protobuf` from 1.71.0 to 1.72.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.71.0...v1.72.0)

Updates `io.grpc:grpc-stub` from 1.71.0 to 1.72.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.71.0...v1.72.0)

Updates `io.grpc:grpc-grpclb` from 1.71.0 to 1.72.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.71.0...v1.72.0)

Updates `io.grpc:grpc-inprocess` from 1.71.0 to 1.72.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.71.0...v1.72.0)

Updates `io.grpc:grpc-util` from 1.71.0 to 1.72.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.71.0...v1.72.0)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-version: 1.72.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-netty
  dependency-version: 1.72.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-protobuf
  dependency-version: 1.72.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-stub
  dependency-version: 1.72.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-grpclb
  dependency-version: 1.72.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-inprocess
  dependency-version: 1.72.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-util
  dependency-version: 1.72.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-28 21:32:54 +02:00
Luca Burgazzoli e852bd921d Update deps
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2025-04-28 13:51:24 +02:00
dependabot[bot] 8dd9d3504e build(deps): bump mockito from 5.16.1 to 5.17.0
Bumps `mockito` from 5.16.1 to 5.17.0.

Updates `org.mockito:mockito-core` from 5.16.1 to 5.17.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.16.1...v5.17.0)

Updates `org.mockito:mockito-junit-jupiter` from 5.16.1 to 5.17.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.16.1...v5.17.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-version: 5.17.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-version: 5.17.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-28 13:13:45 +02:00
dependabot[bot] c468ab4dd8 build(deps): bump io.vertx:vertx-grpc from 4.5.13 to 4.5.14
Bumps io.vertx:vertx-grpc from 4.5.13 to 4.5.14.

---
updated-dependencies:
- dependency-name: io.vertx:vertx-grpc
  dependency-version: 4.5.14
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-28 13:13:35 +02:00
dependabot[bot] 08f3c274cc build(deps): bump com.google.protobuf from 0.9.4 to 0.9.5
Bumps com.google.protobuf from 0.9.4 to 0.9.5.

---
updated-dependencies:
- dependency-name: com.google.protobuf
  dependency-version: 0.9.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-28 13:13:25 +02:00
Chih-Chieh Huang a2c1db0279 core: user provided vertx instance for ClientConnectionManager
This allows user to provide Vertx instance instead of creating a new one

Fixs #1467

Signed-off-by: Chih-Chieh Huang <cchdroid@gmail.com>
2025-04-28 13:13:12 +02:00
dependabot[bot] a65e765e36 build(deps): bump mockito from 5.16.0 to 5.16.1
Bumps `mockito` from 5.16.0 to 5.16.1.

Updates `org.mockito:mockito-core` from 5.16.0 to 5.16.1
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.16.0...v5.16.1)

Updates `org.mockito:mockito-junit-jupiter` from 5.16.0 to 5.16.1
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.16.0...v5.16.1)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-24 08:04:55 +01:00
dependabot[bot] 280a445773 build(deps): bump org.testcontainers:testcontainers
Bumps [org.testcontainers:testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.20.5 to 1.20.6.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.20.5...1.20.6)

---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-24 08:04:44 +01:00
dependabot[bot] d498294fca build(deps): bump grpc from 1.70.0 to 1.71.0
Bumps `grpc` from 1.70.0 to 1.71.0.

Updates `io.grpc:grpc-core` from 1.70.0 to 1.71.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.70.0...v1.71.0)

Updates `io.grpc:grpc-netty` from 1.70.0 to 1.71.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.70.0...v1.71.0)

Updates `io.grpc:grpc-protobuf` from 1.70.0 to 1.71.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.70.0...v1.71.0)

Updates `io.grpc:grpc-stub` from 1.70.0 to 1.71.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.70.0...v1.71.0)

Updates `io.grpc:grpc-grpclb` from 1.70.0 to 1.71.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.70.0...v1.71.0)

Updates `io.grpc:grpc-inprocess` from 1.70.0 to 1.71.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.70.0...v1.71.0)

Updates `io.grpc:grpc-util` from 1.70.0 to 1.71.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.70.0...v1.71.0)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-netty
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-stub
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-grpclb
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-inprocess
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-util
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-24 08:04:34 +01:00
dependabot[bot] 81ebd3a3fe build(deps): bump mockito from 5.15.2 to 5.16.0
Bumps `mockito` from 5.15.2 to 5.16.0.

Updates `org.mockito:mockito-core` from 5.15.2 to 5.16.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.15.2...v5.16.0)

Updates `org.mockito:mockito-junit-jupiter` from 5.15.2 to 5.16.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.15.2...v5.16.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-05 19:35:28 +01:00
Luca Burgazzoli 9a0d2f4076
Update README 2025-03-03 11:17:32 +01:00
Luca Burgazzoli 61a21a2d7c
Update deps 2025-03-03 10:55:26 +01:00
Luca Burgazzoli 69c2ec3d03
Update deps 2025-03-03 10:52:04 +01:00
dependabot[bot] 59ff5091cc build(deps): bump org.slf4j:slf4j-api from 2.0.16 to 2.0.17
Bumps org.slf4j:slf4j-api from 2.0.16 to 2.0.17.

---
updated-dependencies:
- dependency-name: org.slf4j:slf4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-03 10:04:25 +01:00
dependabot[bot] 098cf0f8bc build(deps): bump org.awaitility:awaitility from 4.2.2 to 4.3.0
Bumps [org.awaitility:awaitility](https://github.com/awaitility/awaitility) from 4.2.2 to 4.3.0.
- [Changelog](https://github.com/awaitility/awaitility/blob/master/changelog.txt)
- [Commits](https://github.com/awaitility/awaitility/compare/awaitility-4.2.2...awaitility-4.3.0)

---
updated-dependencies:
- dependency-name: org.awaitility:awaitility
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-03 10:04:17 +01:00
dependabot[bot] e68613fb6b build(deps): bump org.testcontainers:testcontainers
Bumps [org.testcontainers:testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.20.4 to 1.20.5.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.20.4...1.20.5)

---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-03 10:04:08 +01:00
dependabot[bot] 59337b388b build(deps): bump io.rest-assured:rest-assured from 5.5.0 to 5.5.1
Bumps [io.rest-assured:rest-assured](https://github.com/rest-assured/rest-assured) from 5.5.0 to 5.5.1.
- [Changelog](https://github.com/rest-assured/rest-assured/blob/master/changelog.txt)
- [Commits](https://github.com/rest-assured/rest-assured/compare/rest-assured-5.5.0...rest-assured-5.5.1)

---
updated-dependencies:
- dependency-name: io.rest-assured:rest-assured
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-19 08:57:23 +01:00
dependabot[bot] 9f1a90cc6a build(deps): bump io.vertx:vertx-grpc from 4.5.11 to 4.5.13
Bumps io.vertx:vertx-grpc from 4.5.11 to 4.5.13.

---
updated-dependencies:
- dependency-name: io.vertx:vertx-grpc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-18 14:12:44 +01:00
dependabot[bot] 2e34d10d24 build(deps): bump grpc from 1.68.1 to 1.70.0
Bumps `grpc` from 1.68.1 to 1.70.0.

Updates `io.grpc:grpc-core` from 1.68.1 to 1.70.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.68.1...v1.70.0)

Updates `io.grpc:grpc-netty` from 1.68.1 to 1.70.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.68.1...v1.70.0)

Updates `io.grpc:grpc-protobuf` from 1.68.1 to 1.70.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.68.1...v1.70.0)

Updates `io.grpc:grpc-stub` from 1.68.1 to 1.70.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.68.1...v1.70.0)

Updates `io.grpc:grpc-grpclb` from 1.68.1 to 1.70.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.68.1...v1.70.0)

Updates `io.grpc:grpc-inprocess` from 1.68.1 to 1.70.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.68.1...v1.70.0)

Updates `io.grpc:grpc-util` from 1.68.1 to 1.70.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.68.1...v1.70.0)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-netty
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-stub
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-grpclb
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-inprocess
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-util
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-18 14:12:35 +01:00
dependabot[bot] 11f45ec3fc build(deps): bump mockito from 5.14.2 to 5.15.2
Bumps `mockito` from 5.14.2 to 5.15.2.

Updates `org.mockito:mockito-core` from 5.14.2 to 5.15.2
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.14.2...v5.15.2)

Updates `org.mockito:mockito-junit-jupiter` from 5.14.2 to 5.15.2
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.14.2...v5.15.2)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-18 14:12:17 +01:00
dependabot[bot] 3a7740fa92 build(deps): bump com.google.guava:guava from 33.3.1-jre to 33.4.0-jre
Bumps [com.google.guava:guava](https://github.com/google/guava) from 33.3.1-jre to 33.4.0-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-18 14:12:08 +01:00
dependabot[bot] b7293499a4 build(deps): bump org.junit.jupiter:junit-jupiter from 5.11.3 to 5.11.4
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.11.3 to 5.11.4.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.11.3...r5.11.4)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-18 14:11:53 +01:00
Cristian Ferretti 08def01ee1 Wording. 2025-02-18 14:11:34 +01:00
Cristian Ferretti 05f92e0443 Do not retry by default non-idempotent operations. Fixes #1444
Also use the chance to improve javadoc on some *Options objects

Signed-off-by: Cristian Ferretti <jcferretti2020@gmail.com>
2025-02-18 14:11:34 +01:00
dependabot[bot] a240dc6a74 build(deps): bump log4j from 2.24.2 to 2.24.3
Bumps `log4j` from 2.24.2 to 2.24.3.

Updates `org.apache.logging.log4j:log4j-api` from 2.24.2 to 2.24.3

Updates `org.apache.logging.log4j:log4j-core` from 2.24.2 to 2.24.3

Updates `org.apache.logging.log4j:log4j-slf4j2-impl` from 2.24.2 to 2.24.3

Updates `org.apache.logging.log4j:log4j-1.2-api` from 2.24.2 to 2.24.3

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-slf4j2-impl
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-1.2-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-20 21:14:13 +01:00
dependabot[bot] 8ee9c1573e build(deps): bump org.assertj:assertj-core from 3.26.3 to 3.27.3
Bumps [org.assertj:assertj-core](https://github.com/assertj/assertj) from 3.26.3 to 3.27.3.
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.26.3...assertj-build-3.27.3)

---
updated-dependencies:
- dependency-name: org.assertj:assertj-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-20 21:13:37 +01:00
dependabot[bot] 0dad061111 build(deps): bump log4j from 2.24.1 to 2.24.2
Bumps `log4j` from 2.24.1 to 2.24.2.

Updates `org.apache.logging.log4j:log4j-api` from 2.24.1 to 2.24.2

Updates `org.apache.logging.log4j:log4j-core` from 2.24.1 to 2.24.2

Updates `org.apache.logging.log4j:log4j-slf4j2-impl` from 2.24.1 to 2.24.2

Updates `org.apache.logging.log4j:log4j-1.2-api` from 2.24.1 to 2.24.2

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-slf4j2-impl
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-1.2-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-27 07:48:00 +01:00
dependabot[bot] dab6c4cb2d build(deps): bump org.testcontainers:testcontainers
Bumps [org.testcontainers:testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.20.3 to 1.20.4.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.20.3...1.20.4)

---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-21 07:53:40 +01:00
dependabot[bot] befcdc538d build(deps): bump commons-io:commons-io from 2.17.0 to 2.18.0
Bumps commons-io:commons-io from 2.17.0 to 2.18.0.

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-21 07:53:32 +01:00
Luca Burgazzoli 8a6c463341
Fix README 2024-11-14 09:37:13 +01:00
Luca Burgazzoli 01a2014b54 Update deps
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2024-11-14 09:28:50 +01:00
dependabot[bot] acbfa6f434 build(deps): bump io.vertx:vertx-grpc from 4.5.10 to 4.5.11
Bumps io.vertx:vertx-grpc from 4.5.10 to 4.5.11.

---
updated-dependencies:
- dependency-name: io.vertx:vertx-grpc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-13 21:32:21 +01:00
dependabot[bot] d2005ada3f build(deps): bump mockito from 5.13.0 to 5.14.2
Bumps `mockito` from 5.13.0 to 5.14.2.

Updates `org.mockito:mockito-core` from 5.13.0 to 5.14.2
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.13.0...v5.14.2)

Updates `org.mockito:mockito-junit-jupiter` from 5.13.0 to 5.14.2
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.13.0...v5.14.2)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-31 09:37:25 +01:00
dependabot[bot] 327a37bbc9 build(deps): bump org.testcontainers:testcontainers
Bumps [org.testcontainers:testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.20.1 to 1.20.3.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.20.1...1.20.3)

---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-31 09:37:16 +01:00
dependabot[bot] 8f182d4b8e build(deps): bump log4j from 2.23.1 to 2.24.1
Bumps `log4j` from 2.23.1 to 2.24.1.

Updates `org.apache.logging.log4j:log4j-api` from 2.23.1 to 2.24.1

Updates `org.apache.logging.log4j:log4j-core` from 2.23.1 to 2.24.1

Updates `org.apache.logging.log4j:log4j-slf4j2-impl` from 2.23.1 to 2.24.1

Updates `org.apache.logging.log4j:log4j-1.2-api` from 2.23.1 to 2.24.1

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-slf4j2-impl
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-1.2-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-30 15:15:29 +01:00
dependabot[bot] 2da6f79b9d build(deps): bump org.junit.jupiter:junit-jupiter from 5.11.0 to 5.11.3
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.11.0 to 5.11.3.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.11.0...r5.11.3)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-30 15:07:20 +01:00
dependabot[bot] 05777ffaca build(deps): bump com.google.guava:guava from 33.3.0-jre to 33.3.1-jre
Bumps [com.google.guava:guava](https://github.com/google/guava) from 33.3.0-jre to 33.3.1-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-30 15:07:11 +01:00
dependabot[bot] 503bdd0f5a build(deps): bump commons-io:commons-io from 2.16.1 to 2.17.0
Bumps commons-io:commons-io from 2.16.1 to 2.17.0.

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-30 15:07:02 +01:00
dependabot[bot] 346827957c build(deps): bump grpc from 1.66.0 to 1.68.0
Bumps `grpc` from 1.66.0 to 1.68.0.

Updates `io.grpc:grpc-core` from 1.66.0 to 1.68.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/commits)

Updates `io.grpc:grpc-netty` from 1.66.0 to 1.68.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/commits)

Updates `io.grpc:grpc-protobuf` from 1.66.0 to 1.68.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/commits)

Updates `io.grpc:grpc-stub` from 1.66.0 to 1.68.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/commits)

Updates `io.grpc:grpc-grpclb` from 1.66.0 to 1.68.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/commits)

Updates `io.grpc:grpc-inprocess` from 1.66.0 to 1.68.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/commits)

Updates `io.grpc:grpc-util` from 1.66.0 to 1.68.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/commits)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-netty
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-stub
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-grpclb
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-inprocess
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-util
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-30 15:06:36 +01:00
dependabot[bot] 8e7ed6aaa6 build(deps): bump org.apache.commons:commons-compress
Bumps org.apache.commons:commons-compress from 1.27.0 to 1.27.1.

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-compress
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-14 00:00:29 +02:00
dependabot[bot] fcfe099aab build(deps): bump mockito from 5.12.0 to 5.13.0
Bumps `mockito` from 5.12.0 to 5.13.0.

Updates `org.mockito:mockito-core` from 5.12.0 to 5.13.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.12.0...v5.13.0)

Updates `org.mockito:mockito-junit-jupiter` from 5.12.0 to 5.13.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.12.0...v5.13.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-14 00:00:21 +02:00
dependabot[bot] d1d21b1cdb build(deps): bump io.vertx:vertx-grpc from 4.5.9 to 4.5.10
Bumps io.vertx:vertx-grpc from 4.5.9 to 4.5.10.

---
updated-dependencies:
- dependency-name: io.vertx:vertx-grpc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-05 00:28:47 +02:00
dependabot[bot] 066d92cf95 build(deps): bump com.google.guava:guava from 33.2.1-jre to 33.3.0-jre
Bumps [com.google.guava:guava](https://github.com/google/guava) from 33.2.1-jre to 33.3.0-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-20 15:51:32 +02:00
Luca Burgazzoli 676bad3dd5
build(deps): bump axion-release-plugin to v1.18.4 2024-08-16 14:59:57 +02:00
Luca Burgazzoli a8f4ab8f20
chore: update gradle from v8.9 to v8.10 2024-08-16 14:24:12 +02:00
Luca Burgazzoli 195032ee2d
chore: fix quay container image 2024-08-16 14:21:39 +02:00
dependabot[bot] 958ed92b92 build(deps): bump org.junit.jupiter:junit-jupiter from 5.10.3 to 5.11.0
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.10.3 to 5.11.0.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.10.3...r5.11.0)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-16 12:18:34 +02:00
dependabot[bot] 9362dc8db3 build(deps): bump org.slf4j:slf4j-api from 2.0.15 to 2.0.16
Bumps org.slf4j:slf4j-api from 2.0.15 to 2.0.16.

---
updated-dependencies:
- dependency-name: org.slf4j:slf4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-16 12:18:17 +02:00
dependabot[bot] a5e1de0a88 build(deps): bump errorprone from 2.29.2 to 2.30.0
Bumps `errorprone` from 2.29.2 to 2.30.0.

Updates `com.google.errorprone:error_prone_core` from 2.29.2 to 2.30.0
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.29.2...v2.30.0)

Updates `com.google.errorprone:error_prone_annotations` from 2.29.2 to 2.30.0
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.29.2...v2.30.0)

---
updated-dependencies:
- dependency-name: com.google.errorprone:error_prone_core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.errorprone:error_prone_annotations
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-16 12:18:09 +02:00
dependabot[bot] 7c6fbcc8ce build(deps): bump org.apache.commons:commons-compress
Bumps org.apache.commons:commons-compress from 1.26.2 to 1.27.0.

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-compress
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-16 12:18:00 +02:00
dependabot[bot] 4bbc3bb65f build(deps): bump org.slf4j:slf4j-api from 2.0.14 to 2.0.15
Bumps org.slf4j:slf4j-api from 2.0.14 to 2.0.15.

---
updated-dependencies:
- dependency-name: org.slf4j:slf4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-09 16:50:35 +02:00
Luca Burgazzoli e78aa2bad2 chore: switch to quay as gcr is deprecated
see https://cloud.google.com/container-registry/docs/deprecations/container-registry-deprecation

Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2024-08-09 09:34:35 +02:00
Luca Burgazzoli 3bc741013a
chore(ci): improve stale action 2024-08-08 13:47:25 +02:00
Luca Burgazzoli d70df1c279 chore(ci): improve issue template 2024-08-08 13:21:21 +02:00
Luca Burgazzoli 612ecbb4dd build(deps): bump grpc from 1.65.1 to 1.66.0 2024-08-08 13:21:21 +02:00
Luca Burgazzoli 2e7fdbf264 chore(ci): improve stale action 2024-08-08 13:21:21 +02:00
linghengqian 7fc1e0078b jetcd-launcher: allow starting Etcd Container via non-root user on Linux
For #1310

Signed-off-by: linghengqian <linghengqian@outlook.com>
2024-08-08 12:55:48 +02:00
dependabot[bot] b51258e4a7 build(deps): bump org.awaitility:awaitility from 4.2.1 to 4.2.2
Bumps [org.awaitility:awaitility](https://github.com/awaitility/awaitility) from 4.2.1 to 4.2.2.
- [Changelog](https://github.com/awaitility/awaitility/blob/master/changelog.txt)
- [Commits](https://github.com/awaitility/awaitility/compare/awaitility-4.2.1...awaitility-4.2.2)

---
updated-dependencies:
- dependency-name: org.awaitility:awaitility
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-08 08:25:27 +02:00
dependabot[bot] 05d2fda634 build(deps): bump org.slf4j:slf4j-api from 2.0.13 to 2.0.14
Bumps org.slf4j:slf4j-api from 2.0.13 to 2.0.14.

---
updated-dependencies:
- dependency-name: org.slf4j:slf4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-08 08:25:19 +02:00
Luca Burgazzoli 639bb27d21 build(deps): bump axion-release-plugin to v1.18.3 2024-08-05 16:32:35 +02:00
Luca Burgazzoli 43bc2614c2 build(deps): bump testcontainers to v1.20.1 2024-08-05 16:32:35 +02:00
Luca Burgazzoli 7ffe8f6c37 build(deps): bump test-retry-gradle-plugin to v1.5.10 2024-08-05 16:32:35 +02:00
Luca Burgazzoli 548b810883 build(deps): bump vertx to 4.5.9 2024-08-05 16:32:35 +02:00
Luca Burgazzoli 6bbb9836a0 build(deps): bump gradle to v8.9 2024-08-05 16:32:35 +02:00
dependabot[bot] 278d3afb16 build(deps): bump grpc from 1.64.0 to 1.65.1
Bumps `grpc` from 1.64.0 to 1.65.1.

Updates `io.grpc:grpc-core` from 1.64.0 to 1.65.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.64.0...v1.65.1)

Updates `io.grpc:grpc-netty` from 1.64.0 to 1.65.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.64.0...v1.65.1)

Updates `io.grpc:grpc-protobuf` from 1.64.0 to 1.65.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.64.0...v1.65.1)

Updates `io.grpc:grpc-stub` from 1.64.0 to 1.65.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.64.0...v1.65.1)

Updates `io.grpc:grpc-grpclb` from 1.64.0 to 1.65.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.64.0...v1.65.1)

Updates `io.grpc:grpc-inprocess` from 1.64.0 to 1.65.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.64.0...v1.65.1)

Updates `io.grpc:grpc-util` from 1.64.0 to 1.65.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.64.0...v1.65.1)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-netty
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-stub
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-grpclb
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-inprocess
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-util
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-05 16:09:02 +02:00
Luca Burgazzoli a2e3015e6e build(deps): bump errorprone from 2.28.0 to 2.29.2
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2024-08-05 15:51:44 +02:00
dependabot[bot] ae02549362 build(deps): bump org.assertj:assertj-core from 3.26.0 to 3.26.3
Bumps [org.assertj:assertj-core](https://github.com/assertj/assertj) from 3.26.0 to 3.26.3.
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.26.0...assertj-build-3.26.3)

---
updated-dependencies:
- dependency-name: org.assertj:assertj-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-05 15:33:25 +02:00
Lan Liang c008ba5603 Update etcd container version to 3.5.14.
Signed-off-by: Lan Liang <gcslyp@gmail.com>
2024-08-05 14:29:24 +02:00
dependabot[bot] 9cf296c654 build(deps): bump io.rest-assured:rest-assured from 5.4.0 to 5.5.0
Bumps [io.rest-assured:rest-assured](https://github.com/rest-assured/rest-assured) from 5.4.0 to 5.5.0.
- [Changelog](https://github.com/rest-assured/rest-assured/blob/master/changelog.txt)
- [Commits](https://github.com/rest-assured/rest-assured/compare/rest-assured-5.4.0...rest-assured-5.5.0)

---
updated-dependencies:
- dependency-name: io.rest-assured:rest-assured
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-05 14:27:28 +02:00
dependabot[bot] 36a5738f8d build(deps): bump org.junit.jupiter:junit-jupiter from 5.10.2 to 5.10.3
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.10.2 to 5.10.3.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.10.2...r5.10.3)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-05 14:26:59 +02:00
dependabot[bot] 4d93e3b8fa build(deps): bump errorprone from 2.27.1 to 2.28.0
Bumps `errorprone` from 2.27.1 to 2.28.0.

Updates `com.google.errorprone:error_prone_core` from 2.27.1 to 2.28.0
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.27.1...v2.28.0)

Updates `com.google.errorprone:error_prone_annotations` from 2.27.1 to 2.28.0
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.27.1...v2.28.0)

---
updated-dependencies:
- dependency-name: com.google.errorprone:error_prone_core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.errorprone:error_prone_annotations
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-12 12:06:30 +02:00
dependabot[bot] 185ee008e0 build(deps): bump com.google.guava:guava from 33.2.0-jre to 33.2.1-jre
Bumps [com.google.guava:guava](https://github.com/google/guava) from 33.2.0-jre to 33.2.1-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-03 21:00:53 +02:00
Luca Burgazzoli e878e1d4b1 reproducible build 2024-05-28 20:46:31 +02:00
Luca Burgazzoli 58c80dbbb1 Update deps
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2024-05-28 20:40:43 +02:00
dependabot[bot] aa9ebaa9d4 build(deps): bump org.assertj:assertj-core from 3.25.3 to 3.26.0
Bumps [org.assertj:assertj-core](https://github.com/assertj/assertj) from 3.25.3 to 3.26.0.
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.25.3...assertj-build-3.26.0)

---
updated-dependencies:
- dependency-name: org.assertj:assertj-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-28 14:30:21 +02:00
dependabot[bot] 26dd155e2f build(deps): bump org.apache.commons:commons-compress
Bumps org.apache.commons:commons-compress from 1.26.1 to 1.26.2.

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-compress
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-28 14:30:13 +02:00
dependabot[bot] 8002f5a746 build(deps): bump io.vertx:vertx-grpc from 4.5.7 to 4.5.8
Bumps io.vertx:vertx-grpc from 4.5.7 to 4.5.8.

---
updated-dependencies:
- dependency-name: io.vertx:vertx-grpc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-28 14:29:58 +02:00
dependabot[bot] 6b22bd6770 build(deps): bump grpc from 1.63.0 to 1.64.0
Bumps `grpc` from 1.63.0 to 1.64.0.

Updates `io.grpc:grpc-core` from 1.63.0 to 1.64.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.63.0...v1.64.0)

Updates `io.grpc:grpc-netty` from 1.63.0 to 1.64.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.63.0...v1.64.0)

Updates `io.grpc:grpc-protobuf` from 1.63.0 to 1.64.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.63.0...v1.64.0)

Updates `io.grpc:grpc-stub` from 1.63.0 to 1.64.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.63.0...v1.64.0)

Updates `io.grpc:grpc-grpclb` from 1.63.0 to 1.64.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.63.0...v1.64.0)

Updates `io.grpc:grpc-inprocess` from 1.63.0 to 1.64.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.63.0...v1.64.0)

Updates `io.grpc:grpc-util` from 1.63.0 to 1.64.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.63.0...v1.64.0)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-netty
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-stub
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-grpclb
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-inprocess
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-util
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-15 19:25:42 +02:00
dependabot[bot] 25096da986 build(deps): bump mockito from 5.11.0 to 5.12.0
Bumps `mockito` from 5.11.0 to 5.12.0.

Updates `org.mockito:mockito-core` from 5.11.0 to 5.12.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.11.0...v5.12.0)

Updates `org.mockito:mockito-junit-jupiter` from 5.11.0 to 5.12.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.11.0...v5.12.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-14 14:05:40 +02:00
dependabot[bot] f58a8ff98e build(deps): bump org.testcontainers:testcontainers
Bumps [org.testcontainers:testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.19.7 to 1.19.8.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.19.7...1.19.8)

---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-14 14:05:30 +02:00
dependabot[bot] d7d6cec501 build(deps): bump info.picocli:picocli from 4.7.5 to 4.7.6
Bumps [info.picocli:picocli](https://github.com/remkop/picocli) from 4.7.5 to 4.7.6.
- [Release notes](https://github.com/remkop/picocli/releases)
- [Changelog](https://github.com/remkop/picocli/blob/main/RELEASE-NOTES.md)
- [Commits](https://github.com/remkop/picocli/compare/v4.7.5...v4.7.6)

---
updated-dependencies:
- dependency-name: info.picocli:picocli
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-14 14:05:20 +02:00
dependabot[bot] 83946aabe5 build(deps): bump com.google.guava:guava from 33.1.0-jre to 33.2.0-jre
Bumps [com.google.guava:guava](https://github.com/google/guava) from 33.1.0-jre to 33.2.0-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-14 14:05:08 +02:00
dependabot[bot] 84d55279f3 build(deps): bump errorprone from 2.27.0 to 2.27.1
Bumps `errorprone` from 2.27.0 to 2.27.1.

Updates `com.google.errorprone:error_prone_core` from 2.27.0 to 2.27.1
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.27.0...v2.27.1)

Updates `com.google.errorprone:error_prone_annotations` from 2.27.0 to 2.27.1
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.27.0...v2.27.1)

---
updated-dependencies:
- dependency-name: com.google.errorprone:error_prone_core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.google.errorprone:error_prone_annotations
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-14 14:04:51 +02:00
Giri Ramasamy 6d375c889d watcher: Expose isClosed method
Signed-off-by: Giri Ramasamy <46867712+giri-vsr@users.noreply.github.com>
2024-05-14 14:04:27 +02:00
dependabot[bot] cdd5cd9e17 build(deps): bump errorprone from 2.26.1 to 2.27.0
Bumps `errorprone` from 2.26.1 to 2.27.0.

Updates `com.google.errorprone:error_prone_core` from 2.26.1 to 2.27.0
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.26.1...v2.27.0)

Updates `com.google.errorprone:error_prone_annotations` from 2.26.1 to 2.27.0
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.26.1...v2.27.0)

---
updated-dependencies:
- dependency-name: com.google.errorprone:error_prone_core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.errorprone:error_prone_annotations
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-29 11:19:51 +02:00
Luca Burgazzoli ff17ffc43d
chore: update to gradle 8.7 2024-04-17 09:56:39 +02:00
dependabot[bot] 3a00414754 build(deps): bump org.slf4j:slf4j-api from 2.0.12 to 2.0.13
Bumps org.slf4j:slf4j-api from 2.0.12 to 2.0.13.

---
updated-dependencies:
- dependency-name: org.slf4j:slf4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-16 09:10:06 +02:00
dependabot[bot] 5f133eae4d build(deps): bump commons-io:commons-io from 2.16.0 to 2.16.1
Bumps commons-io:commons-io from 2.16.0 to 2.16.1.

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-16 09:09:52 +02:00
dependabot[bot] 64852f4808 build(deps): bump grpc from 1.62.2 to 1.63.0
Bumps `grpc` from 1.62.2 to 1.63.0.

Updates `io.grpc:grpc-core` from 1.62.2 to 1.63.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.62.2...v1.63.0)

Updates `io.grpc:grpc-netty` from 1.62.2 to 1.63.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.62.2...v1.63.0)

Updates `io.grpc:grpc-protobuf` from 1.62.2 to 1.63.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.62.2...v1.63.0)

Updates `io.grpc:grpc-stub` from 1.62.2 to 1.63.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.62.2...v1.63.0)

Updates `io.grpc:grpc-grpclb` from 1.62.2 to 1.63.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.62.2...v1.63.0)

Updates `io.grpc:grpc-inprocess` from 1.62.2 to 1.63.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.62.2...v1.63.0)

Updates `io.grpc:grpc-util` from 1.62.2 to 1.63.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.62.2...v1.63.0)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-netty
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-stub
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-grpclb
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-inprocess
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-util
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-08 14:35:29 +02:00
rmarian c7cb8c6657 core: update errors retryable condition.
Format affected source files.

Fixes etcd-io#1344.

Signed-off-by: rmarian <marianradu12@gmail.com>
2024-04-03 08:03:37 +02:00
rmarian 8e1749e116 core: update errors retryable condition.
Retry request in case of auth store revision old error from server

Fixes #1344.

Signed-off-by: rmarian <marianradu12@gmail.com>
2024-04-03 08:03:37 +02:00
dependabot[bot] 8090e42c1e build(deps): bump commons-io:commons-io from 2.15.1 to 2.16.0
Bumps commons-io:commons-io from 2.15.1 to 2.16.0.

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-30 17:32:15 +01:00
dependabot[bot] f233eede35 build(deps): bump io.vertx:vertx-grpc from 4.5.5 to 4.5.7
Bumps io.vertx:vertx-grpc from 4.5.5 to 4.5.7.

---
updated-dependencies:
- dependency-name: io.vertx:vertx-grpc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-30 17:32:06 +01:00
dependabot[bot] 9130dcd292 build(deps): bump org.awaitility:awaitility from 4.2.0 to 4.2.1
Bumps [org.awaitility:awaitility](https://github.com/awaitility/awaitility) from 4.2.0 to 4.2.1.
- [Changelog](https://github.com/awaitility/awaitility/blob/master/changelog.txt)
- [Commits](https://github.com/awaitility/awaitility/compare/awaitility-4.2.0...awaitility-4.2.1)

---
updated-dependencies:
- dependency-name: org.awaitility:awaitility
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-17 19:24:12 +01:00
Cristian Ferretti 2398ebd24c Retry auth failures and require leader in ElectionImpl.
Signed-off-by: Cristian Ferretti <jcferretti2020@gmail.com>
2024-03-17 18:59:00 +01:00
dependabot[bot] 2cd129352a build(deps): bump io.vertx:vertx-grpc from 4.5.4 to 4.5.5
Bumps io.vertx:vertx-grpc from 4.5.4 to 4.5.5.

---
updated-dependencies:
- dependency-name: io.vertx:vertx-grpc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-15 16:29:57 +01:00
dependabot[bot] f5d9aa7ba5 build(deps): bump com.google.guava:guava from 33.0.0-jre to 33.1.0-jre
Bumps [com.google.guava:guava](https://github.com/google/guava) from 33.0.0-jre to 33.1.0-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-15 08:45:43 +01:00
dependabot[bot] d46860b85e build(deps): bump errorprone from 2.25.0 to 2.26.1
Bumps `errorprone` from 2.25.0 to 2.26.1.

Updates `com.google.errorprone:error_prone_core` from 2.25.0 to 2.26.1
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.25.0...v2.26.1)

Updates `com.google.errorprone:error_prone_annotations` from 2.25.0 to 2.26.1
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.25.0...v2.26.1)

---
updated-dependencies:
- dependency-name: com.google.errorprone:error_prone_core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.errorprone:error_prone_annotations
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-15 08:44:47 +01:00
dependabot[bot] 51f38b50a1 build(deps): bump org.apache.commons:commons-compress
Bumps org.apache.commons:commons-compress from 1.26.0 to 1.26.1.

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-compress
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-12 08:52:27 +01:00
dependabot[bot] 3625d1e505 build(deps): bump log4j from 2.23.0 to 2.23.1
Bumps `log4j` from 2.23.0 to 2.23.1.

Updates `org.apache.logging.log4j:log4j-api` from 2.23.0 to 2.23.1

Updates `org.apache.logging.log4j:log4j-core` from 2.23.0 to 2.23.1

Updates `org.apache.logging.log4j:log4j-slf4j2-impl` from 2.23.0 to 2.23.1

Updates `org.apache.logging.log4j:log4j-1.2-api` from 2.23.0 to 2.23.1

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-slf4j2-impl
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-1.2-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-12 08:52:17 +01:00
dependabot[bot] 1054fc22a5 build(deps): bump org.testcontainers:testcontainers
Bumps [org.testcontainers:testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.19.6 to 1.19.7.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.19.6...1.19.7)

---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-09 08:59:39 +01:00
tunefun 948aa67cc4 election,lease,maintenance,watch: Register handlers before request
Fixes #1308

Signed-off-by: tunefun <965728225@qq.com>
2024-03-09 08:59:15 +01:00
Cristian Ferretti ae0e54035b Switch default load balancer policy to round_robin 2024-03-09 08:51:03 +01:00
tunefun 10b07f508c lease: Exceptions of lease keepAlive can be perceived
Fixes #1322

Signed-off-by: tunefun <965728225@qq.com>
2024-03-05 14:11:51 +01:00
dependabot[bot] 4274990a7a build(deps): bump mockito from 5.10.0 to 5.11.0
Bumps `mockito` from 5.10.0 to 5.11.0.

Updates `org.mockito:mockito-core` from 5.10.0 to 5.11.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.10.0...v5.11.0)

Updates `org.mockito:mockito-junit-jupiter` from 5.10.0 to 5.11.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.10.0...v5.11.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-05 09:56:06 +01:00
dependabot[bot] 47ca2ba98c build(deps): bump grpc from 1.61.1 to 1.62.2
Bumps `grpc` from 1.61.1 to 1.62.2.

Updates `io.grpc:grpc-core` from 1.61.1 to 1.62.2
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.61.1...v1.62.2)

Updates `io.grpc:grpc-netty` from 1.61.1 to 1.62.2
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.61.1...v1.62.2)

Updates `io.grpc:grpc-protobuf` from 1.61.1 to 1.62.2
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.61.1...v1.62.2)

Updates `io.grpc:grpc-stub` from 1.61.1 to 1.62.2
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.61.1...v1.62.2)

Updates `io.grpc:grpc-grpclb` from 1.61.1 to 1.62.2
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.61.1...v1.62.2)

Updates `io.grpc:grpc-inprocess` from 1.61.1 to 1.62.2
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.61.1...v1.62.2)

Updates `io.grpc:grpc-util` from 1.61.1 to 1.62.2
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.61.1...v1.62.2)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-netty
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-stub
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-grpclb
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-inprocess
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-util
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-05 09:55:57 +01:00
dependabot[bot] c184f37c36 build(deps): bump log4j from 2.22.1 to 2.23.0
Bumps `log4j` from 2.22.1 to 2.23.0.

Updates `org.apache.logging.log4j:log4j-api` from 2.22.1 to 2.23.0

Updates `org.apache.logging.log4j:log4j-core` from 2.22.1 to 2.23.0

Updates `org.apache.logging.log4j:log4j-slf4j2-impl` from 2.22.1 to 2.23.0

Updates `org.apache.logging.log4j:log4j-1.2-api` from 2.22.1 to 2.23.0

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-slf4j2-impl
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-1.2-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-22 23:56:23 +01:00
dependabot[bot] dbf9761486 build(deps): bump errorprone from 2.24.1 to 2.25.0
Bumps `errorprone` from 2.24.1 to 2.25.0.

Updates `com.google.errorprone:error_prone_core` from 2.24.1 to 2.25.0
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.24.1...v2.25.0)

Updates `com.google.errorprone:error_prone_annotations` from 2.24.1 to 2.25.0
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.24.1...v2.25.0)

---
updated-dependencies:
- dependency-name: com.google.errorprone:error_prone_core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.errorprone:error_prone_annotations
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-22 23:56:10 +01:00
dependabot[bot] ee171cd43d build(deps): bump org.apache.commons:commons-compress
Bumps org.apache.commons:commons-compress from 1.25.0 to 1.26.0.

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-compress
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-22 23:56:01 +01:00
dependabot[bot] cb77344660 build(deps): bump org.testcontainers:testcontainers
Bumps [org.testcontainers:testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.19.5 to 1.19.6.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.19.5...1.19.6)

---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-22 23:54:20 +01:00
dependabot[bot] 77bb3a9afd build(deps): bump org.testcontainers:testcontainers
Bumps [org.testcontainers:testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.19.4 to 1.19.5.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.19.4...1.19.5)

---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-09 14:28:34 +01:00
dependabot[bot] 0fa9f1e4e2 build(deps): bump org.junit.jupiter:junit-jupiter from 5.10.1 to 5.10.2
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.10.1 to 5.10.2.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.10.1...r5.10.2)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-09 14:08:53 +01:00
dependabot[bot] 25ac1996bd build(deps): bump org.slf4j:slf4j-api from 2.0.11 to 2.0.12
Bumps org.slf4j:slf4j-api from 2.0.11 to 2.0.12.

---
updated-dependencies:
- dependency-name: org.slf4j:slf4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-09 14:08:46 +01:00
dependabot[bot] 5226f2c676 build(deps): bump io.vertx:vertx-grpc from 4.5.1 to 4.5.3
Bumps io.vertx:vertx-grpc from 4.5.1 to 4.5.3.

---
updated-dependencies:
- dependency-name: io.vertx:vertx-grpc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-07 07:44:51 +01:00
dependabot[bot] 163d9504ca build(deps): bump org.assertj:assertj-core from 3.25.1 to 3.25.3
Bumps [org.assertj:assertj-core](https://github.com/assertj/assertj) from 3.25.1 to 3.25.3.
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.25.1...assertj-build-3.25.3)

---
updated-dependencies:
- dependency-name: org.assertj:assertj-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-07 07:44:43 +01:00
dependabot[bot] 78a4939b02 build(deps): bump grpc from 1.61.0 to 1.61.1
Bumps `grpc` from 1.61.0 to 1.61.1.

Updates `io.grpc:grpc-core` from 1.61.0 to 1.61.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.61.0...v1.61.1)

Updates `io.grpc:grpc-netty` from 1.61.0 to 1.61.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.61.0...v1.61.1)

Updates `io.grpc:grpc-protobuf` from 1.61.0 to 1.61.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.61.0...v1.61.1)

Updates `io.grpc:grpc-stub` from 1.61.0 to 1.61.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.61.0...v1.61.1)

Updates `io.grpc:grpc-grpclb` from 1.61.0 to 1.61.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.61.0...v1.61.1)

Updates `io.grpc:grpc-inprocess` from 1.61.0 to 1.61.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.61.0...v1.61.1)

Updates `io.grpc:grpc-util` from 1.61.0 to 1.61.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.61.0...v1.61.1)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-netty
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-stub
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-grpclb
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-inprocess
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-util
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-07 07:44:34 +01:00
dependabot[bot] 8d9e0004e8 build(deps): bump mockito from 5.9.0 to 5.10.0
Bumps `mockito` from 5.9.0 to 5.10.0.

Updates `org.mockito:mockito-core` from 5.9.0 to 5.10.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.9.0...v5.10.0)

Updates `org.mockito:mockito-junit-jupiter` from 5.9.0 to 5.10.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.9.0...v5.10.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-07 07:44:25 +01:00
dependabot[bot] 3ca756983c build(deps): bump org.testcontainers:testcontainers
Bumps [org.testcontainers:testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.19.3 to 1.19.4.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.19.3...1.19.4)

---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-07 07:44:14 +01:00
dependabot[bot] 7891e67977 build(deps): bump actions/dependency-review-action from 3 to 4
Bumps [actions/dependency-review-action](https://github.com/actions/dependency-review-action) from 3 to 4.
- [Release notes](https://github.com/actions/dependency-review-action/releases)
- [Commits](https://github.com/actions/dependency-review-action/compare/v3...v4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-07 07:44:02 +01:00
Lan Liang 47598152b3 Update compile version to java11.
Signed-off-by: Lan Liang <gcslyp@gmail.com>
2024-01-16 09:28:22 +01:00
dependabot[bot] c916beff8c build(deps): bump mockito from 5.8.0 to 5.9.0
Bumps `mockito` from 5.8.0 to 5.9.0.

Updates `org.mockito:mockito-core` from 5.8.0 to 5.9.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.8.0...v5.9.0)

Updates `org.mockito:mockito-junit-jupiter` from 5.8.0 to 5.9.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.8.0...v5.9.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-15 21:36:06 +01:00
dependabot[bot] d55aa8923c build(deps): bump grpc from 1.60.1 to 1.61.0
Bumps `grpc` from 1.60.1 to 1.61.0.

Updates `io.grpc:grpc-core` from 1.60.1 to 1.61.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.60.1...v1.61.0)

Updates `io.grpc:grpc-netty` from 1.60.1 to 1.61.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.60.1...v1.61.0)

Updates `io.grpc:grpc-protobuf` from 1.60.1 to 1.61.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.60.1...v1.61.0)

Updates `io.grpc:grpc-stub` from 1.60.1 to 1.61.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.60.1...v1.61.0)

Updates `io.grpc:grpc-grpclb` from 1.60.1 to 1.61.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.60.1...v1.61.0)

Updates `io.grpc:grpc-inprocess` from 1.60.1 to 1.61.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.60.1...v1.61.0)

Updates `io.grpc:grpc-util` from 1.60.1 to 1.61.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.60.1...v1.61.0)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-netty
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-stub
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-grpclb
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-inprocess
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-util
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-12 20:14:49 +01:00
dependabot[bot] 85a9a54c3f build(deps): bump errorprone from 2.24.0 to 2.24.1
Bumps `errorprone` from 2.24.0 to 2.24.1.

Updates `com.google.errorprone:error_prone_core` from 2.24.0 to 2.24.1
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.24.0...v2.24.1)

Updates `com.google.errorprone:error_prone_annotations` from 2.24.0 to 2.24.1
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.24.0...v2.24.1)

---
updated-dependencies:
- dependency-name: com.google.errorprone:error_prone_core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.google.errorprone:error_prone_annotations
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-09 21:11:58 +01:00
dependabot[bot] 287a62d2db build(deps): bump log4j from 2.22.0 to 2.22.1
Bumps `log4j` from 2.22.0 to 2.22.1.

Updates `org.apache.logging.log4j:log4j-api` from 2.22.0 to 2.22.1

Updates `org.apache.logging.log4j:log4j-core` from 2.22.0 to 2.22.1

Updates `org.apache.logging.log4j:log4j-slf4j2-impl` from 2.22.0 to 2.22.1

Updates `org.apache.logging.log4j:log4j-1.2-api` from 2.22.0 to 2.22.1

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-slf4j2-impl
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-1.2-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-08 20:51:09 +01:00
dependabot[bot] c0114ef977 build(deps): bump org.slf4j:slf4j-api from 2.0.9 to 2.0.11
Bumps org.slf4j:slf4j-api from 2.0.9 to 2.0.11.

---
updated-dependencies:
- dependency-name: org.slf4j:slf4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-08 20:36:03 +01:00
dependabot[bot] 312cf24163 build(deps): bump org.assertj:assertj-core from 3.24.2 to 3.25.1
Bumps [org.assertj:assertj-core](https://github.com/assertj/assertj) from 3.24.2 to 3.25.1.
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.24.2...assertj-build-3.25.1)

---
updated-dependencies:
- dependency-name: org.assertj:assertj-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-08 20:35:06 +01:00
dependabot[bot] 4c9c705731 build(deps): bump grpc from 1.60.0 to 1.60.1
Bumps `grpc` from 1.60.0 to 1.60.1.

Updates `io.grpc:grpc-core` from 1.60.0 to 1.60.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.60.0...v1.60.1)

Updates `io.grpc:grpc-netty` from 1.60.0 to 1.60.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.60.0...v1.60.1)

Updates `io.grpc:grpc-protobuf` from 1.60.0 to 1.60.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.60.0...v1.60.1)

Updates `io.grpc:grpc-stub` from 1.60.0 to 1.60.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.60.0...v1.60.1)

Updates `io.grpc:grpc-grpclb` from 1.60.0 to 1.60.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.60.0...v1.60.1)

Updates `io.grpc:grpc-inprocess` from 1.60.0 to 1.60.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.60.0...v1.60.1)

Updates `io.grpc:grpc-util` from 1.60.0 to 1.60.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.60.0...v1.60.1)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-netty
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-stub
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-grpclb
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-inprocess
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-util
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-08 20:34:42 +01:00
dependabot[bot] 3820950960 build(deps): bump errorprone from 2.23.0 to 2.24.0
Bumps `errorprone` from 2.23.0 to 2.24.0.

Updates `com.google.errorprone:error_prone_core` from 2.23.0 to 2.24.0
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.23.0...v2.24.0)

Updates `com.google.errorprone:error_prone_annotations` from 2.23.0 to 2.24.0
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.23.0...v2.24.0)

---
updated-dependencies:
- dependency-name: com.google.errorprone:error_prone_core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.errorprone:error_prone_annotations
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-08 20:34:00 +01:00
Luca Burgazzoli 4bd5d5a21c
Update README 2023-12-19 20:47:32 +01:00
dependabot[bot] 93ca59af7d build(deps): bump com.google.guava:guava from 32.1.3-jre to 33.0.0-jre
Bumps [com.google.guava:guava](https://github.com/google/guava) from 32.1.3-jre to 33.0.0-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-19 20:24:30 +01:00
Luca Burgazzoli 9411dc2dc1 update dependencies
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-12-15 09:11:41 +01:00
dependabot[bot] ca13d1a205 build(deps): bump io.rest-assured:rest-assured from 5.3.2 to 5.4.0
Bumps [io.rest-assured:rest-assured](https://github.com/rest-assured/rest-assured) from 5.3.2 to 5.4.0.
- [Changelog](https://github.com/rest-assured/rest-assured/blob/master/changelog.txt)
- [Commits](https://github.com/rest-assured/rest-assured/commits/rest-assured-5.4.0)

---
updated-dependencies:
- dependency-name: io.rest-assured:rest-assured
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-14 09:20:14 +01:00
dependabot[bot] 433ea80345 build(deps): bump actions/stale from 8 to 9
Bumps [actions/stale](https://github.com/actions/stale) from 8 to 9.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v8...v9)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-14 08:59:12 +01:00
Giri Ramasamy 3d662958c5 watcher: Register Exception Handler before watch request
Signed-off-by: Giri Ramasamy <46867712+giri-vsr@users.noreply.github.com>
2023-12-14 08:44:31 +01:00
John Jiang e3c0a46349 build: Upgrade Gradle to 8.5
Signed-off-by: John Jiang <john.sha.jiang@gmail.com>
2023-12-06 09:45:17 +01:00
dependabot[bot] edec87e344 build(deps): bump commons-io:commons-io from 2.15.0 to 2.15.1
Bumps commons-io:commons-io from 2.15.0 to 2.15.1.

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-06 09:25:50 +01:00
dependabot[bot] 670b6e48a8 build(deps): bump mockito from 5.7.0 to 5.8.0
Bumps `mockito` from 5.7.0 to 5.8.0.

Updates `org.mockito:mockito-core` from 5.7.0 to 5.8.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.7.0...v5.8.0)

Updates `org.mockito:mockito-junit-jupiter` from 5.7.0 to 5.8.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.7.0...v5.8.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-06 09:25:43 +01:00
dependabot[bot] 60eb6b2ccb build(deps): bump grpc from 1.59.0 to 1.60.0
Bumps `grpc` from 1.59.0 to 1.60.0.

Updates `io.grpc:grpc-core` from 1.59.0 to 1.60.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.59.0...v1.60.0)

Updates `io.grpc:grpc-netty` from 1.59.0 to 1.60.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.59.0...v1.60.0)

Updates `io.grpc:grpc-protobuf` from 1.59.0 to 1.60.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.59.0...v1.60.0)

Updates `io.grpc:grpc-stub` from 1.59.0 to 1.60.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.59.0...v1.60.0)

Updates `io.grpc:grpc-grpclb` from 1.59.0 to 1.60.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.59.0...v1.60.0)

Updates `io.grpc:grpc-inprocess` from 1.59.0 to 1.60.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.59.0...v1.60.0)

Updates `io.grpc:grpc-util` from 1.59.0 to 1.60.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.59.0...v1.60.0)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-netty
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-stub
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-grpclb
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-inprocess
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-util
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-06 09:25:27 +01:00
dependabot[bot] 4f7c486dcc build(deps): bump actions/setup-java from 3 to 4
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3 to 4.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v3...v4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-29 20:08:36 +01:00
Nikita Sokolov 436b61ce42 launcher.Etcd.builder().build() should leak no Network.newNetwork()
https://github.com/etcd-io/jetcd/issues/1271
Signed-off-by: Nikita Sokolov <faucct@gmail.com>
2023-11-23 09:11:32 +01:00
dependabot[bot] d20cdf61cf build(deps): bump org.testcontainers:testcontainers
Bumps [org.testcontainers:testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.19.2 to 1.19.3.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.19.2...1.19.3)

---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-21 21:52:24 +01:00
dependabot[bot] ff57964889 build(deps): bump org.apache.commons:commons-compress
Bumps org.apache.commons:commons-compress from 1.24.0 to 1.25.0.

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-compress
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-20 19:40:03 +01:00
dependabot[bot] 68ec7eea55 build(deps): bump io.vertx:vertx-grpc from 4.4.6 to 4.5.0
Bumps io.vertx:vertx-grpc from 4.4.6 to 4.5.0.

---
updated-dependencies:
- dependency-name: io.vertx:vertx-grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-20 19:39:55 +01:00
dependabot[bot] b825daaab2 build(deps): bump org.testcontainers:testcontainers
Bumps [org.testcontainers:testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.19.1 to 1.19.2.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.19.1...1.19.2)

---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-20 19:39:44 +01:00
dependabot[bot] 40c7a2a6f7 build(deps): bump log4j from 2.21.1 to 2.22.0
Bumps `log4j` from 2.21.1 to 2.22.0.

Updates `org.apache.logging.log4j:log4j-api` from 2.21.1 to 2.22.0

Updates `org.apache.logging.log4j:log4j-core` from 2.21.1 to 2.22.0

Updates `org.apache.logging.log4j:log4j-slf4j2-impl` from 2.21.1 to 2.22.0

Updates `org.apache.logging.log4j:log4j-1.2-api` from 2.21.1 to 2.22.0

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-slf4j2-impl
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-1.2-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-20 19:39:37 +01:00
dependabot[bot] 9a7a98a2ba build(deps): bump mockito from 5.6.0 to 5.7.0
Bumps `mockito` from 5.6.0 to 5.7.0.

Updates `org.mockito:mockito-core` from 5.6.0 to 5.7.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.6.0...v5.7.0)

Updates `org.mockito:mockito-junit-jupiter` from 5.6.0 to 5.7.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.6.0...v5.7.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-06 20:26:21 +01:00
Lan Liang 20815675e0 etcd: update to 3.5.10
Signed-off-by: Lan Liang <gcslyp@gmail.com>
2023-11-06 20:26:12 +01:00
dependabot[bot] 2c3027e23a build(deps): bump org.junit.jupiter:junit-jupiter from 5.10.0 to 5.10.1
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.10.0 to 5.10.1.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.10.0...r5.10.1)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-06 20:25:58 +01:00
dependabot[bot] ce674679bc build(deps): bump commons-io:commons-io from 2.14.0 to 2.15.0
Bumps commons-io:commons-io from 2.14.0 to 2.15.0.

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-26 20:37:25 +02:00
dependabot[bot] c51adfb748 build(deps): bump log4j from 2.21.0 to 2.21.1
Bumps `log4j` from 2.21.0 to 2.21.1.

Updates `org.apache.logging.log4j:log4j-api` from 2.21.0 to 2.21.1

Updates `org.apache.logging.log4j:log4j-core` from 2.21.0 to 2.21.1

Updates `org.apache.logging.log4j:log4j-slf4j2-impl` from 2.21.0 to 2.21.1

Updates `org.apache.logging.log4j:log4j-1.2-api` from 2.21.0 to 2.21.1

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-slf4j2-impl
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-1.2-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-24 20:13:03 +02:00
Luca Burgazzoli 31a60ae3cd The 0.7.6 version does not throw an exception when keepAliveOnce failed #1254
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-10-23 14:26:17 +02:00
dependabot[bot] 838b69c61d build(deps): bump grpc from 1.58.0 to 1.59.0
Bumps `grpc` from 1.58.0 to 1.59.0.

Updates `io.grpc:grpc-core` from 1.58.0 to 1.59.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.58.0...v1.59.0)

Updates `io.grpc:grpc-netty` from 1.58.0 to 1.59.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.58.0...v1.59.0)

Updates `io.grpc:grpc-protobuf` from 1.58.0 to 1.59.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.58.0...v1.59.0)

Updates `io.grpc:grpc-stub` from 1.58.0 to 1.59.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.58.0...v1.59.0)

Updates `io.grpc:grpc-grpclb` from 1.58.0 to 1.59.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.58.0...v1.59.0)

Updates `io.grpc:grpc-inprocess` from 1.58.0 to 1.59.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.58.0...v1.59.0)

Updates `io.grpc:grpc-util` from 1.58.0 to 1.59.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.58.0...v1.59.0)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-netty
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-stub
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-grpclb
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-inprocess
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-util
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-21 12:35:07 +02:00
dependabot[bot] e02e39cc12 build(deps): bump errorprone from 2.22.0 to 2.23.0
Bumps `errorprone` from 2.22.0 to 2.23.0.

Updates `com.google.errorprone:error_prone_core` from 2.22.0 to 2.23.0
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.22.0...v2.23.0)

Updates `com.google.errorprone:error_prone_annotations` from 2.22.0 to 2.23.0
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.22.0...v2.23.0)

---
updated-dependencies:
- dependency-name: com.google.errorprone:error_prone_core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.errorprone:error_prone_annotations
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-21 12:35:00 +02:00
Luca Burgazzoli 71315d7fac chore(deps): bump plugin dependencies
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-10-18 19:30:41 +02:00
James Blair 542eb4b84b Complete migration to owners file.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-10-18 08:03:39 +02:00
dependabot[bot] 9101ac8ded build(deps): bump log4j from 2.20.0 to 2.21.0
Bumps `log4j` from 2.20.0 to 2.21.0.

Updates `org.apache.logging.log4j:log4j-api` from 2.20.0 to 2.21.0

Updates `org.apache.logging.log4j:log4j-core` from 2.20.0 to 2.21.0

Updates `org.apache.logging.log4j:log4j-slf4j2-impl` from 2.20.0 to 2.21.0

Updates `org.apache.logging.log4j:log4j-1.2-api` from 2.20.0 to 2.21.0

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-slf4j2-impl
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-1.2-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-17 20:46:08 +02:00
Luca Burgazzoli 4a95c1c8ab chore(deps): replace the old net.jodah:failsafe with dev.failsafe:failsafe
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-10-16 18:13:46 +02:00
Luca Burgazzoli 9c44c72cfc replace usage of guava with standard java #1207
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-10-16 13:03:21 +02:00
Andreas Skoog 461346e7f4 replace usage of guava with standard java
Avoid adding extra third party dependency 'guava' by replacing methods with equivalent alternatives in standard jdk.

This helps users of etcd since every transitive third party dependency requires more code to be downloaded and might result in dependency conflicts.

fixes #1207

Signed-off-by: Andreas Skoog <andreas.skoog@avanza.se>
2023-10-16 13:03:21 +02:00
Luca Burgazzoli 85b61dff25 temporary disable LeaseMemoryLeakTest::testKeepAliveOnceMemoryLeak as it is flaky 2023-10-16 12:01:31 +02:00
Luca Burgazzoli 26762faa94 Etcd memory leak when using jetcd-core 0.7.6 #1236
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-10-16 10:16:28 +02:00
Luca Burgazzoli 755a69753b chore(launcher): set a writable data dir
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-10-12 15:49:27 +02:00
Luca Burgazzoli e5ff902efa chore(launcher): use health endpoint to wait for continaer to start
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-10-12 15:49:27 +02:00
Luca Burgazzoli 38f3c89b20 chore(launcher): fix deprecated '--logger=capnslog' flag warning
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-10-12 15:49:27 +02:00
Luca Burgazzoli d1c93ceec8 chore(ci): execute actions/dependency-review-action only for PRs
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-10-12 15:49:16 +02:00
Luca Burgazzoli fae598b05b chore: improve ci workflows
- split main and pr workflow
- introduces reusable workflows (build, checks)
- add support for testing agains java 21
- update etcd container to v3.4.27
- update gradle to 8.4.x

Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-10-12 11:09:42 +02:00
Lan Liang 485b67bd8c chore: fix CI for javadoc and check javadoc at CI
Signed-off-by: Lan Liang <gcslyp@gmail.com>
2023-10-12 11:09:33 +02:00
dependabot[bot] da5333dfae build(deps): bump io.vertx:vertx-grpc from 4.4.5 to 4.4.6
Bumps io.vertx:vertx-grpc from 4.4.5 to 4.4.6.

---
updated-dependencies:
- dependency-name: io.vertx:vertx-grpc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-12 10:10:34 +02:00
dependabot[bot] daeec91226 build(deps): bump com.google.guava:guava from 32.1.2-jre to 32.1.3-jre
Bumps [com.google.guava:guava](https://github.com/google/guava) from 32.1.2-jre to 32.1.3-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-12 10:10:26 +02:00
Lan Liang 06711666ec Clean up deprecated method of maintenance
Signed-off-by: Lan Liang <gcslyp@gmail.com>
2023-10-11 15:30:49 +02:00
dependabot[bot] 3bc6e78446 build(deps): bump errorprone from 2.21.1 to 2.22.0
Bumps `errorprone` from 2.21.1 to 2.22.0.

Updates `com.google.errorprone:error_prone_core` from 2.21.1 to 2.22.0
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.21.1...v2.22.0)

Updates `com.google.errorprone:error_prone_annotations` from 2.21.1 to 2.22.0
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.21.1...v2.22.0)

---
updated-dependencies:
- dependency-name: com.google.errorprone:error_prone_core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.errorprone:error_prone_annotations
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-11 12:00:36 +02:00
dependabot[bot] 189f754ade build(deps): bump mockito from 5.5.0 to 5.6.0
Bumps `mockito` from 5.5.0 to 5.6.0.

Updates `org.mockito:mockito-core` from 5.5.0 to 5.6.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.5.0...v5.6.0)

Updates `org.mockito:mockito-junit-jupiter` from 5.5.0 to 5.6.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.5.0...v5.6.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-11 09:43:55 +02:00
dependabot[bot] 81b8cf85e9 build(deps): bump org.testcontainers:testcontainers
Bumps [org.testcontainers:testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.19.0 to 1.19.1.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.19.0...1.19.1)

---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-11 09:43:46 +02:00
dependabot[bot] 5deb9b7cbc build(deps): bump commons-io:commons-io from 2.13.0 to 2.14.0
Bumps commons-io:commons-io from 2.13.0 to 2.14.0.

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-11 09:43:37 +02:00
Lan Liang 226c59b705 Update the code of conduct to cncf, same with etcd.
Signed-off-by: Lan Liang <gcslyp@gmail.com>
2023-10-11 08:59:47 +02:00
Lan Liang 204eb1249e Skip exec chmod command when not mount data directory
Signed-off-by: Lan Liang <gcslyp@gmail.com>
2023-10-11 08:56:28 +02:00
James Blair dff1e79130 Add OWNERS file for jetcd.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-09-20 07:56:12 +02:00
dependabot[bot] 58a4fa5366 build(deps): bump org.apache.commons:commons-compress
Bumps org.apache.commons:commons-compress from 1.23.0 to 1.24.0.

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-compress
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-11 20:50:40 +02:00
John Jiang f1bfe5676b fix: README.MD -> README.md; ube -> uber
Signed-off-by: John Jiang <john.sha.jiang@gmail.com>
2023-09-11 09:12:43 +02:00
John Jiang 38b34a9a99 feat(ci): check trailing whitespace and newline
Signed-off-by: John Jiang <john.sha.jiang@gmail.com>
2023-09-11 09:12:13 +02:00
John Jiang 0450daca63 build: support OpenJDK 17 for buid-main.yml
Signed-off-by: John Jiang <john.sha.jiang@gmail.com>
2023-09-08 08:50:58 +02:00
John Jiang 3e5e1466e9 build: test with OpenJDK 17 on PR
Signed-off-by: John Jiang <john.sha.jiang@gmail.com>
2023-09-08 08:50:58 +02:00
Luca Burgazzoli cb5cf70429 chore: re-format enum definitions
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-09-08 08:43:43 +02:00
Luca Burgazzoli 5e3cb9194e chore: remove deprecated method 2023-09-08 08:43:43 +02:00
Luca Burgazzoli 9c91b56b3c build(deps): bump grpc from 1.57.2 to 1.58.0 2023-09-08 08:43:43 +02:00
John Jiang 471c5690d0 chore: remove trailing spaces and add newlines for non-Java files
Signed-off-by: John Jiang <john.sha.jiang@gmail.com>
2023-09-06 11:17:40 +02:00
John Jiang bcf99363c0 fix(javadoc): type headings should begin at <h2>
Signed-off-by: John Jiang <john.sha.jiang@gmail.com>
2023-09-05 12:29:23 +02:00
dependabot[bot] 84edb66b16 build(deps): bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [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/v3...v4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-04 20:15:25 +02:00
dependabot[bot] 19ba6865f1 build(deps): bump org.slf4j:slf4j-api from 2.0.7 to 2.0.9
Bumps org.slf4j:slf4j-api from 2.0.7 to 2.0.9.

---
updated-dependencies:
- dependency-name: org.slf4j:slf4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-04 19:59:00 +02:00
John Jiang c88e161bd4 fix: wile should be while
Signed-off-by: John Jiang <john.sha.jiang@gmail.com>
2023-09-04 09:38:57 +02:00
dependabot[bot] 7de06aeee3 build(deps): bump info.picocli:picocli from 4.7.4 to 4.7.5
Bumps [info.picocli:picocli](https://github.com/remkop/picocli) from 4.7.4 to 4.7.5.
- [Release notes](https://github.com/remkop/picocli/releases)
- [Changelog](https://github.com/remkop/picocli/blob/main/RELEASE-NOTES.md)
- [Commits](https://github.com/remkop/picocli/compare/v4.7.4...v4.7.5)

---
updated-dependencies:
- dependency-name: info.picocli:picocli
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-01 10:02:10 +02:00
dependabot[bot] 4dbca648ba build(deps): bump io.vertx:vertx-grpc from 4.4.4 to 4.4.5
Bumps io.vertx:vertx-grpc from 4.4.4 to 4.4.5.

---
updated-dependencies:
- dependency-name: io.vertx:vertx-grpc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-30 22:23:16 +02:00
Luca Burgazzoli 04a3b7528b add watch test with restart delay
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-08-28 12:52:22 +02:00
dependabot[bot] aa9e8a0214 build(deps): bump org.testcontainers:testcontainers
Bumps [org.testcontainers:testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.18.3 to 1.19.0.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.18.3...1.19.0)

---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-23 00:38:04 +02:00
dependabot[bot] a0aa568e40 build(deps): bump mockito from 5.4.0 to 5.5.0
Bumps `mockito` from 5.4.0 to 5.5.0.

Updates `org.mockito:mockito-core` from 5.4.0 to 5.5.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.4.0...v5.5.0)

Updates `org.mockito:mockito-junit-jupiter` from 5.4.0 to 5.5.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.4.0...v5.5.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-23 00:37:56 +02:00
Xuan Nguyen 4d5ce0520c etcd-io/jetcd #479 Use new and better canonical link to Google Groups
Signed-off-by: Xuan Nguyen <nguyenxndaidev@gmail.com>
2023-08-20 17:15:52 +02:00
dependabot[bot] 31749a9945 build(deps): bump grpc from 1.57.1 to 1.57.2
Bumps `grpc` from 1.57.1 to 1.57.2.

Updates `io.grpc:grpc-core` from 1.57.1 to 1.57.2
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.57.1...v1.57.2)

Updates `io.grpc:grpc-netty` from 1.57.1 to 1.57.2
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.57.1...v1.57.2)

Updates `io.grpc:grpc-protobuf` from 1.57.1 to 1.57.2
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.57.1...v1.57.2)

Updates `io.grpc:grpc-stub` from 1.57.1 to 1.57.2
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.57.1...v1.57.2)

Updates `io.grpc:grpc-grpclb` from 1.57.1 to 1.57.2
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.57.1...v1.57.2)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-netty
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-stub
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-grpclb
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-16 23:30:25 +02:00
dependabot[bot] b95fc68fb3 build(deps): bump errorprone from 2.21.0 to 2.21.1
Bumps `errorprone` from 2.21.0 to 2.21.1.

Updates `com.google.errorprone:error_prone_core` from 2.21.0 to 2.21.1
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.21.0...v2.21.1)

Updates `com.google.errorprone:error_prone_annotations` from 2.21.0 to 2.21.1
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.21.0...v2.21.1)

---
updated-dependencies:
- dependency-name: com.google.errorprone:error_prone_core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.google.errorprone:error_prone_annotations
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-07 20:07:06 +02:00
Luca Burgazzoli 9c402e507e
feat(ci): add initial release workflow 2023-08-02 21:19:09 +02:00
Luca Burgazzoli 3aaa21aea5
feat(ci): add initial release workflow 2023-08-02 21:00:14 +02:00
Luca Burgazzoli c74101f3a5
feat(ci): add initial release workflow 2023-08-02 20:56:07 +02:00
Luca Burgazzoli b86db3296a
feat(ci): add initial release workflow 2023-08-02 20:47:28 +02:00
Luca Burgazzoli 0f42523da3
feat(ci): add initial release workflow 2023-08-02 20:35:54 +02:00
dependabot[bot] 66123d9bd3 build(deps): bump errorprone from 2.20.0 to 2.21.0
Bumps `errorprone` from 2.20.0 to 2.21.0.

Updates `com.google.errorprone:error_prone_core` from 2.20.0 to 2.21.0
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.20.0...v2.21.0)

Updates `com.google.errorprone:error_prone_annotations` from 2.20.0 to 2.21.0
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.20.0...v2.21.0)

---
updated-dependencies:
- dependency-name: com.google.errorprone:error_prone_core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.errorprone:error_prone_annotations
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-02 19:46:45 +02:00
dependabot[bot] 53217d9899 build(deps): bump grpc from 1.57.0 to 1.57.1
Bumps `grpc` from 1.57.0 to 1.57.1.

Updates `io.grpc:grpc-core` from 1.57.0 to 1.57.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.57.0...v1.57.1)

Updates `io.grpc:grpc-netty` from 1.57.0 to 1.57.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.57.0...v1.57.1)

Updates `io.grpc:grpc-protobuf` from 1.57.0 to 1.57.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.57.0...v1.57.1)

Updates `io.grpc:grpc-stub` from 1.57.0 to 1.57.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.57.0...v1.57.1)

Updates `io.grpc:grpc-grpclb` from 1.57.0 to 1.57.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.57.0...v1.57.1)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-netty
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-stub
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-grpclb
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-02 19:46:28 +02:00
John Jiang 67aab8aaaf fix: unnecessary transient in MemorizingClientSupplier
Signed-off-by: John Jiang <john.sha.jiang@gmail.com>
2023-08-02 13:38:12 +02:00
dependabot[bot] e2f138b910 build(deps): bump com.google.guava:guava from 32.1.1-jre to 32.1.2-jre
Bumps [com.google.guava:guava](https://github.com/google/guava) from 32.1.1-jre to 32.1.2-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-01 22:16:39 +02:00
dependabot[bot] 50e25af43b build(deps): bump grpc from 1.56.1 to 1.57.0
Bumps `grpc` from 1.56.1 to 1.57.0.

Updates `io.grpc:grpc-core` from 1.56.1 to 1.57.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.56.1...v1.57.0)

Updates `io.grpc:grpc-netty` from 1.56.1 to 1.57.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.56.1...v1.57.0)

Updates `io.grpc:grpc-protobuf` from 1.56.1 to 1.57.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.56.1...v1.57.0)

Updates `io.grpc:grpc-stub` from 1.56.1 to 1.57.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.56.1...v1.57.0)

Updates `io.grpc:grpc-grpclb` from 1.56.1 to 1.57.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.56.1...v1.57.0)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-netty
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-stub
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-grpclb
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-31 08:46:35 +02:00
dependabot[bot] eb7fbe46d8 build(deps): bump org.junit.jupiter:junit-jupiter from 5.9.3 to 5.10.0
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.9.3 to 5.10.0.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.9.3...r5.10.0)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-25 15:26:10 +02:00
dependabot[bot] 2ff3fc2255 build(deps): bump com.google.protobuf from 0.9.3 to 0.9.4
Bumps com.google.protobuf from 0.9.3 to 0.9.4.

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-18 00:21:27 +02:00
Giridharan Ramasamy 151c1d7b51 watcher: Added WithCreatedNotify Option for receiving created event
This adds WatchOption to receive watch created event

Fixes #1186

Signed-off-by: Giridharan Ramasamy <46867712+giri-vsr@users.noreply.github.com>
2023-07-08 21:37:26 +02:00
dependabot[bot] ec48303a20 build(deps): bump grpc from 1.56.0 to 1.56.1
Bumps `grpc` from 1.56.0 to 1.56.1.

Updates `io.grpc:grpc-core` from 1.56.0 to 1.56.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.56.0...v1.56.1)

Updates `io.grpc:grpc-netty` from 1.56.0 to 1.56.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.56.0...v1.56.1)

Updates `io.grpc:grpc-protobuf` from 1.56.0 to 1.56.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.56.0...v1.56.1)

Updates `io.grpc:grpc-stub` from 1.56.0 to 1.56.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.56.0...v1.56.1)

Updates `io.grpc:grpc-grpclb` from 1.56.0 to 1.56.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.56.0...v1.56.1)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-netty
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-stub
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-grpclb
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-03 20:34:38 +02:00
dependabot[bot] b3175ebf07 build(deps): bump com.google.guava:guava from 32.0.1-jre to 32.1.1-jre
Bumps [com.google.guava:guava](https://github.com/google/guava) from 32.0.1-jre to 32.1.1-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-30 20:20:51 +02:00
Luca Burgazzoli 9454705c8c
fix(ci): split main build an publish jobs 2023-06-30 12:34:10 +02:00
Luca Burgazzoli e5a8e87224
fix(ci): add matric to main workflow 2023-06-30 12:30:59 +02:00
Luca Burgazzoli 3fd947f4cf
fix(ci): print current version before publish 2023-06-30 12:21:54 +02:00
Lan Liang ca95a0a33f [ghaction] martix CI for etcd version
Signed-off-by: Lan Liang <gcslyp@gmail.com>
2023-06-30 12:18:54 +02:00
Lan 5c150ac1e4 Add cache and schedule for ghaction
Signed-off-by: Lan Liang <gcslyp@gmail.com>
2023-06-30 12:04:21 +02:00
Luca Burgazzoli 156df8a0bc chore(doc): fix snapshot link 2023-06-30 11:29:43 +02:00
Luca Burgazzoli 38dd03c334 fix(ci): print current version before publish 2023-06-30 11:28:26 +02:00
Luca Burgazzoli 32fc5a0c2c fix(ci): fetch all tags and refs 2023-06-30 11:27:45 +02:00
dependabot[bot] f643a52081 build(deps): bump mockito from 5.3.1 to 5.4.0
Bumps `mockito` from 5.3.1 to 5.4.0.

Updates `org.mockito:mockito-core` from 5.3.1 to 5.4.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.3.1...v5.4.0)

Updates `org.mockito:mockito-junit-jupiter` from 5.3.1 to 5.4.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.3.1...v5.4.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-28 17:04:30 +02:00
Cheng Pan f6b94488a7 Remove quote from properties' values
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-06-28 16:51:36 +02:00
dependabot[bot] 1dea66df1f build(deps): bump io.vertx:vertx-grpc from 4.4.3 to 4.4.4
Bumps io.vertx:vertx-grpc from 4.4.3 to 4.4.4.

---
updated-dependencies:
- dependency-name: io.vertx:vertx-grpc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-22 20:37:51 +02:00
dependabot[bot] e956deab04 build(deps): bump errorprone from 2.19.1 to 2.20.0
Bumps `errorprone` from 2.19.1 to 2.20.0.

Updates `com.google.errorprone:error_prone_core` from 2.19.1 to 2.20.0
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.19.1...v2.20.0)

Updates `com.google.errorprone:error_prone_annotations` from 2.19.1 to 2.20.0
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.19.1...v2.20.0)

---
updated-dependencies:
- dependency-name: com.google.errorprone:error_prone_core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.errorprone:error_prone_annotations
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-17 08:03:27 +02:00
dependabot[bot] 39b1ca4d9a build(deps): bump grpc from 1.55.1 to 1.56.0
Bumps `grpc` from 1.55.1 to 1.56.0.

Updates `io.grpc:grpc-core` from 1.55.1 to 1.56.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.55.1...v1.56.0)

Updates `io.grpc:grpc-netty` from 1.55.1 to 1.56.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.55.1...v1.56.0)

Updates `io.grpc:grpc-protobuf` from 1.55.1 to 1.56.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.55.1...v1.56.0)

Updates `io.grpc:grpc-stub` from 1.55.1 to 1.56.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.55.1...v1.56.0)

Updates `io.grpc:grpc-grpclb` from 1.55.1 to 1.56.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.55.1...v1.56.0)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-netty
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-stub
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-grpclb
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-15 09:23:47 +02:00
dependabot[bot] 040d6e49df build(deps): bump autoService from 1.1.0 to 1.1.1
Bumps `autoService` from 1.1.0 to 1.1.1.

Updates `com.google.auto.service:auto-service-annotations` from 1.1.0 to 1.1.1
- [Release notes](https://github.com/google/auto/releases)
- [Commits](https://github.com/google/auto/compare/auto-value-1.1...auto-service-1.1.1)

Updates `com.google.auto.service:auto-service` from 1.1.0 to 1.1.1
- [Release notes](https://github.com/google/auto/releases)
- [Commits](https://github.com/google/auto/compare/auto-value-1.1...auto-service-1.1.1)

---
updated-dependencies:
- dependency-name: com.google.auto.service:auto-service-annotations
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.google.auto.service:auto-service
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-12 20:27:46 +02:00
Luca Burgazzoli 23aeac541f Add test for #1161
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-06-10 19:40:01 +02:00
Luca Burgazzoli 73c7120e04 misc cleanup
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-06-10 15:16:19 +02:00
Luca Burgazzoli 36f34219b2 updates deps and test cleanup
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-06-10 12:50:06 +02:00
Luca Burgazzoli dbd35a5305 Add test for #1132
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-06-10 12:29:48 +02:00
Luca Burgazzoli a203276502 chore(deps): replace jcommander with picocli
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-06-10 12:19:06 +02:00
Luca Burgazzoli bdf5c17ed7 The keepAliveOnce delay increases after the jetcd version is upgraded to 0.7.3 #1119
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-06-10 11:06:42 +02:00
dependabot[bot] 40cd1a1d10 build(deps): bump com.google.guava:guava from 32.0.0-jre to 32.0.1-jre
Bumps [com.google.guava:guava](https://github.com/google/guava) from 32.0.0-jre to 32.0.1-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-09 20:33:43 +02:00
dependabot[bot] b87ceb7bad build(deps): bump commons-io:commons-io from 2.12.0 to 2.13.0
Bumps commons-io:commons-io from 2.12.0 to 2.13.0.

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-08 23:16:59 +02:00
dependabot[bot] e80103f25d build(deps): bump io.vertx:vertx-grpc from 4.4.2 to 4.4.3
Bumps io.vertx:vertx-grpc from 4.4.2 to 4.4.3.

---
updated-dependencies:
- dependency-name: io.vertx:vertx-grpc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-08 09:35:59 +02:00
dependabot[bot] 2a5a1574de build(deps): bump org.testcontainers:testcontainers
Bumps [org.testcontainers:testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.18.2 to 1.18.3.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.18.2...1.18.3)

---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-08 09:35:43 +02:00
dependabot[bot] f2733061ac build(deps): bump org.jooq:jool-java-8 from 0.9.14 to 0.9.15
Bumps [org.jooq:jool-java-8](https://github.com/jOOQ/jOOL) from 0.9.14 to 0.9.15.
- [Commits](https://github.com/jOOQ/jOOL/compare/version-0.9.14...version-0.9.15)

---
updated-dependencies:
- dependency-name: org.jooq:jool-java-8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-31 20:14:22 +02:00
dependabot[bot] 1ea5639c0e build(deps): bump org.junit.jupiter:junit-jupiter from 5.9.2 to 5.9.3
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.9.2 to 5.9.3.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.9.2...r5.9.3)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-31 08:14:52 +02:00
dependabot[bot] 2558a89c0c build(deps): bump com.google.errorprone:javac
Bumps [com.google.errorprone:javac](https://github.com/google/error-prone-javac) from 9+181-r4173-1 to 1.8.0-u20.
- [Commits](https://github.com/google/error-prone-javac/commits)

---
updated-dependencies:
- dependency-name: com.google.errorprone:javac
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-31 08:04:47 +02:00
dependabot[bot] 100b2a42a9 build(deps): bump org.apache.commons:commons-compress
Bumps org.apache.commons:commons-compress from 1.22 to 1.23.0.

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-compress
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-31 08:04:35 +02:00
dependabot[bot] fd65e2772a build(deps): bump com.google.protobuf from 0.9.2 to 0.9.3
Bumps com.google.protobuf from 0.9.2 to 0.9.3.

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-31 08:04:25 +02:00
dependabot[bot] d736ac4872 build(deps): bump org.testcontainers:testcontainers
Bumps [org.testcontainers:testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.18.1 to 1.18.2.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.18.1...1.18.2)

---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-31 08:04:13 +02:00
Luca Burgazzoli 9cd1e98911 refactor: use vertx executor service
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-05-31 08:03:58 +02:00
Luca Burgazzoli 879bb221c7 etcd: update to v3.5.9
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-05-30 14:04:33 +02:00
Cristian Ferretti 6c59cf6569 Ensure any service threads are created as daemon threads (redo).
Signed-off-by: Cristian Ferretti <cristianferretti@deephaven.io>
2023-05-30 09:31:45 +02:00
dependabot[bot] 80e2b38c22 build(deps): bump mockito from 5.1.1 to 5.3.1
Bumps `mockito` from 5.1.1 to 5.3.1.

Updates `org.mockito:mockito-core` from 5.1.1 to 5.3.1
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.1.1...v5.3.1)

Updates `org.mockito:mockito-junit-jupiter` from 5.1.1 to 5.3.1
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.1.1...v5.3.1)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-29 20:44:58 +02:00
dependabot[bot] 198fe32947 build(deps): bump com.github.johnrengelman.shadow from 8.1.0 to 8.1.1
Bumps com.github.johnrengelman.shadow from 8.1.0 to 8.1.1.

---
updated-dependencies:
- dependency-name: com.github.johnrengelman.shadow
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-29 20:23:56 +02:00
dependabot[bot] c886569a9e build(deps): bump com.google.guava:guava from 31.1-jre to 32.0.0-jre
Bumps [com.google.guava:guava](https://github.com/google/guava) from 31.1-jre to 32.0.0-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-29 20:18:29 +02:00
dependabot[bot] 00425bd26c build(deps): bump org.testcontainers:testcontainers
Bumps [org.testcontainers:testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.17.6 to 1.18.1.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.17.6...1.18.1)

---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-29 20:18:15 +02:00
dependabot[bot] 403ea94314 build(deps): bump commons-io:commons-io from 2.11.0 to 2.12.0
Bumps commons-io:commons-io from 2.11.0 to 2.12.0.

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-29 20:18:04 +02:00
dependabot[bot] 73749064e8 build(deps): bump errorprone from 2.18.0 to 2.19.1
Bumps `errorprone` from 2.18.0 to 2.19.1.

Updates `com.google.errorprone:error_prone_core` from 2.18.0 to 2.19.1
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.18.0...v2.19.1)

Updates `com.google.errorprone:error_prone_annotations` from 2.18.0 to 2.19.1
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.18.0...v2.19.1)

---
updated-dependencies:
- dependency-name: com.google.errorprone:error_prone_core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.errorprone:error_prone_annotations
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-28 16:17:13 +02:00
Luca Burgazzoli 20e83785e0 chore(deps): add dependency-review-action 2023-05-28 16:16:33 +02:00
dependabot[bot] 272c14343d build(deps): bump autoService from 1.0.1 to 1.1.0
Bumps `autoService` from 1.0.1 to 1.1.0.

Updates `com.google.auto.service:auto-service-annotations` from 1.0.1 to 1.1.0
- [Release notes](https://github.com/google/auto/releases)
- [Commits](https://github.com/google/auto/compare/auto-common-1.0.1...auto-value-1.1)

Updates `com.google.auto.service:auto-service` from 1.0.1 to 1.1.0
- [Release notes](https://github.com/google/auto/releases)
- [Commits](https://github.com/google/auto/compare/auto-common-1.0.1...auto-value-1.1)

---
updated-dependencies:
- dependency-name: com.google.auto.service:auto-service-annotations
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.auto.service:auto-service
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-28 16:09:16 +02:00
dependabot[bot] f4006a496f build(deps): bump org.slf4j:slf4j-api from 2.0.6 to 2.0.7
Bumps [org.slf4j:slf4j-api](https://github.com/qos-ch/slf4j) from 2.0.6 to 2.0.7.
- [Commits](https://github.com/qos-ch/slf4j/compare/v_2.0.6...v_2.0.7)

---
updated-dependencies:
- dependency-name: org.slf4j:slf4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-28 16:09:06 +02:00
dependabot[bot] d25a7cd578 build(deps): bump grpc from 1.53.0 to 1.55.1
Bumps `grpc` from 1.53.0 to 1.55.1.

Updates `io.grpc:grpc-core` from 1.53.0 to 1.55.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.53.0...v1.55.1)

Updates `io.grpc:grpc-netty` from 1.53.0 to 1.55.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.53.0...v1.55.1)

Updates `io.grpc:grpc-protobuf` from 1.53.0 to 1.55.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.53.0...v1.55.1)

Updates `io.grpc:grpc-stub` from 1.53.0 to 1.55.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.53.0...v1.55.1)

Updates `io.grpc:grpc-grpclb` from 1.53.0 to 1.55.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.53.0...v1.55.1)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-netty
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-stub
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-grpclb
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-28 16:08:55 +02:00
dependabot[bot] 8a448151a9 build(deps): bump io.vertx:vertx-grpc from 4.4.0 to 4.4.2
Bumps io.vertx:vertx-grpc from 4.4.0 to 4.4.2.

---
updated-dependencies:
- dependency-name: io.vertx:vertx-grpc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-28 16:08:44 +02:00
Luca Burgazzoli 938e745ba0 chore(test): re-generate ssl certs 2023-05-28 15:55:49 +02:00
Luca Burgazzoli 47c8e7578d chore(deps): configure dependabot to ignore protoc 2023-05-28 15:43:36 +02:00
Luca Burgazzoli 5445564688 chore(deps): enable depndabot 2023-05-28 15:38:26 +02:00
Luca Burgazzoli 389b2c137b chore(deps): update gradle 2023-05-28 15:38:14 +02:00
iamthinh 0790996723 Update Lease.md 2023-04-18 08:22:02 +02:00
dependabot[bot] 275aea177a build(deps): bump actions/stale from 7 to 8
Bumps [actions/stale](https://github.com/actions/stale) from 7 to 8.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v7...v8)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-27 09:04:39 +02:00
Luca Burgazzoli ebf983b811 fix: build is failing due to PMD #1126
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-03-08 09:20:18 +01:00
Luca Burgazzoli 64fe54aced chore: update deps
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-03-08 09:20:18 +01:00
Jean-Baptiste Onofré 0f35c8aa40 1124: upgrade to slf4j 2.0.6 and log4j 2.20.0
Signed-off-by: Jean-Baptiste Onofré <jbonofre@apache.org>
2023-03-06 08:52:03 +01:00
dependabot[bot] 7639c8161f build(deps): bump actions/stale from 6 to 7
Bumps [actions/stale](https://github.com/actions/stale) from 6 to 7.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v6...v7)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-24 07:47:55 +01:00
Ilia Ilinykh 822032bb78 extension: EtcdClusterExtension
Added ability to use settings in EtcdClusterExtension.

Signed-off-by: Ilia Ilinykh <ilyasyoy@gmail.com>
2023-01-30 07:54:39 +01:00
Ilia Ilinykh 4441c2b742 launcher: mounting data directory
added settings to turn-off mounting of data directory.

Signed-off-by: Ilia Ilinykh <ilyasyoy@gmail.com>
2023-01-30 07:54:39 +01:00
Ilia Ilinykh 061e3de023 documentation: CONTRIBUTING.md
Fixed formatting command.

Signed-off-by: Ilia Ilinykh <ilyasyoy@gmail.com>
2023-01-30 07:54:39 +01:00
ponfee.fu f6afc20a49 fix spelled mistake method name "getTTl" (#1112) 2022-12-07 09:39:20 +01:00
Luca Burgazzoli 2247c1e2ba
chore: add release doc 2022-12-07 09:13:40 +01:00
Luca Burgazzoli c89a275117 remove explicit grpc sourcesets
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2022-12-06 00:24:23 +01:00
dependabot[bot] 6f4bd13b0e build(deps): bump actions/stale from 1 to 6
Bumps [actions/stale](https://github.com/actions/stale) from 1 to 6.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v1...v6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-02 15:08:22 +01:00
dependabot[bot] 795dacf662 build(deps): bump actions/setup-java from 2 to 3
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 2 to 3.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v2...v3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-02 15:08:11 +01:00
dependabot[bot] 9786709d0e build(deps): 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>
2022-12-02 15:08:02 +01:00
Luca Burgazzoli 68514bd258
chore(dependabot): add github action packages 2022-12-02 15:01:40 +01:00
Luca Burgazzoli afa560e25a chore: update deps 2022-12-02 08:06:34 +01:00
darvay 70c9f45d34 Add handling for "etcdserver: revision of auth store is old" error experienced by customers when Role changes are made to the ETCD Cluster.
We are seeing a use case when ETCD Role grants are updated we are getting an error "etcdserver: revision of auth store is old" on all JETCD clients right after the grant is applied. The only fix now is for the client to restart and reconnect.

ETCD Cluster config:

ETCD_AUTH_TOKEN: jwt,pub-key=/auth-token/authToken.pub,priv-key=/auth-token/authToken.key,sign-method=RS256,ttl=8h

Signed-off-by: darvay <darvay@apple.com>
2022-11-16 10:32:37 +01:00
Tsong Lew bd0ffdfe78 test: update testMemberManagementAddLearner and testMemberManagementAddNonLearner
Signed-off-by: Tsong Lew <tsonglew@gmail.com>
2022-11-09 09:30:25 +01:00
Tsong Lew 515aa7b001 feat: default addMember method
Signed-off-by: Tsong Lew <tsonglew@gmail.com>
2022-11-09 09:30:25 +01:00
Tsong Lew e5da670d99 feat: add isLearner in Member and MemberAddRequest
Signed-off-by: Tsong Lew <tsonglew@gmail.com>
2022-11-09 09:30:25 +01:00
Luca Burgazzoli cadde88d11 Add watch and get test
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2022-10-11 20:44:58 +02:00
backwards-rat-race f1036933a1 docs: fix case-sensitive typo in README.md when linking to docs/SslConfig.md.
previously when clicking the link via GitHub a 404 was returned rather than the expected document

Signed-off-by: backwards-rat-race <backwards-rat-race@users.noreply.github.com>
2022-10-10 08:59:55 +02:00
Luca Burgazzoli 4f7878790e chore: update deps 2022-09-26 10:55:39 +02:00
Junpei Kawamoto f25f8dcf80 Fix mismatches of field numbers and types
Compared with rpc.proto in etcd-io/etcd, there are one field number
mismatch and two field type mismatches. This commit fixes them.

Signed-off-by: Junpei Kawamoto <kawamoto.junpei@gmail.com>
2022-08-20 14:07:55 +02:00
Cheng Pan c98f45dfb8 Build: Remove workaround for gradle protoc plugin on Apple Silicon
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-08-07 17:47:21 +02:00
Luca Burgazzoli db1a00e655 chore: fix javadocs
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2022-07-28 21:59:47 +02:00
Luca Burgazzoli 4c347d3f89 chore: remove remaining manual Listener -> CompletionStage conversion
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2022-07-28 21:59:47 +02:00
Luca Burgazzoli 59435017f1 chore: add better validation for pr
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2022-07-28 17:27:02 +02:00
Luca Burgazzoli 30329ae6a1 chore: update pmd and spotless rules
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2022-07-28 17:27:02 +02:00
Luca Burgazzoli 22b9cc8010 deps: update protc to v3.21.4
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2022-07-28 17:15:21 +02:00
Luca Burgazzoli a6f54e1c4f Improve EtcdClusterExtension
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2022-07-28 16:56:22 +02:00
Luca Burgazzoli 4d23a6e083 chore: fix formatting 2022-07-28 15:28:50 +02:00
Luca Burgazzoli acb479cd76 fix pmd findings 2022-07-28 15:28:50 +02:00
Luca Burgazzoli 87bddc9d65 Fix junit extension 2022-07-28 15:28:50 +02:00
Luca Burgazzoli 194b503ec7 temporary disable AuthUnitTest 2022-07-28 00:20:50 +02:00
Luca Burgazzoli 2b081daa76 update deps
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2022-07-28 00:20:50 +02:00
Gunnar Morling 874eb7a8cc Adding missing license headers 2022-07-27 23:03:38 +02:00
Cheng Pan 6f80b0383a Upgrade docker image to support run on Arm platform
https://console.cloud.google.com/gcr/images/etcd-development/global/etcd@sha256:795d8660c48c439a7c3764c2330ed9222ab5db5bb524d8d0607cac76f7ba82a3/details?tab=pull

Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-07-26 15:57:51 +02:00
Luca Burgazzoli f14b88dcd5 deps: org.testcontainers:testcontainers [1.16.3 -> 1.17.1] 2022-05-09 23:13:38 +02:00
Luca Burgazzoli d75354c833 deps:org.mockito [4.4.0 -> 4.5.1] 2022-05-09 23:13:38 +02:00
Luca Burgazzoli 4a628406fa deps: org.gradle:test-retry-gradle-plugin [1.3.1 -> 1.3.2] 2022-05-09 23:13:38 +02:00
Luca Burgazzoli 494d49ffc5 deps: io.vertx [4.2.6 -> 4.2.7] 2022-05-09 23:13:38 +02:00
Luca Burgazzoli 5be5126d35 deps:io.grpc [1.45.1 -> 1.46.0] 2022-05-09 23:13:38 +02:00
Luca Burgazzoli 6b882a170d deps: com.google.errorprone:error_prone_core [2.12.1 -> 2.13.1] 2022-05-09 23:13:38 +02:00
Luca Burgazzoli 5bd7dd4c33 deps: com.diffplug.spotless:spotless-plugin-gradle [6.4.2 -> 6.5.2] 2022-05-09 23:13:38 +02:00
Duo Zhang 9f46a16f1d
Set daemon to true when creating background thread pool, and also set… (#1062)
* Set daemon to true when creating background thread pool, and also set a proper name for the thread

* abstract a util method in Util

* spotlessApply
2022-04-13 07:05:27 +02:00
Tenghuan He b8b825e4e3 Fix build instructions in README.md
Actually jetcd is built with `gradle` instead of `maven`
2022-04-13 07:04:25 +02:00
Duo Zhang 515372b7f6 Close vertx instance when closing ClientConnectionManager 2022-04-11 08:02:54 +02:00
Luca Burgazzoli 515db5c96d chore: fix code style 2022-04-08 13:00:23 +02:00
Luca Burgazzoli 378eb56c2f io.grpc [1.45.0 -> 1.45.1] 2022-04-08 13:00:23 +02:00
Luca Burgazzoli 7e7da2ced6 com.google.errorprone:error_prone_core [2.11.0 -> 2.12.1] 2022-04-08 13:00:23 +02:00
Luca Burgazzoli b968372009 com.diffplug.spotless:spotless-plugin-gradle [6.3.0 -> 6.4.2] 2022-04-08 13:00:23 +02:00
vinsia af093bbd12 invalid etcd token with Unkonwn status code 2022-04-08 12:56:24 +02:00
shalk(xiao kun) 937b04c4dc Update README.md 2022-04-08 12:56:12 +02:00
Luca Burgazzoli af450ed4f7
cleanup 2022-03-18 23:11:20 +01:00
Luca Burgazzoli 4bf6b168cb chore: update deps 2022-03-18 08:42:27 +01:00
Zhao Yang 0e6d3eda13 Fix: use user-provided keep-alive timeouts as initial keepalive timeout
Use user configurable keep-alive timeouts to avoid KeepAlive being
removed before receiving first response from server

Fixes #1049
2022-03-15 19:08:05 +01:00
chenguli 6412f4153a fix typo: add ssl config doc 2022-03-14 09:27:12 +01:00
chenguli a03735d26a fix: add ssl config doc 2022-03-14 09:27:12 +01:00
Luca Burgazzoli 87fadade76 deps: upgrade mockit to v4.2.0 2021-12-20 07:24:50 +01:00
Luca Burgazzoli 9e28398626 deps: upgrade log4j2 to v2.17.0 2021-12-20 07:24:50 +01:00
Luca Burgazzoli f821099122 deps: upgrade spotless plugin to v6.0.5 2021-12-20 07:24:50 +01:00
Vladislav Khakin 100e69e3f0 doc: change required java version 2021-12-18 18:46:19 +01:00
Vladislav Khakin 7286e912e2 build: replace gradle-versions-filter plugin (due to lack of java 8 support) with java version plugin configuration 2021-12-18 18:46:19 +01:00
Vladislav Khakin c4f059e8ec feat: java 8 support 2021-12-18 18:46:19 +01:00
Luca Burgazzoli fd8ce2faaf
chore: improve bug reporting template 2021-12-15 13:41:54 +01:00
Luca Burgazzoli d5b6599ad2
chore: fix readme 2021-12-15 13:40:13 +01:00
Luca Burgazzoli 606c610b39 deps: cleanup 2021-12-15 13:39:11 +01:00
Luca Burgazzoli da1e9a372e deps: upgrade gradle to v7.3.2 2021-12-15 13:39:11 +01:00
Luca Burgazzoli 491bc08819 deps: upgrade grpc-java to v1.43.0 2021-12-15 13:39:11 +01:00
Luca Burgazzoli e2e6f17784 deps: upgrade vertx to v4.2.2 2021-12-15 13:39:11 +01:00
Luca Burgazzoli 573c12b35b deps: upgrade shadow.gradle.plugin to v7.1.1 2021-12-15 13:39:11 +01:00
Luca Burgazzoli 6c996b378a chore: more dependencies cleanup 2021-12-15 12:39:15 +01:00
Luca Burgazzoli 21fc17ee9d chore: reformat 2021-12-15 09:14:30 +01:00
Luca Burgazzoli 836961f2db chore: use libs version for grpc, protoc and vertx 2021-12-15 09:14:30 +01:00
Luca Burgazzoli 231b007bbe feat: refactor api/impl 2021-12-15 09:14:30 +01:00
Luca Burgazzoli 490baf1119 chore: cleanup build script 2021-12-14 17:44:16 +01:00
Luca Burgazzoli ac22cf722b feat: switch to vert.x as grpc impl 2021-12-14 17:00:00 +01:00
Luca Burgazzoli 86be7d547f
chore: fix build-main workflow 2021-12-14 15:30:04 +01:00
Luca Burgazzoli 63e0e9e05d
chore: fix build-pr workflow 2021-12-14 14:59:12 +01:00
Luca Burgazzoli 727baea49a
chore: rename master to main 2021-12-14 12:42:09 +01:00
Luca Burgazzoli 61ad70b0fc deps: exclude unused transied dependencies 2021-12-14 12:31:08 +01:00
Luca Burgazzoli 6c3c03789d
ci: fix concurrency group 2021-12-14 11:08:01 +01:00
Luca Burgazzoli 63b1a00395 chore: use release instead of toolchain to set minimum java version 2021-12-14 11:03:10 +01:00
Luca Burgazzoli 22d342b79d deps: update spotless plugin to v6.0.4 2021-12-14 11:03:10 +01:00
Luca Burgazzoli ce7e47e43d deps: update spotbugs to v4.5.2 2021-12-14 11:03:10 +01:00
Luca Burgazzoli f8c6b63427 deps: update log4j to v2.16.0 2021-12-14 11:03:10 +01:00
Vladislav Khakin bc818c0322 fix: key prefix support int transactions (Put and GetOpt)
Extract mapping logic from API (in KV and Op classes) to GRPC Request into separated class. Fixes missing IsPrefix support in GetOp and PutOp

Fixes #1017
2021-12-11 12:56:41 +01:00
fxshlein c837ac53a0 jetcd-ctl: Update log4j to 2.15.0
The new log4j version contains fixes for CVE-2021-44228.
2021-12-10 18:27:12 +01:00
Luca Burgazzoli 0537b7fe62
chore(ci): fix github actions concurrency 2021-12-03 17:47:15 +01:00
Luca Burgazzoli 1c93a9335b
chore(deps): update spotless, junit and gradle 2021-12-03 16:51:18 +01:00
wangbin 0322105736 fix gradle dependencies in README 2021-12-02 09:43:19 +01:00
Vladislav Khakin 4d9500d762 doc: fix broken link to etcd
fix link and change watch command output documentation

Fixes #1018
2021-11-26 09:06:19 +01:00
Luca Burgazzoli 494bdecd80 fix: add test about using cluster client without authentication 2021-11-24 11:24:45 +01:00
Luca Burgazzoli 66ee86b07a feat: enable test retry 2021-11-24 11:24:45 +01:00
Luca Burgazzoli 456aeef81d chore(deps): update mockito to v4.1.0 2021-11-24 11:24:45 +01:00
Luca Burgazzoli 4892dbbc0c
feat: force snapshots for automate publishing 2021-11-18 23:03:43 +01:00
Luca Burgazzoli 48a0a13ed1
feat: add axiom release plugin 2021-11-18 22:51:45 +01:00
Luca Burgazzoli 25fd0cadbb
Update README.md 2021-11-18 14:09:15 +01:00
Luca Burgazzoli 4f77dfda28
document java 11 requirenet 2021-11-18 14:06:19 +01:00
Luca Burgazzoli 5653bf42d0
fix gpg 2021-11-18 14:05:27 +01:00
Luca Burgazzoli cf30ab2c67
fis: use gpg cmd to sign artifacts 2021-11-18 13:39:56 +01:00
Luca Burgazzoli 83bcc04516
fix: remove release tasks 2021-11-18 13:11:06 +01:00
Luca Burgazzoli ef577dc15f
feat: add release tasks 2021-11-18 12:10:48 +01:00
Luca Burgazzoli ff05a719e4
feat: add release tasks 2021-11-18 12:02:28 +01:00
Luca Burgazzoli 0bb19f1a4d feat: add option to configure the target endpoint direcly 2021-11-18 11:55:12 +01:00
Luca Burgazzoli a3943f2e35 chore(deps): improve version update check 2021-11-17 09:41:22 +01:00
Luca Burgazzoli ebbbb10ee7 chore(deps): update grpc to v1.42.1 2021-11-17 09:41:22 +01:00
Luca Burgazzoli 823c1a608b chore(deps): update │spotbugs to v4.5.0 2021-11-17 09:41:22 +01:00
Luca Burgazzoli 87ba368b0b Update issue templates 2021-11-17 07:26:54 +01:00
Luca Burgazzoli caba1b0d6d
Update README.md 2021-11-17 07:21:23 +01:00
Luca Burgazzoli 7e64ed2029
Update README.md 2021-11-17 07:19:03 +01:00
Luca Burgazzoli 029561b78f
Update README.md 2021-11-16 18:02:45 +01:00
Luca Burgazzoli 7d0fe0dde8 Rework test extension 2021-11-16 14:08:15 +01:00
Luca Burgazzoli 3081e86b9b
chore: fix ci 2021-11-11 15:53:30 +01:00
Luca Burgazzoli 7f0e9aa127
chore: fix ci 2021-11-11 15:52:54 +01:00
Luca Burgazzoli 7fbf9084de
chore: fix ci 2021-11-11 15:51:00 +01:00
Luca Burgazzoli 74cfe2a45e chore: fix deploy task 2021-11-11 15:47:04 +01:00
Luca Burgazzoli a2021ffccf migrate to gradle #809 2021-11-11 14:47:02 +01:00
dependabot[bot] aa057f8600 Bump grpc.version from 1.41.0 to 1.42.0
Bumps `grpc.version` from 1.41.0 to 1.42.0.

Updates `grpc-api` from 1.41.0 to 1.42.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.41.0...v1.42.0)

Updates `grpc-core` from 1.41.0 to 1.42.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.41.0...v1.42.0)

Updates `grpc-netty` from 1.41.0 to 1.42.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.41.0...v1.42.0)

Updates `grpc-protobuf` from 1.41.0 to 1.42.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.41.0...v1.42.0)

Updates `grpc-stub` from 1.41.0 to 1.42.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.41.0...v1.42.0)

Updates `grpc-grpclb` from 1.41.0 to 1.42.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.41.0...v1.42.0)

Updates `grpc-testing` from 1.41.0 to 1.42.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.41.0...v1.42.0)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-netty
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-stub
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-grpclb
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-testing
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-05 21:46:34 +01:00
dependabot[bot] 22b200cceb Bump auto-service.version from 1.0 to 1.0.1
Bumps `auto-service.version` from 1.0 to 1.0.1.

Updates `auto-service` from 1.0 to 1.0.1
- [Release notes](https://github.com/google/auto/releases)
- [Commits](https://github.com/google/auto/compare/auto-value-1.0...auto-common-1.0.1)

Updates `auto-service-annotations` from 1.0 to 1.0.1
- [Release notes](https://github.com/google/auto/releases)
- [Commits](https://github.com/google/auto/compare/auto-value-1.0...auto-common-1.0.1)

---
updated-dependencies:
- dependency-name: com.google.auto.service:auto-service
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.google.auto.service:auto-service-annotations
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-04 08:01:58 +01:00
dependabot[bot] db0d34866c Bump netty-tcnative-boringssl-static from 2.0.44.Final to 2.0.45.Final
Bumps [netty-tcnative-boringssl-static](https://github.com/netty/netty-tcnative) from 2.0.44.Final to 2.0.45.Final.
- [Release notes](https://github.com/netty/netty-tcnative/releases)
- [Commits](https://github.com/netty/netty-tcnative/compare/netty-tcnative-parent-2.0.44.Final...netty-tcnative-parent-2.0.45.Final)

---
updated-dependencies:
- dependency-name: io.netty:netty-tcnative-boringssl-static
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-01 21:19:51 +01:00
Luca Burgazzoli 4b74954775
[maven-release-plugin] prepare for next development iteration 2021-10-29 07:55:55 +02:00
268 changed files with 9717 additions and 7966 deletions

25
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@ -0,0 +1,25 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**Versions**
- etcd: _add the etcd version here_
- jetcd: _add the jetcd version here_
- java: _add the java version here_
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps or reproducer to reproduce the behavior in a form of a unit test.
This section *must* be provided, if not, the issue may not get attention since the maintainers have very limited capacity.
**Expected behavior**
A clear and concise description of what you expected to happen.
**Additional context**
Add any other context about the problem here.

View File

@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

View File

@ -1,11 +1,18 @@
version: 2
updates:
- package-ecosystem: maven
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
ignore:
- dependency-name: org.codehaus.plexus:plexus-compiler-javac-errorprone
versions:
- "> 2.8.6, < 2.9"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: daily
time: "19:30"
timezone: Europe/Paris
- package-ecosystem: "gradle"
directory: "/"
schedule:
interval: daily
time: "19:30"
timezone: Europe/Paris
labels:
- area/dependencies
ignore:
- dependency-name: com.google.protobuf:protoc

76
.github/workflows/build-main.yml vendored Normal file
View File

@ -0,0 +1,76 @@
#
# Copyright 2016-2023 The jetcd authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: Build and Publish (Snapshot)
concurrency:
group: ${{ github.workflow }}-${{ github.sha }}
cancel-in-progress: true
on:
push:
branches:
- main
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
jobs:
checks:
uses: ./.github/workflows/checks.yml
build:
needs:
- checks
strategy:
matrix:
java-version:
- 11
- 17
- 21
etcd:
- quay.io/coreos/etcd:v3.5.21
- quay.io/coreos/etcd:v3.6.0
uses: ./.github/workflows/build.yml
with:
javaVersion: "${{ matrix.java-version }}"
etcdImage: "${{ matrix.etcd }}"
publish:
runs-on: ubuntu-latest
needs:
- build
steps:
- name: 'Checkout'
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 'Set Up Java'
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'temurin'
cache: 'gradle'
- name: 'Collect Info'
run: |
./gradlew currentVersion
- name: 'Publish Snapshot'
if: github.event_name != 'schedule'
env:
NEXUS_USERNAME: ${{ secrets.OSSRH_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
run: |
./gradlew publishToSonatype -Prelease.forceSnapshot

View File

@ -1,49 +0,0 @@
#
# Copyright 2016-2020 The jetcd authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: master
env:
MAVEN_ARGS: -V -ntp -Dhttp.keepAlive=false -e
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set Up Java
uses: actions/setup-java@v2
with:
java-version: 8
distribution: 'adopt'
- name: Build Project
env:
OSSRH_USERNAME: ${{ secrets. OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets. OSSRH_PASSWORD }}
run: |
./mvnw ${MAVEN_ARGS} clean deploy -DskipTests -Pcheck-format --settings etc/mvn-deploy-settings.xml

View File

@ -1,5 +1,5 @@
#
# Copyright 2016-2020 The jetcd authors
# Copyright 2016-2023 The jetcd authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -16,32 +16,36 @@
name: Build PR
env:
MAVEN_ARGS: -V -ntp -Dhttp.keepAlive=false -e
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
permissions:
contents: read
on:
pull_request:
branches:
- master
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set Up Java
uses: actions/setup-java@v2
with:
java-version: 8
distribution: 'adopt'
- name: Build Project
run: |
./mvnw ${MAVEN_ARGS} -Pcheck-format clean install
checks:
uses: ./.github/workflows/checks.yml
build:
needs:
- checks
strategy:
matrix:
java-version:
- 11
- 17
- 21
etcd:
- quay.io/coreos/etcd:v3.5.21
- quay.io/coreos/etcd:v3.6.0
uses: ./.github/workflows/build.yml
with:
javaVersion: "${{ matrix.java-version }}"
etcdImage: "${{ matrix.etcd }}"

33
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,33 @@
name: Build
on:
workflow_call:
inputs:
javaVersion:
required: true
type: string
etcdImage:
required: true
type: string
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v4
- name: 'Set Up Java'
uses: actions/setup-java@v4
with:
java-version: ${{ inputs.javaVersion }}
distribution: 'temurin'
cache: 'gradle'
- name: 'Build Project'
env:
ETCD_IMAGE: ${{ inputs.etcdImage }}
run: |
export TC_USER="$(id -u):$(id -g)"
echo "tc user -> $TC_USER"
./gradlew test --info

37
.github/workflows/checks.yml vendored Normal file
View File

@ -0,0 +1,37 @@
name: Checks
on:
workflow_call:
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 'Set Up Java'
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'temurin'
cache: 'gradle'
- name: 'Run check task'
run: |
./gradlew check -x test
- name: 'Run check script'
run: |
bash ./.github/workflows/scripts/precheck.sh
shell: bash
deps:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: 'Checkout'
uses: actions/checkout@v4
- name: 'Dependency Review'
uses: actions/dependency-review-action@v4

55
.github/workflows/scripts/precheck.sh vendored Normal file
View File

@ -0,0 +1,55 @@
#!/usr/bin/env bash
failed=0
# Check trailing whitespace
files=$(find . -type f \
-not -path "./.git/*" \
-not -path "*/.gradle/*" \
-not -path "*/.idea/*" \
-not -path "*/.vscode/*" \
-not -path "*/build/*" \
-not -path "*/out/*" \
-not -path "*/bin/*" \
-not -name "*.jar" \
-not -name "*.java" \
-exec grep -E -l " +$" {} \;)
count=0
for file in $files; do
((count++))
echo "$file"
done
if [ $count -ne 0 ]; then
failed=1
echo "Error: trailing whitespace(s) in the above $count file(s)"
fi
# Check newline
files=$(find . -type f -size +0c \
-not -path "./.git/*" \
-not -path "*/.gradle/*" \
-not -path "*/.idea/*" \
-not -path "*/.vscode/*" \
-not -path "*/build/*" \
-not -path "*/out/*" \
-not -path "*/bin/*" \
-not -name "*.jar" \
-not -name "*.java" \
-exec bash -c 'if [[ $(tail -c1 "$0" | wc -l) -eq 0 ]]; then echo "$0"; fi' {} \;)
count=0
for file in $files; do
((count++))
echo "$file"
done
if [ $count -ne 0 ]; then
failed=1
echo "Error: no newline in the above $count file(s)"
fi
exit $failed

View File

@ -1,5 +1,5 @@
#
# Copyright 2016-2020 The jetcd authors
# Copyright 2016-2023 The jetcd authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -24,18 +24,19 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v1
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 60
days-before-close: 7
only-labels: 'waiting-for-feedbacks'
stale-issue-label: stale
exempt-issue-label: never-stale
exempt-issue-labels: never-stale
stale-pr-label: stale
exempt-pr-label: never-stale
exempt-pr-labels: never-stale
stale-issue-message: |
This issue is stale because it has been open 60 days with no activity.
This issue is stale because it has been open 60 days with no activity.
Remove stale label or comment or this will be closed in 7 days.
stale-pr-message: |
This PR is stale because it has been open 60 days with no activity.
Remove stale label or comment or this will be closed in 7 days.
Remove stale label or comment or this will be closed in 7 days.

8
.gitignore vendored
View File

@ -1,7 +1,7 @@
.*
!.github
!.gitignore
!.travis.yml
!gradle/wrapper/gradle-wrapper.jar
target/
target-ide/
*.iml
@ -13,8 +13,6 @@ logs/
.project
.env
.sdkmanrc
# Created by './scripts/run_etcd.sh'
/external/
build/
bin/
/jetcd-all/dependency-reduced-pom.xml
out/

View File

@ -1,107 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
import java.util.Properties;
public class MavenWrapperDownloader {
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL =
"https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.0/maven-wrapper-0.4.0.jar";
/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";
/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
".mvn/wrapper/maven-wrapper.jar";
/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if(mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if(mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: : " + url);
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}
}

Binary file not shown.

View File

@ -1 +0,0 @@
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip

View File

@ -4,7 +4,7 @@ jetcd is Apache 2.0 licensed and accepts contributions via GitHub pull requests.
# Email and chat
- Email: [etcd-dev](https://groups.google.com/forum/?hl=en#!forum/etcd-dev)
- Email: [etcd-dev](https://groups.google.com/g/etcd-dev)
- IRC: #[etcd](irc://irc.freenode.org:6667/#etcd) IRC channel on freenode.org
## Getting started
@ -25,7 +25,7 @@ This is a rough outline of what a contributor's workflow looks like:
- Make sure commit messages are in the proper format (see below).
- Push changes in a topic branch to a personal fork of the repository.
- Submit a pull request to etcd-io/jetcd.
- The PR must receive a LGTM from at least one maintainer found in the [MAINTAINERS](https://github.com/etcd-io/etcd/blob/master/MAINTAINERS) file.
- The PR must receive a LGTM from at least one maintainer found in the [OWNERS](https://github.com/etcd-io/jetcd/blob/main/OWNERS) file.
Thanks for contributing!
@ -40,7 +40,7 @@ Please follow this style to make jetcd easy to review, maintain, and develop.
To make sure CI checks would pass please run
```bash
./mvnw license:format
./gradlew spotlessApply
```
and including any changes in PR before opening it.

View File

@ -1,5 +0,0 @@
Fanmin Shi <fanmin.shi@coreos.com> (@fanminshi) pkg:*
Luca Burgazzoli <lburgazzoli@gmail.com> (@lburgazzoli) pkg:*
Xiang Li <xiang.li@coreos.com> (@xiang90) pkg:*
Anthony Romano <anthony.romano@coreos.com> (@heyitsanthony) pkg:*

6
OWNERS Normal file
View File

@ -0,0 +1,6 @@
# See the OWNERS docs at https://go.k8s.io/owners
approvers:
- fanminshi # Fanmin Shi <fanmin.shi@coreos.com>
- lburgazzoli # Luca Burgazzoli <lburgazzoli@gmail.com>
- vorburger # Michael Vorburger <mike@vorburger.ch>

View File

@ -1,8 +1,7 @@
# jetcd - A Java Client for etcd
[![Build Status](https://github.com/etcd-io/jetcd/workflows/master/badge.svg)](https://github.com/etcd-io/jetcd/actions)
[![Build Status](https://github.com/etcd-io/jetcd/actions/workflows/build-main.yml/badge.svg)](https://github.com/etcd-io/jetcd/actions)
[![License](https://img.shields.io/badge/Licence-Apache%202.0-blue.svg?style=flat-square)](http://www.apache.org/licenses/LICENSE-2.0.html)
[![Maven Central](https://img.shields.io/maven-central/v/io.etcd/jetcd-core.svg?style=flat-square)](https://search.maven.org/#search%7Cga%7C1%7Cio.etcd)
[![GitHub release](https://img.shields.io/github/release/etcd-io/jetcd.svg?style=flat-square)](https://github.com/etcd-io/jetcd/releases)
[![Javadocs](http://www.javadoc.io/badge/io/etcd/jetcd-core.svg)](https://javadoc.io/doc/io.etcd/jetcd-core)
jetcd is the official java client for [etcd](https://github.com/etcd-io/etcd) v3.
@ -11,7 +10,7 @@ jetcd is the official java client for [etcd](https://github.com/etcd-io/etcd) v3
## Java Versions
Java 8 or above is required.
Java 11 or above is required.
## Download
@ -24,23 +23,31 @@ Java 8 or above is required.
</dependency>
```
Development snapshots are available in [Sonatypes's snapshot repository](https://oss.sonatype.org/content/repositories/snapshots/io/etcd).
Development snapshots are available in [Sonatypes's snapshot repository](https://oss.sonatype.org/content/repositories/snapshots/io/etcd/).
### Gradle
```
dependencies {
compile "io.etcd:jetcd-core:$jetcd-version"
implementation "io.etcd:jetcd-core:$jetcd-version"
}
```
### Usage
```java
// create client
Client client = Client.builder().endpoints("http://localhost:2379").build();
KV kvClient = client.getKVClient();
// create client using endpoints
Client client = Client.builder().endpoints("http://etcd0:2379", "http://etcd1:2379", "http://etcd2:2379").build();
```
```java
// create client using target which enable using any name resolution mechanism provided
// by grpc-java (i.e. dns:///foo.bar.com:2379)
Client client = Client.builder().target("ip:///etcd0:2379,etcd1:2379,etcd2:2379").build();
```
```java
KV kvClient = client.getKVClient();
ByteSequence key = ByteSequence.from("test_key".getBytes());
ByteSequence value = ByteSequence.from("test_value".getBytes());
@ -56,12 +63,13 @@ GetResponse response = getFuture.get();
// delete the key
kvClient.delete(key).get();
```
To build one ssl secured client, refer to [secured client config](docs/SslConfig.md).
For full etcd v3 API, plesase refer to the [official API documentation](https://etcd.io/docs/current/learning/api/).
### Examples
The [examples](https://github.com/etcd-io/jetcd/tree/master/jetcd-examples) are standalone projects that show usage of jetcd.
The [jetcd-ctl](https://github.com/etcd-io/jetcd/tree/master/jetcd-ctl) is a standalone projects that show usage of jetcd.
## Launcher
@ -69,12 +77,15 @@ The `io.etcd:jetcd-test` offers a convenient utility to programmatically start &
```java
import io.etcd.jetcd.Client;
import io.etcd.jetcd.launcher.EtcdCluster;
import io.etcd.jetcd.test.EtcdClusterExtension;
import org.junit.jupiter.api.extension.RegisterExtension;
@RegisterExtension static final EtcdCluster etcd = new EtcdClusterExtension("test-etcd", 1);
Client client = Client.builder().endpoints(etcd.getClientEndpoints()).build();
@RegisterExtension
public static final EtcdClusterExtension cluster = EtcdClusterExtension.builder()
.withNodes(1)
.build();
Client client = Client.builder().endpoints(cluster.clientEndpoints()).build();
```
This launcher uses the Testcontainers framework.
@ -88,10 +99,10 @@ The current major version is zero (0.y.z). Anything may change at any time. The
## Build from source
The project can be built with [Apache Maven](https://maven.apache.org/):
The project can be built with [Gradle](https://gradle.org/):
```
mvn clean install -DskipTests
./gradlew compileJava
```
## Running tests
@ -99,33 +110,8 @@ mvn clean install -DskipTests
The project is tested against a three node `etcd` setup started with the Launcher (above) :
```sh
$ mvn test
...
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running TestSuite
[WARNING] Tests run: 104, Failures: 0, Errors: 0, Skipped: 3, Time elapsed: 31.308 s - in TestSuite
[INFO]
[INFO] Results:
[INFO]
[WARNING] Tests run: 104, Failures: 0, Errors: 0, Skipped: 3
...
[INFO] Reactor Summary:
[INFO]
[INFO] jetcd .............................................. SUCCESS [ 0.010 s]
[INFO] jetcd-core ......................................... SUCCESS [ 55.480 s]
[INFO] jetcd-discovery-dns-srv ............................ SUCCESS [ 3.225 s]
[INFO] jetcd-watch-example ................................ SUCCESS [ 0.291 s]
[INFO] jetcd-simple-ctl ................................... SUCCESS [ 0.028 s]
[INFO] jetcd-examples ..................................... SUCCESS [ 0.000 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 59.929 s
[INFO] Finished at: 2018-02-13T12:51:13-08:00
[INFO] Final Memory: 84M/443M
````
$ ./gradlew test
```
### Troubleshooting
@ -133,17 +119,14 @@ It recommmonds building the project before running tests so that you have artifa
## Contact
* Mailing list: [etcd-dev](https://groups.google.com/forum/?hl=en#!forum/etcd-dev)
* IRC: #[etcd](irc://irc.freenode.org:6667/#etcd) on freenode.org
* Mailing list: [etcd-dev](https://groups.google.com/g/etcd-dev)
## Contributing
See [CONTRIBUTING](https://github.com/etcd-io/jetcd/blob/master/CONTRIBUTING.md) for details on submitting patches and the contribution workflow.
## Reporting bugs
See [reporting bugs](https://github.com/etcd-io/etcd/blob/master/Documentation/reporting-bugs.md) for details about reporting any issues.
## License
jetcd is under the Apache 2.0 license. See the [LICENSE](https://github.com/etcd-io/jetcd/blob/master/LICENSE) file for details.

100
build.gradle Normal file
View File

@ -0,0 +1,100 @@
/*
* Copyright 2016-2021 The jetcd authors
*
* Licensed under the Apache License, Version 2.0 (the 'License');
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an 'AS IS' BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
buildscript {
repositories {
gradlePluginPortal()
}
dependencies {
classpath "com.github.ben-manes:gradle-versions-plugin:${libs.versions.versionsPlugin.get()}"
classpath "com.diffplug.spotless:spotless-plugin-gradle:${libs.versions.spotlessPlugin.get()}"
classpath "net.ltgt.gradle:gradle-errorprone-plugin:${libs.versions.errorPronePlugin.get()}"
classpath "io.github.gradle-nexus:publish-plugin:${libs.versions.nexusPublishPlugin.get()}"
classpath "com.adarshr:gradle-test-logger-plugin:${libs.versions.testLoggerPlugin.get()}"
classpath "pl.allegro.tech.build:axion-release-plugin:${libs.versions.axionReleasePlugin.get()}"
classpath "org.gradle:test-retry-gradle-plugin:${libs.versions.testRetryPlugin.get()}"
}
}
apply from: "${rootProject.projectDir}/gradle/versions.gradle"
apply from: "${rootProject.projectDir}/gradle/publish.gradle"
apply from: "${rootProject.projectDir}/gradle/release.gradle"
group = 'io.etcd'
allprojects {
repositories {
mavenLocal()
mavenCentral()
}
}
subprojects {
apply from: "${rootProject.projectDir}/gradle/style.gradle"
apply from: "${rootProject.projectDir}/gradle/quality.gradle"
apply from: "${rootProject.projectDir}/gradle/publishing-release.gradle"
apply from: "${rootProject.projectDir}/gradle/publishing-release-tasks.gradle"
apply plugin: 'java-library'
apply plugin: 'com.adarshr.test-logger'
apply plugin: 'org.gradle.test-retry'
configurations.api {
exclude group: 'com.google.code.gson', module: 'gson'
exclude group: 'com.google.android', module: 'annotations'
exclude group: 'com.google.j2objc', module: 'j2objc-annotations'
exclude group: 'org.codehaus.mojo', module: 'animal-sniffer-annotations'
exclude group: 'com.google.errorprone', module: 'error_prone_annotations'
exclude group: 'com.google.code.findbugs', module: 'jsr305'
exclude group: 'org.checkerframework', module: 'checker-compat-qual'
}
compileJava {
options.release = 11
}
test {
useJUnitPlatform()
maxParallelForks = Runtime.runtime.availableProcessors() ?: 1
retry {
maxRetries = 1
maxFailures = 5
}
}
testing {
suites {
test {
useJUnitJupiter()
}
}
}
testlogger {
theme 'mocha-parallel'
showStandardStreams false
}
tasks.register('allDeps', DependencyReportTask)
tasks.withType(AbstractArchiveTask).configureEach {
preserveFileTimestamps = false
reproducibleFileOrder = true
}
}

View File

@ -1,61 +1,3 @@
## CoreOS Community Code of Conduct
## etcd Community Code of Conduct
### Contributor Code of Conduct
As contributors and maintainers of this project, and in the interest of
fostering an open and welcoming community, we pledge to respect all people who
contribute through reporting issues, posting feature requests, updating
documentation, submitting pull requests or patches, and other activities.
We are committed to making participation in this project a harassment-free
experience for everyone, regardless of level of experience, gender, gender
identity and expression, sexual orientation, disability, personal appearance,
body size, race, ethnicity, age, religion, or nationality.
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery
* Personal attacks
* Trolling or insulting/derogatory comments
* Public or private harassment
* Publishing others' private information, such as physical or electronic addresses, without explicit permission
* Other unethical or unprofessional conduct.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct. By adopting this Code of Conduct,
project maintainers commit themselves to fairly and consistently applying these
principles to every aspect of managing this project. Project maintainers who do
not follow or enforce the Code of Conduct may be permanently removed from the
project team.
This code of conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community.
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting a project maintainer, Brandon Philips
<brandon.philips@coreos.com>, and/or Rithu John <rithu.john@coreos.com>.
This Code of Conduct is adapted from the Contributor Covenant
(http://contributor-covenant.org), version 1.2.0, available at
http://contributor-covenant.org/version/1/2/0/
### CoreOS Events Code of Conduct
CoreOS events are working conferences intended for professional networking and
collaboration in the CoreOS community. Attendees are expected to behave
according to professional standards and in accordance with their employers
policies on appropriate workplace behavior.
While at CoreOS events or related social networking opportunities, attendees
should not engage in discriminatory or offensive speech or actions including
but not limited to gender, sexuality, race, age, disability, or religion.
Speakers should be especially aware of these concerns.
CoreOS does not condone any statements by speakers contrary to these standards.
CoreOS reserves the right to deny entrance and/or eject from an event (without
refund) any individual found to be engaging in discriminatory or offensive
speech or actions.
Please bring any concerns to the immediate attention of designated on-site
staff, Brandon Philips <brandon.philips@coreos.com>, and/or Rithu John <rithu.john@coreos.com>.
etcd follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).

View File

@ -26,6 +26,3 @@ for (KeyValue kv : response.getKvs()) {
);
}
----

View File

@ -46,7 +46,7 @@ The Lease interface provides methods to grant, revoke, and keepalive leases.
1. This function is called periodically by `keepAliveSchedule`.
2. The lease may expire as:
* The etcd respond overtime.
* The client faile to send request in time.
* The client fails to send request in time.
3. It will scan the keepAlives map and find the leases that requires keepAlive requests to send based on its nextKeepAliveTime.
4. Send request to the StreamObserver for these leases.
@ -66,4 +66,4 @@ The Lease interface provides methods to grant, revoke, and keepalive leases.
1. The StreamObserver is the stream etcd uses to send responses.
2. The gRPC client calls onNext when etcd server delivers a response.
3. The onNext function will call `processKeepAliveRespond`.
3. The onNext function will call `processKeepAliveRespond`.

21
docs/RELEASE.adoc Normal file
View File

@ -0,0 +1,21 @@
= Release
+
[source,shell]
----
$ ./gradlew currentVersion
Project version: 0.7.5-SNAPSHOT
$ ./gradlew release
$ git tag
jetcd-0.7.5
$ ./gradlew currentVersion
Project version: 0.7.5
$ ./gradlew publish
published jetcd-0.7.5 release version
$ ./gradlew markNextVersion -Prelease.version=0.7.6
----

36
docs/SslConfig.md Normal file
View File

@ -0,0 +1,36 @@
# How to Build Jectd Client for One TLS Secured Etcd Cluster
# prepare certification files
If your etcd cluster is installed using [etcdadm](https://github.com/kubernetes-sigs/etcdadm), you are likely to find
certification files in the path `/etc/etcd/pki/`: `ca.crt`, `etcdctl-etcd-client.key`, `etcdctl-etcd-client.crt`.
If your etcd cluster is the builtin etcd in one kubernetes cluster(
using [kubeadm](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/setup-ha-etcd-with-kubeadm/)),
you can find the same files in `/etc/kubernetes/pki/etcd/`: `ca.crt`, `healthcheck-client.crt`, `healthcheck-client.key`.
Because `SslContextBuilder` only support a PKCS#8 private key file in PEM format, convert `etcdctl-etcd-client.key`
to `etcdctl-etcd-client.key.pem` according
to [netty SslContextBuilder doc](https://netty.io/wiki/sslcontextbuilder-and-private-key.html).
# build jetcd client
```
File cert = new File("ca.crt");
File keyCertChainFile = new File("etcdctl-etcd-client.crt");
File keyFile = new File("etcdctl-etcd-client.key.pem");
SslContext context = GrpcSslContexts.forClient()
.trustManager(cert)
.keyManager(keyCertChainFile, keyFile)
.build();
Client client = Client.builder()
.endpoints("https://10.168.168.66:2379")
.sslContext(context)
.build();
client.getClusterClient().listMember().get().getMembers().forEach(member -> {
logger.info("member: {}", member);
});
```

View File

@ -12,15 +12,15 @@ The Watch provide methods to watch on a key interval and cancel a watcher. If th
4. Cancel watch request, the etcd client should process watch cancellation and filter all the notification after cancellation request.
5. The watch client should be able to make a progress notify request that propagates the latest revision number to all watches
5. The watch client should be able to make a progress notify request that propagates the latest revision number to all watches.
# Implementation
The etcd client process watch request with [watch function](#watch-function), process notification with [processEvents function](#processevents-function) , process resume with [resume function](#resume-function), process cancel with [cancelWatch function](#cancelwatch-function) and request progress with [requestProgress function](#requestProgress-function).
The etcd client process watch request with [watch function](#watch-function), process notification with [processEvents function](#processevents-function), process resume with [resume function](#resume-function), process cancel with [cancelWatch function](#cancelwatch-function) and request progress with [requestProgress function](#requestProgress-function).
## watch function
Watch watches on a key interval.
Watch watches on a key interval.
1. Send create request to [requestStream](#requeststream-instance).
2. If the watch is create successfully, the `onCreate` will be called and the ListenableFuture task will be completed.
@ -116,4 +116,4 @@ Process cancel response from etcd server.
Resume all the the watchers on new requestStream.
1. Build new watch creation request for old watcher with last revision + 1.
2. Call `watch` function with the new watch creation request.
2. Call `watch` function with the new watch creation request.

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2016-2021 The jetcd authors
Copyright 2016-2023 The jetcd authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -271,4 +271,3 @@
<setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="CHECKSTYLE:ON"/>
</profile>
</profiles>

7
etc/eclipse.importorder Normal file
View File

@ -0,0 +1,7 @@
0=java
1=javax
2=org
2=io
4=com
5=
6=\#

View File

@ -1,4 +1,4 @@
Copyright ${license.git.copyrightYears} The jetcd authors
Copyright $YEAR The jetcd authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -10,4 +10,4 @@ Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.

View File

@ -1,33 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2016-2021 The jetcd authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>ossrh</id>
<username>${env.OSSRH_USERNAME}</username>
<password>${env.OSSRH_PASSWORD}</password>
</server>
</servers>
</settings>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2016-2021 The jetcd authors
Copyright 2016-2023 The jetcd authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -23,8 +23,7 @@
<description>PMD Rules that govern static code analysis for jetcd</description>
<exclude-pattern>.*/org/apache/camel/k/loader/yaml/support/.*</exclude-pattern>
<exclude-pattern>.*/org/apache/camel/k/loader/yaml/parser/.*</exclude-pattern>
<exclude-pattern>.*/io/etcd/jetcd/api/.*</exclude-pattern>
<rule ref="category/java/bestpractices.xml/AvoidUsingHardCodedIP"/>
<rule ref="category/java/bestpractices.xml/UnusedFormalParameter"/>
@ -44,10 +43,8 @@
<rule ref="category/java/codestyle.xml/UselessParentheses"/>
<rule ref="category/java/codestyle.xml/UselessQualifiedThis"/>
<rule ref="category/java/codestyle.xml/ControlStatementBraces"/>
<rule ref="category/java/codestyle.xml/UnnecessaryImport" />
<rule ref="category/java/codestyle.xml/UnnecessaryImport"/>
<rule ref="category/java/codestyle.xml/EmptyControlStatement"/>
<rule ref="category/java/design.xml/FinalFieldCouldBeStatic">
<priority>4</priority>
@ -77,15 +74,6 @@
</properties>
</rule>
<rule ref="category/java/errorprone.xml/EmptyFinallyBlock"/>
<rule ref="category/java/errorprone.xml/EmptyIfStmt"/>
<rule ref="category/java/errorprone.xml/EmptyInitializer"/>
<rule ref="category/java/errorprone.xml/EmptyStatementBlock"/>
<rule ref="category/java/errorprone.xml/EmptyStatementNotInLoop"/>
<rule ref="category/java/errorprone.xml/EmptySwitchStatements"/>
<rule ref="category/java/errorprone.xml/EmptySynchronizedBlock"/>
<rule ref="category/java/errorprone.xml/EmptyTryBlock"/>
<rule ref="category/java/errorprone.xml/EmptyWhileStmt"/>
<rule ref="category/java/errorprone.xml/JumbledIncrementer"/>
<rule ref="category/java/errorprone.xml/MisplacedNullCheck"/>
<rule ref="category/java/errorprone.xml/OverrideBothEqualsAndHashcode"/>
@ -102,4 +90,4 @@
<rule ref="category/java/performance.xml/BigIntegerInstantiation"/>
<rule ref="category/java/bestpractices.xml/PrimitiveWrapperInstantiation" />
</ruleset>
</ruleset>

View File

@ -1,35 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2016-2021 The jetcd authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<ruleset xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
comparisonMethod="maven"
xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 http://mojo.codehaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
<ignoreVersions>
<!-- Ignore Alpha's, Beta's, release candidates and milestones -->
<ignoreVersion type="regex">(?i).*Alpha(?:-?\d+)?</ignoreVersion>
<ignoreVersion type="regex">(?i).*a(?:-?\d+)?</ignoreVersion>
<ignoreVersion type="regex">(?i).*Beta(?:-?\d+)?</ignoreVersion>
<ignoreVersion type="regex">(?i).*-B(?:-?\d+)?</ignoreVersion>
<ignoreVersion type="regex">(?i).*RC(?:-?\d+)?</ignoreVersion>
<ignoreVersion type="regex">(?i).*CR(?:-?\d+)?</ignoreVersion>
<ignoreVersion type="regex">(?i).*M(?:-?\d+)?</ignoreVersion>
</ignoreVersions>
<rules>
</rules>
</ruleset>

10
gradle.properties Normal file
View File

@ -0,0 +1,10 @@
#
# project
#
gitProject = https://github.com/etcd-io/jetcd
gitURL = git@github.com/etcd-io/jetcd.git
#
# gradle
#
org.gradle.parallel = true

86
gradle/libs.versions.toml Normal file
View File

@ -0,0 +1,86 @@
[versions]
grpc = "1.74.0"
log4j = "2.25.1"
mockito = "5.18.0"
slf4j = "2.0.17"
guava = "33.4.8-jre"
assertj = "3.27.3"
junit = "5.13.4"
testcontainers = "1.21.3"
protoc = "3.25.1"
failsafe = "3.3.2"
awaitility = "4.3.0"
commonsIo = "2.20.0"
commonCompress = "1.28.0"
autoService = "1.1.1"
errorprone = "2.30.0"
vertx = "5.0.1"
picocli = "4.7.7"
restAssured = "5.5.5"
javaxAnnotation = "1.3.2"
versionsPlugin = "0.52.0"
errorPronePlugin = "4.0.1"
spotlessPlugin = "6.25.0"
shadowPlugin = "8.1.1"
testLoggerPlugin = "4.0.0"
protobufPlugin = "0.9.5"
nexusPublishPlugin = "2.0.0"
axionReleasePlugin = "1.18.17"
testRetryPlugin = "1.6.2"
[libraries]
slf4j = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" }
guava = { module = "com.google.guava:guava", version.ref = "guava" }
assertj = { module = "org.assertj:assertj-core", version.ref = "assertj" }
junit = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit" }
testcontainers = { module = "org.testcontainers:testcontainers", version.ref = "testcontainers" }
protoc = { module = "com.google.protobuf:protoc", version.ref = "protoc" }
failsafe = { module = "dev.failsafe:failsafe", version.ref = "failsafe" }
awaitility = { module = "org.awaitility:awaitility", version.ref = "awaitility" }
picocli = { module = "info.picocli:picocli", version.ref = "picocli"}
restAssured = { module = "io.rest-assured:rest-assured", version.ref = "restAssured"}
commonsIo = { module = "commons-io:commons-io", version.ref = "commonsIo" }
commonsCompress = { module = "org.apache.commons:commons-compress", version.ref = "commonCompress" }
mockitoCore = { module = "org.mockito:mockito-core", version.ref = "mockito" }
mockitoJunit = { module = "org.mockito:mockito-junit-jupiter", version.ref = "mockito" }
grpcCore = { module = "io.grpc:grpc-core", version.ref = "grpc" }
grpcNetty = { module = "io.grpc:grpc-netty", version.ref = "grpc" }
grpcProtobuf = { module = "io.grpc:grpc-protobuf", version.ref = "grpc" }
grpcStub = { module = "io.grpc:grpc-stub", version.ref = "grpc" }
grpcGrpclb = { module = "io.grpc:grpc-grpclb", version.ref = "grpc" }
grpcInprocess = { module = "io.grpc:grpc-inprocess", version.ref = "grpc" }
grpcUtil = { module = "io.grpc:grpc-util", version.ref = "grpc" }
vertxGrpc = { module = "io.vertx:vertx-grpc", version.ref = "vertx" }
log4jApi = { module = "org.apache.logging.log4j:log4j-api", version.ref = "log4j" }
log4jCore = { module = "org.apache.logging.log4j:log4j-core", version.ref = "log4j" }
log4jSlf4j = { module = "org.apache.logging.log4j:log4j-slf4j2-impl", version.ref = "log4j" }
log4j12 = { module = "org.apache.logging.log4j:log4j-1.2-api", version.ref = "log4j" }
autoServiceAnnotations = { module = "com.google.auto.service:auto-service-annotations", version.ref = "autoService"}
autoServiceProcessor = { module = "com.google.auto.service:auto-service", version.ref = "autoService"}
javaxAnnotation = { module = "javax.annotation:javax.annotation-api", version.ref = "javaxAnnotation" }
errorprone = { module = "com.google.errorprone:error_prone_core", version.ref = "errorprone" }
errorproneAnnotations = { module = "com.google.errorprone:error_prone_annotations", version.ref = "errorprone" }
errorproneJavac = { module = "com.google.errorprone:javac", version = "9+" }
[bundles]
grpc = [ "grpcCore", "grpcNetty", "grpcProtobuf", "grpcStub", "grpcGrpclb", "grpcUtil"]
grpcTest = [ "grpcInprocess"]
log4j = [ "log4jApi", "log4jCore", "log4jSlf4j", "log4j12" ]
mockito = [ "mockitoCore", "mockitoJunit" ]
testing = ["junit", "assertj", "mockitoCore", "mockitoJunit"]
javax = [ "javaxAnnotation" ]
[plugins]
shadow = { id = "com.github.johnrengelman.shadow", version.ref = "shadowPlugin" }
protobuf = { id = "com.google.protobuf", version.ref = "protobufPlugin" }

39
gradle/publish.gradle Normal file
View File

@ -0,0 +1,39 @@
/*
* Copyright 2016-2021 The jetcd authors
*
* Licensed under the Apache License, Version 2.0 (the 'License');
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an 'AS IS' BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
apply plugin: "signing"
apply plugin: "maven-publish"
apply plugin: "io.github.gradle-nexus.publish-plugin"
ext {
if (!project.hasProperty('nexusUsername')) {
nexusUsername = "$System.env.NEXUS_USERNAME"
}
if (!project.hasProperty('nexusPassword')) {
nexusPassword = "$System.env.NEXUS_PASSWORD"
}
}
nexusPublishing {
repositories {
sonatype {
username = nexusUsername
password = nexusPassword
}
}
}
//afterReleaseBuild.dependsOn publishToSonatype

View File

@ -0,0 +1,25 @@
/*
* Copyright 2016-2023 The jetcd authors
*
* Licensed under the Apache License, Version 2.0 (the 'License');
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an 'AS IS' BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
apply plugin: 'maven-publish'
task pubblications {
doLast {
project.publishing.publications.each { publication ->
println "Publication $publication.name [$publication.groupId/$publication.artifactId/$publication.version]"
}
}
}

View File

@ -0,0 +1,100 @@
/*
* Copyright 2016-2023 The jetcd authors
*
* Licensed under the Apache License, Version 2.0 (the 'License');
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an 'AS IS' BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'signing'
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
"${project.name}"(MavenPublication) {
groupId = rootProject.group
from components.java
pom {
name = project.name
description = project.name
url = "${gitProject}"
scm {
url = "${gitProject}"
connection = "scm:${gitProject}"
developerConnection = "scm:${gitURL}"
}
licenses {
license {
name = 'The Apache Software License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution = 'repo'
}
}
developers {
developer {
id = 'lburgazzoli'
name = 'Luca Burgazzoli'
organization = 'Red Hat'
organizationUrl = 'http://redhat.com'
}
developer {
name = 'Fanmin Shi'
organization = 'CoreOS'
organizationUrl = 'http://coreos.com'
}
developer {
name = 'Xiang Li'
organization = 'CoreOS'
organizationUrl = 'http://coreos.com'
}
developer {
name = 'Anthony Romano'
organization = 'CoreOS'
organizationUrl = 'http://coreos.com'
}
}
}
}
}
}
signing {
required {
!version.endsWith('SNAPSHOT')
}
if (!version.endsWith('SNAPSHOT')) {
useGpgCmd()
}
sign publishing.publications."${project.name}"
}
check.dependsOn javadoc
javadoc {
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
exclude "**/io/etcd/jetcd/api/**"
}

37
gradle/quality.gradle Normal file
View File

@ -0,0 +1,37 @@
/*
* Copyright 2016-2021 The jetcd authors
*
* Licensed under the Apache License, Version 2.0 (the 'License');
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an 'AS IS' BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
apply plugin: "net.ltgt.errorprone"
apply plugin: "pmd"
dependencies {
errorprone(libs.errorprone)
errorprone(libs.errorproneAnnotations)
errorproneJavac(libs.errorproneJavac)
}
tasks.withType(JavaCompile).configureEach {
options.errorprone {
excludedPaths = '.*/generated/.*'
disableWarningsInGeneratedCode = true
}
options.deprecation = true
}
pmd {
consoleOutput = true
ruleSets = [ "${project.rootDir}/etc/pmd-ruleset.xml" ]
}

28
gradle/release.gradle Normal file
View File

@ -0,0 +1,28 @@
/*
* Copyright 2016-2023 The jetcd authors
*
* Licensed under the Apache License, Version 2.0 (the 'License');
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an 'AS IS' BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
apply plugin: "pl.allegro.tech.build.axion-release"
scmVersion {
tag {
prefix = 'jetcd-'
}
}
allprojects {
project.version = scmVersion.version
}

29
gradle/style.gradle Normal file
View File

@ -0,0 +1,29 @@
/*
* Copyright 2016-2021 The jetcd authors
*
* Licensed under the Apache License, Version 2.0 (the 'License');
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an 'AS IS' BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
apply plugin: "com.diffplug.spotless"
spotless {
java {
removeUnusedImports()
trimTrailingWhitespace()
indentWithSpaces(4)
endWithNewline()
importOrderFile(rootProject.file('etc/eclipse.importorder'))
eclipse().configFile(rootProject.file('etc/eclipse-formatter-config.xml'))
targetExclude("build/generated/**/*.java")
}
}

32
gradle/versions.gradle Normal file
View File

@ -0,0 +1,32 @@
/*
* Copyright 2016-2021 The jetcd authors
*
* Licensed under the Apache License, Version 2.0 (the 'License');
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an 'AS IS' BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
apply plugin: 'com.github.ben-manes.versions'
dependencyUpdates.configure {
def isNonStable = { String version ->
return ['alpha', 'beta', 'rc', 'cr', 'm', 'ea'].any { keyword -> version.toUpperCase().contains(keyword.toUpperCase())}
}
rejectVersionIf {
isNonStable(it.candidate.version)
}
}
task deps {
dependsOn dependencyUpdates
}

BIN
gradle/wrapper/gradle-wrapper.jar vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

251
gradlew vendored Executable file
View File

@ -0,0 +1,251 @@
#!/bin/sh
#
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
##############################################################################
#
# Gradle start up script for POSIX generated by Gradle.
#
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
app_path=$0
# Need this for daisy-chained symlinks.
while
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
[ -h "$app_path" ]
do
ls=$( ls -ld "$app_path" )
link=${ls#*' -> '}
case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
warn () {
echo "$*"
} >&2
die () {
echo
echo "$*"
echo
exit 1
} >&2
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "$( uname )" in #(
CYGWIN* ) cygwin=true ;; #(
Darwin* ) darwin=true ;; #(
MSYS* | MINGW* ) msys=true ;; #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH="\\\"\\\""
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD=$JAVA_HOME/jre/sh/java
else
JAVACMD=$JAVA_HOME/bin/java
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD=java
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
fi
# Collect all arguments for the java command, stacking in reverse order:
# * args from the command line
# * the main class name
# * -classpath
# * -D...appname settings
# * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
# Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
fi
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
done
fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#
eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'
exec "$JAVACMD" "$@"

94
gradlew.bat vendored Normal file
View File

@ -0,0 +1,94 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
:execute
@rem Setup the command line
set CLASSPATH=
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
:end
@rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

View File

@ -1,131 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2016-2021 The jetcd authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>io.etcd</groupId>
<artifactId>jetcd-parent</artifactId>
<version>0.5.11</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetcd-all</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>io.etcd</groupId>
<artifactId>jetcd-common</artifactId>
<exclusions>
<exclusion>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-annotations</artifactId>
</exclusion>
<exclusion>
<groupId>org.checkerframework</groupId>
<artifactId>checker-compat-qual</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.j2objc</groupId>
<artifactId>j2objc-annotations</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.etcd</groupId>
<artifactId>jetcd-core</artifactId>
<exclusions>
<exclusion>
<groupId>org.checkerframework</groupId>
<artifactId>checker-compat-qual</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.etcd</groupId>
<artifactId>jetcd-extensions</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createSourcesJar>true</createSourcesJar>
<createDependencyReducedPom>true</createDependencyReducedPom>
<shadedArtifactAttached>false</shadedArtifactAttached>
<minimizeJar>false</minimizeJar>
<artifactSet>
<excludes>
<exclude>org.slf4j:slf4j-api</exclude>
<exclude>com.google.errorprone:error_prone_annotations</exclude>
</excludes>
</artifactSet>
<relocations>
<relocation>
<pattern>com.google</pattern>
<shadedPattern>io.etcd.jetcd.shaded.com.google</shadedPattern>
</relocation>
<relocation>
<pattern>io.grpc</pattern>
<shadedPattern>io.etcd.jetcd.shaded.io.grpc</shadedPattern>
</relocation>
<relocation>
<pattern>io.netty</pattern>
<shadedPattern>io.etcd.jetcd.shaded.io.netty</shadedPattern>
</relocation>
<relocation>
<pattern>javax.annotation</pattern>
<shadedPattern>io.etcd.jetcd.shaded.javax.annotation</shadedPattern></relocation>
<relocation>
<pattern>io.opencensus</pattern>
<shadedPattern>io.etcd.jetcd.shaded.io.opencensus</shadedPattern>
</relocation>
<relocation>
<pattern>io.opencensus</pattern>
<shadedPattern>io.etcd.jetcd.shaded.io.opencensus</shadedPattern>
</relocation>
<relocation>
<pattern>net.jodah</pattern>
<shadedPattern>io.etcd.jetcd.shaded.net.jodah</shadedPattern>
</relocation>
</relocations>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -14,4 +14,7 @@
* limitations under the License.
*/
package io.etcd.jetcd.all;
dependencies {
api libs.slf4j
}

View File

@ -14,9 +14,12 @@
* limitations under the License.
*/
package io.etcd.jetcd.extensions;
public final class Extensions {
private Extensions() {
}
dependencies {
api libs.slf4j
api libs.guava
api libs.grpcCore
testImplementation libs.bundles.testing
testRuntimeOnly libs.bundles.log4j
}

View File

@ -1,73 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2016-2021 The jetcd authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>io.etcd</groupId>
<artifactId>jetcd-parent</artifactId>
<version>0.5.11</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetcd-common</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-core</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>io/etcd/jetcd/api/**</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>${maven-pmd-plugin-version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,57 @@
/*
* Copyright 2016-2021 The jetcd authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.etcd.jetcd.common;
import java.util.concurrent.atomic.AtomicBoolean;
public abstract class Service implements AutoCloseable {
private final AtomicBoolean running;
protected Service() {
this.running = new AtomicBoolean();
}
public void start() {
if (this.running.compareAndSet(false, true)) {
doStart();
}
}
public void stop() {
if (this.running.compareAndSet(true, false)) {
doStop();
}
}
public void restart() {
stop();
start();
}
@Override
public void close() {
stop();
}
public boolean isRunning() {
return running.get();
}
protected abstract void doStart();
protected abstract void doStop();
}

View File

@ -31,12 +31,22 @@ import io.grpc.Status;
*/
public enum ErrorCode {
CANCELLED(Status.CANCELLED), UNKNOWN(Status.UNKNOWN), INVALID_ARGUMENT(Status.INVALID_ARGUMENT),
DEADLINE_EXCEEDED(Status.DEADLINE_EXCEEDED), NOT_FOUND(Status.NOT_FOUND), ALREADY_EXISTS(Status.ALREADY_EXISTS),
PERMISSION_DENIED(Status.PERMISSION_DENIED), UNAUTHENTICATED(Status.UNAUTHENTICATED),
RESOURCE_EXHAUSTED(Status.RESOURCE_EXHAUSTED), FAILED_PRECONDITION(Status.FAILED_PRECONDITION), ABORTED(Status.ABORTED),
OUT_OF_RANGE(Status.OUT_OF_RANGE), UNIMPLEMENTED(Status.UNIMPLEMENTED), INTERNAL(Status.INTERNAL),
UNAVAILABLE(Status.UNAVAILABLE), DATA_LOSS(Status.DATA_LOSS),;
CANCELLED(Status.CANCELLED),
UNKNOWN(Status.UNKNOWN),
INVALID_ARGUMENT(Status.INVALID_ARGUMENT),
DEADLINE_EXCEEDED(Status.DEADLINE_EXCEEDED),
NOT_FOUND(Status.NOT_FOUND),
ALREADY_EXISTS(Status.ALREADY_EXISTS),
PERMISSION_DENIED(Status.PERMISSION_DENIED),
UNAUTHENTICATED(Status.UNAUTHENTICATED),
RESOURCE_EXHAUSTED(Status.RESOURCE_EXHAUSTED),
FAILED_PRECONDITION(Status.FAILED_PRECONDITION),
ABORTED(Status.ABORTED),
OUT_OF_RANGE(Status.OUT_OF_RANGE),
UNIMPLEMENTED(Status.UNIMPLEMENTED),
INTERNAL(Status.INTERNAL),
UNAVAILABLE(Status.UNAVAILABLE),
DATA_LOSS(Status.DATA_LOSS),;
private static final Map<Integer, ErrorCode> errorByRpcCode;

View File

@ -16,7 +16,7 @@
package io.etcd.jetcd.common.exception;
import static com.google.common.base.Preconditions.checkNotNull;
import java.util.Objects;
/**
* Base exception type for all exceptions produced by the etcd service.
@ -27,11 +27,13 @@ public class EtcdException extends RuntimeException {
EtcdException(ErrorCode code, String message, Throwable cause) {
super(message, cause);
this.code = checkNotNull(code);
this.code = Objects.requireNonNull(code, "Error code must not be null");
}
/**
* Returns the error code associated with this exception.
*
* @return a {@link ErrorCode}
*/
public ErrorCode getErrorCode() {
return code;

View File

@ -16,9 +16,10 @@
package io.etcd.jetcd.common.exception;
import java.util.Objects;
import io.grpc.Status;
import static com.google.common.base.Preconditions.checkNotNull;
import static io.grpc.Status.fromThrowable;
/**
@ -65,7 +66,7 @@ public final class EtcdExceptionFactory {
}
public static EtcdException toEtcdException(Throwable cause) {
checkNotNull(cause, "cause can't be null");
Objects.requireNonNull(cause, "cause can't be null");
if (cause instanceof EtcdException) {
return (EtcdException) cause;
}
@ -74,7 +75,7 @@ public final class EtcdExceptionFactory {
}
public static EtcdException toEtcdException(Status status) {
checkNotNull(status, "status can't be null");
Objects.requireNonNull(status, "status can't be null");
return fromStatus(status);
}

40
jetcd-core/build.gradle Normal file
View File

@ -0,0 +1,40 @@
/*
* Copyright 2016-2021 The jetcd authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
dependencies {
api project(':jetcd-grpc')
api project(':jetcd-api')
api project(':jetcd-common')
api libs.slf4j
api libs.guava
api libs.failsafe
//compileOnly libs.javaxAnnotation
compileOnly libs.autoServiceAnnotations
annotationProcessor libs.autoServiceProcessor
testImplementation project(':jetcd-launcher')
testImplementation project(':jetcd-test')
testImplementation libs.restAssured
testImplementation libs.awaitility
testImplementation libs.commonsIo
testImplementation libs.bundles.testing
testRuntimeOnly libs.bundles.log4j
}

View File

@ -1,232 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2016-2021 The jetcd authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>io.etcd</groupId>
<artifactId>jetcd-parent</artifactId>
<version>0.5.11</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jetcd-core</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>jetcd-common</artifactId>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-core</artifactId>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty</artifactId>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-protobuf</artifactId>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-stub</artifactId>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-grpclb</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>net.jodah</groupId>
<artifactId>failsafe</artifactId>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</dependency>
<dependency>
<groupId>com.google.auto.service</groupId>
<artifactId>auto-service-annotations</artifactId>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-migrationsupport</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-testing</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-tcnative-boringssl-static</artifactId>
<version>${netty-tcnative.version}</version>
<classifier>${os.detected.classifier}</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>jetcd-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>${os-maven-plugin.version}</version>
<extensions>true</extensions>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>detect</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
<configuration>
<protocArtifact>
com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}
</protocArtifact>
<pluginId>grpc-java</pluginId>
<pluginArtifact>
io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}
</pluginArtifact>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>compile-custom</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>test</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${basedir}/target/generated-sources/protobuf/grpc-java</source>
<source>${basedir}/target/generated-sources/protobuf/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>io/etcd/jetcd/api/**</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>${maven-pmd-plugin-version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

View File

@ -17,11 +17,10 @@
package io.etcd.jetcd;
import java.nio.charset.Charset;
import java.util.Objects;
import com.google.protobuf.ByteString;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* Etcd binary bytes, easy to convert between byte[], String and ByteString.
*/
@ -33,7 +32,7 @@ public final class ByteSequence {
private final ByteString byteString;
private ByteSequence(ByteString byteString) {
checkNotNull(byteString, "byteString should not be null");
Objects.requireNonNull(byteString, "byteString should not be null");
this.byteString = byteString;
this.hashVal = byteString.hashCode();
}
@ -49,9 +48,7 @@ public final class ByteSequence {
if (prefix == null) {
return false;
}
ByteString baseByteString = this.getByteString();
ByteString prefixByteString = prefix.getByteString();
return baseByteString.startsWith(prefixByteString);
return byteString.startsWith(prefix.byteString);
}
/**
@ -61,8 +58,19 @@ public final class ByteSequence {
* @return a new {@code ByteSequence} instance
*/
public ByteSequence concat(ByteSequence other) {
checkNotNull(other, "other byteSequence should not be null");
return new ByteSequence(this.byteString.concat(other.getByteString()));
Objects.requireNonNull(other, "other byteSequence should not be null");
return new ByteSequence(this.byteString.concat(other.byteString));
}
/**
* Concatenate the given {@code ByteSequence} to this one.
*
* @param other string to concatenate
* @return a new {@code ByteSequence} instance
*/
public ByteSequence concat(ByteString other) {
Objects.requireNonNull(other, "other byteSequence should not be null");
return new ByteSequence(this.byteString.concat(other));
}
/**
@ -114,10 +122,6 @@ public final class ByteSequence {
return hashVal;
}
ByteString getByteString() {
return this.byteString;
}
public String toString(Charset charset) {
return byteString.toString(charset);
}
@ -151,10 +155,22 @@ public final class ByteSequence {
return new ByteSequence(ByteString.copyFrom(bytes));
}
/**
* Create new ByteSequence from a {@link ByteString}.
*
* @param source input {@link ByteString}
* @return the ByteSequence
*/
public static ByteSequence from(ByteString source) {
return new ByteSequence(source);
}
/**
* Create new ByteSequence from raw bytes.
*
* @param source input bytes
* @return the ByteSequence
*/
public static ByteSequence from(byte[] source) {
return new ByteSequence(ByteString.copyFrom(source));
}

View File

@ -26,42 +26,58 @@ package io.etcd.jetcd;
public interface Client extends AutoCloseable {
/**
* @return the {@link Auth} client.
* Returns the {@link Auth} client.
*
* @return the client.
*/
Auth getAuthClient();
/**
* @return the {@link KV} client.
* Returns the {@link KV} client.
*
* @return the client.
*/
KV getKVClient();
/**
* @return the {@link Cluster} client.
* Returns the {@link Cluster} client.
*
* @return the client.
*/
Cluster getClusterClient();
/**
* @return the {@link Maintenance} client.
* Returns the {@link Maintenance} client.
*
* @return the client.
*/
Maintenance getMaintenanceClient();
/**
* @return the {@link Lease} client.
* Returns the {@link Lease} client.
*
* @return the client.
*/
Lease getLeaseClient();
/**
* @return the {@link Watch} client.
* Returns the {@link Watch} client.
*
* @return the client.
*/
Watch getWatchClient();
/**
* @return the {@link Lock} client.
* Returns the {@link Lock} client.
*
* @return the client.
*/
Lock getLockClient();
/**
* @return the {@link Election} client.
* Returns the {@link Election} client.
*
* @return the client.
*/
Election getElectionClient();
@ -69,7 +85,9 @@ public interface Client extends AutoCloseable {
void close();
/**
* @return a new {@link ClientBuilder}.
* Returns a new {@link ClientBuilder}.
*
* @return the builder.
*/
static ClientBuilder builder() {
return new ClientBuilder();

View File

@ -19,38 +19,34 @@ package io.etcd.jetcd;
import java.net.URI;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.*;
import java.util.concurrent.ExecutorService;
import java.util.function.Consumer;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;
import javax.net.ssl.SSLException;
import io.etcd.jetcd.common.exception.EtcdException;
import io.etcd.jetcd.common.exception.EtcdExceptionFactory;
import io.etcd.jetcd.impl.ClientImpl;
import io.etcd.jetcd.resolver.IPNameResolver;
import io.grpc.ClientInterceptor;
import io.grpc.Metadata;
import io.grpc.netty.GrpcSslContexts;
import io.netty.handler.ssl.SslContext;
import io.netty.handler.ssl.SslContextBuilder;
import io.vertx.core.Vertx;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Preconditions.checkState;
import com.google.common.base.Strings;
/**
* ClientBuilder knows how to create an Client instance.
* ClientBuilder knows how to create a Client instance.
*/
public final class ClientBuilder implements Cloneable {
private final Set<URI> endpoints = new HashSet<>();
private String target;
private ByteSequence user;
private ByteSequence password;
private ExecutorService executorService;
@ -65,63 +61,45 @@ public final class ClientBuilder implements Cloneable {
private ByteSequence namespace = ByteSequence.EMPTY;
private long retryDelay = 500;
private long retryMaxDelay = 2500;
private int retryMaxAttempts = 2;
private ChronoUnit retryChronoUnit = ChronoUnit.MILLIS;
private Duration keepaliveTime = Duration.ofSeconds(30L);
private Duration keepaliveTimeout = Duration.ofSeconds(10L);
private Boolean keepaliveWithoutCalls = true;
private Duration retryMaxDuration;
private Duration connectTimeout;
private boolean discovery;
private boolean waitForReady = true;
private Vertx vertx;
ClientBuilder() {
}
/**
* gets the endpoints for the builder.
* Gets the etcd target.
*
* @return the list of endpoints configured for the builder
* @return the etcd target.
*/
public Collection<URI> endpoints() {
return Collections.unmodifiableCollection(this.endpoints);
public String target() {
return target;
}
/**
* configure etcd server endpoints.
*
* @param endpoints etcd server endpoints, at least one
* @return this builder to train
* @throws NullPointerException if endpoints is null or one of endpoint is null
* @throws IllegalArgumentException if some endpoint is invalid
* @param target etcd server target
* @return this builder to train
* @throws NullPointerException if target is null or one of endpoint is null
*/
public ClientBuilder endpoints(Collection<URI> endpoints) {
checkNotNull(endpoints, "endpoints can't be null");
public ClientBuilder target(String target) {
Preconditions.checkArgument(!Strings.isNullOrEmpty(target), "target can't be null or empty");
for (URI endpoint : endpoints) {
checkNotNull(endpoint, "endpoint can't be null");
checkArgument(endpoint.toString().trim().length() > 0, "invalid endpoint: endpoint=" + endpoint);
this.endpoints.add(endpoint);
}
this.target = target;
return this;
}
/**
* configure etcd server endpoints.
*
* @param endpoints etcd server endpoints, at least one
* @return this builder to train
* @throws NullPointerException if endpoints is null or one of endpoint is null
* @throws IllegalArgumentException if some endpoint is invalid
*/
public ClientBuilder endpoints(URI... endpoints) {
checkNotNull(endpoints, "endpoints can't be null");
return endpoints(Arrays.asList(endpoints));
}
/**
* configure etcd server endpoints.
* configure etcd server endpoints using the {@link IPNameResolver}.
*
* @param endpoints etcd server endpoints, at least one
* @return this builder to train
@ -129,11 +107,60 @@ public final class ClientBuilder implements Cloneable {
* @throws IllegalArgumentException if some endpoint is invalid
*/
public ClientBuilder endpoints(String... endpoints) {
return endpoints(Util.toURIs(Arrays.asList(endpoints)));
return endpoints(
Stream.of(endpoints).map(URI::create).toArray(URI[]::new));
}
/**
* @return the auth user
* configure etcd server endpoints using the {@link IPNameResolver}.
*
* @param endpoints etcd server endpoints, at least one
* @return this builder to train
* @throws NullPointerException if endpoints is null or one of endpoint is null
* @throws IllegalArgumentException if some endpoint is invalid
*/
public ClientBuilder endpoints(URI... endpoints) {
return endpoints(Arrays.asList(endpoints));
}
/**
* configure etcd server endpoints using the {@link IPNameResolver}.
*
* @param endpoints etcd server endpoints, at least one
* @return this builder to train
* @throws NullPointerException if endpoints is null or one of endpoint is null
* @throws IllegalArgumentException if some endpoint is invalid
*/
public ClientBuilder endpoints(Iterable<URI> endpoints) {
Objects.requireNonNull(endpoints, "endpoints can't be null");
endpoints.forEach(e -> {
if (e.getHost() == null) {
throw new IllegalArgumentException("Unable to compute target from endpoint: '" + e + "'");
}
});
final String target = StreamSupport.stream(endpoints.spliterator(), false)
.map(e -> e.getHost() + (e.getPort() != -1 ? ":" + e.getPort() : ""))
.distinct()
.collect(Collectors.joining(","));
if (Strings.isNullOrEmpty(target)) {
throw new IllegalArgumentException("Unable to compute target from endpoints: '" + endpoints + "'");
}
return target(
String.format(
"%s://%s/%s",
IPNameResolver.SCHEME,
authority != null ? authority : "",
target));
}
/**
* Returns the auth user
*
* @return the user.
*/
public ByteSequence user() {
return user;
@ -147,13 +174,15 @@ public final class ClientBuilder implements Cloneable {
* @throws NullPointerException if user is <code>null</code>
*/
public ClientBuilder user(ByteSequence user) {
checkNotNull(user, "user can't be null");
Objects.requireNonNull(user, "user can't be null");
this.user = user;
return this;
}
/**
* @return the auth password
* Returns the auth password
*
* @return the password.
*/
public ByteSequence password() {
return password;
@ -167,13 +196,15 @@ public final class ClientBuilder implements Cloneable {
* @throws NullPointerException if password is <code>null</code>
*/
public ClientBuilder password(ByteSequence password) {
checkNotNull(password, "password can't be null");
Objects.requireNonNull(password, "password can't be null");
this.password = password;
return this;
}
/**
* @return the namespace of each key used
* Returns the namespace of each key used
*
* @return the namespace.
*/
public ByteSequence namespace() {
return namespace;
@ -188,13 +219,15 @@ public final class ClientBuilder implements Cloneable {
* @throws NullPointerException if namespace is <code>null</code>
*/
public ClientBuilder namespace(ByteSequence namespace) {
checkNotNull(namespace, "namespace can't be null");
Objects.requireNonNull(namespace, "namespace can't be null");
this.namespace = namespace;
return this;
}
/**
* @return the executor service
* Returns the executor service
*
* @return the executor service.
*/
public ExecutorService executorService() {
return executorService;
@ -208,7 +241,7 @@ public final class ClientBuilder implements Cloneable {
* @throws NullPointerException if executorService is <code>null</code>
*/
public ClientBuilder executorService(ExecutorService executorService) {
checkNotNull(executorService, "executorService can't be null");
Objects.requireNonNull(executorService, "executorService can't be null");
this.executorService = executorService;
return this;
}
@ -221,7 +254,7 @@ public final class ClientBuilder implements Cloneable {
* @throws NullPointerException if loadBalancerPolicy is <code>null</code>
*/
public ClientBuilder loadBalancerPolicy(String loadBalancerPolicy) {
checkNotNull(loadBalancerPolicy, "loadBalancerPolicy can't be null");
Objects.requireNonNull(loadBalancerPolicy, "loadBalancerPolicy can't be null");
this.loadBalancerPolicy = loadBalancerPolicy;
return this;
}
@ -236,7 +269,9 @@ public final class ClientBuilder implements Cloneable {
}
/**
* @return the ssl context
* Returns the ssl context
*
* @return the ssl context.
*/
public SslContext sslContext() {
return sslContext;
@ -269,13 +304,17 @@ public final class ClientBuilder implements Cloneable {
}
/**
* @return The authority used to authenticate connections to servers.
* Returns The authority used to authenticate connections to servers.
*
* @return the authority.
*/
public String authority() {
return authority;
}
/**
* Sets the authority used to authenticate connections to servers.
*
* @param authority the authority used to authenticate connections to servers.
* @return this builder
*/
@ -285,14 +324,18 @@ public final class ClientBuilder implements Cloneable {
}
/**
* @return the maximum message size allowed for a single gRPC frame.
* Returns the maximum message size allowed for a single gRPC frame.
*
* @return max inbound message size.
*/
public Integer maxInboundMessageSize() {
return maxInboundMessageSize;
}
/**
* @param maxInboundMessageSize Sets the maximum message size allowed for a single gRPC frame.
* Sets the maximum message size allowed for a single gRPC frame.
*
* @param maxInboundMessageSize the maximum message size allowed for a single gRPC frame.
* @return this builder
*/
public ClientBuilder maxInboundMessageSize(Integer maxInboundMessageSize) {
@ -301,14 +344,18 @@ public final class ClientBuilder implements Cloneable {
}
/**
* @return the headers to be added to http request headers
* Returns the headers to be added to http request headers
*
* @return headers.
*/
public Map<Metadata.Key<?>, Object> headers() {
return headers == null ? Collections.emptyMap() : Collections.unmodifiableMap(headers);
}
/**
* @param headers Sets headers to be added to http request headers.
* Sets headers to be added to http request headers.
*
* @param headers headers to be added to http request headers.
* @return this builder
*/
public ClientBuilder headers(Map<Metadata.Key<?>, Object> headers) {
@ -318,6 +365,8 @@ public final class ClientBuilder implements Cloneable {
}
/**
* Set headers.
*
* @param key Sets an header key to be added to http request headers.
* @param value Sets an header value to be added to http request headers.
* @return this builder
@ -333,13 +382,17 @@ public final class ClientBuilder implements Cloneable {
}
/**
* @return the headers to be added to auth request headers
* Returns the headers to be added to auth request headers
*
* @return auth headers.
*/
public Map<Metadata.Key<?>, Object> authHeaders() {
return authHeaders == null ? Collections.emptyMap() : Collections.unmodifiableMap(authHeaders);
}
/**
* Set the auth headers.
*
* @param authHeaders Sets headers to be added to auth request headers.
* @return this builder
*/
@ -350,6 +403,8 @@ public final class ClientBuilder implements Cloneable {
}
/**
* Add an auth header.
*
* @param key Sets an header key to be added to auth request headers.
* @param value Sets an header value to be added to auth request headers.
* @return this builder
@ -365,14 +420,18 @@ public final class ClientBuilder implements Cloneable {
}
/**
* @return the interceptors
* Returns the interceptors
*
* @return the interceptors.
*/
public List<ClientInterceptor> interceptors() {
return interceptors;
}
/**
* @param interceptors Set the interceptors.
* Set the interceptors.
*
* @param interceptors the interceptors.
* @return this builder
*/
public ClientBuilder interceptors(List<ClientInterceptor> interceptors) {
@ -382,6 +441,8 @@ public final class ClientBuilder implements Cloneable {
}
/**
* Add an interceptor.
*
* @param interceptor an interceptors to add
* @param interceptors additional interceptors
* @return this builder
@ -398,13 +459,17 @@ public final class ClientBuilder implements Cloneable {
}
/**
* @return the auth interceptors
* Returns the auth interceptors
*
* @return the interceptors.
*/
public List<ClientInterceptor> authInterceptors() {
return authInterceptors;
}
/**
* Set the auth interceptors.
*
* @param interceptors Set the interceptors to add to the auth chain
* @return this builder
*/
@ -415,6 +480,8 @@ public final class ClientBuilder implements Cloneable {
}
/**
* Add an auth interceptor.
*
* @param interceptor an interceptors to add to the auth chain
* @param interceptors additional interceptors to add to the auth chain
* @return this builder
@ -431,13 +498,17 @@ public final class ClientBuilder implements Cloneable {
}
/**
* @return The delay between retries.
* Returns The delay between retries.
*
* @return the retry delay.
*/
public long retryDelay() {
return retryDelay;
}
/**
* The delay between retries.
*
* @param retryDelay The delay between retries.
* @return this builder
*/
@ -447,13 +518,17 @@ public final class ClientBuilder implements Cloneable {
}
/**
* @return the max backing off delay between retries
* Returns the max backing off delay between retries
*
* @return max retry delay.
*/
public long retryMaxDelay() {
return retryMaxDelay;
}
/**
* Set the max backing off delay between retries.
*
* @param retryMaxDelay The max backing off delay between retries.
* @return this builder
*/
@ -462,6 +537,31 @@ public final class ClientBuilder implements Cloneable {
return this;
}
/**
* Returns the max number of retry attempts
*
* @return max retry attempts.
*/
public int retryMaxAttempts() {
return retryMaxAttempts;
}
/**
* Set the max number of retry attempts
*
* @param retryMaxAttempts The max retry attempts.
* @return this builder
*/
public ClientBuilder retryMaxAttempts(int retryMaxAttempts) {
this.retryMaxAttempts = retryMaxAttempts;
return this;
}
/**
* Returns the keep alive time.
*
* @return keep alive time.
*/
public Duration keepaliveTime() {
return keepaliveTime;
}
@ -470,7 +570,8 @@ public final class ClientBuilder implements Cloneable {
* The interval for gRPC keepalives.
* The current minimum allowed by gRPC is 10s
*
* @param keepaliveTime time between keepalives
* @param keepaliveTime time between keepalives
* @return this builder
*/
public ClientBuilder keepaliveTime(Duration keepaliveTime) {
// gRPC uses a minimum keepalive time of 10s, if smaller values are given.
@ -479,6 +580,11 @@ public final class ClientBuilder implements Cloneable {
return this;
}
/**
* Returns the keep alive time out.
*
* @return keep alive time out.
*/
public Duration keepaliveTimeout() {
return keepaliveTimeout;
}
@ -486,7 +592,8 @@ public final class ClientBuilder implements Cloneable {
/**
* The timeout for gRPC keepalives
*
* @param keepaliveTimeout the gRPC keep alive timeout.
* @param keepaliveTimeout the gRPC keep alive timeout.
* @return this builder
*/
public ClientBuilder keepaliveTimeout(Duration keepaliveTimeout) {
this.keepaliveTimeout = keepaliveTimeout;
@ -500,7 +607,8 @@ public final class ClientBuilder implements Cloneable {
/**
* Keepalive option for gRPC
*
* @param keepaliveWithoutCalls the gRPC keep alive without calls.
* @param keepaliveWithoutCalls the gRPC keep alive without calls.
* @return this builder
*/
public ClientBuilder keepaliveWithoutCalls(Boolean keepaliveWithoutCalls) {
this.keepaliveWithoutCalls = keepaliveWithoutCalls;
@ -508,13 +616,17 @@ public final class ClientBuilder implements Cloneable {
}
/**
* @return he retries period unit.
* Returns he retries period unit.
*
* @return the chrono unit.
*/
public ChronoUnit retryChronoUnit() {
return retryChronoUnit;
}
/**
* Sets the retries period unit.
*
* @param retryChronoUnit the retries period unit.
* @return this builder
*/
@ -524,20 +636,26 @@ public final class ClientBuilder implements Cloneable {
}
/**
* @return the retries max duration.
* Returns the retries max duration.
*
* @return retry max duration.
*/
public Duration retryMaxDuration() {
return retryMaxDuration;
}
/**
* @return the connect timeout.
* Returns the connect timeout.
*
* @return connect timeout.
*/
public Duration connectTimeout() {
return connectTimeout;
}
/**
* Set the retries max duration.
*
* @param retryMaxDuration the retries max duration.
* @return this builder
*/
@ -547,8 +665,10 @@ public final class ClientBuilder implements Cloneable {
}
/**
* Set the connection timeout.
*
* @param connectTimeout Sets the connection timeout.
* Clients connecting to fault tolerant etcd clusters (eg, clusters with >= 3 etcd server
* Clients connecting to fault tolerant etcd clusters (eg, clusters with more than 2 etcd server
* peers/endpoints)
* should consider a value that will allow switching timely from a crashed/partitioned peer to
* a consensus peer.
@ -567,22 +687,8 @@ public final class ClientBuilder implements Cloneable {
}
/**
* @return if the endpoint represent a discovery address using dns+srv.
*/
public boolean discovery() {
return discovery;
}
/**
* @param discovery if the endpoint represent a discovery address using dns+srv.
* @return this builder
*/
public ClientBuilder discovery(boolean discovery) {
this.discovery = discovery;
return this;
}
/**
* Enable gRPC's wait for ready semantics.
*
* @return if this client uses gRPC's wait for ready semantics.
* @see <a href="https://github.com/grpc/grpc/blob/master/doc/wait-for-ready.md">gRPC Wait for Ready Semantics</a>
*/
@ -591,6 +697,8 @@ public final class ClientBuilder implements Cloneable {
}
/**
* Configure the gRPC's wait for ready semantics.
*
* @param waitForReady if this client should use gRPC's wait for ready semantics. Enabled by default.
* @return this builder.
* @see <a href="https://github.com/grpc/grpc/blob/master/doc/wait-for-ready.md">gRPC Wait for Ready
@ -601,6 +709,30 @@ public final class ClientBuilder implements Cloneable {
return this;
}
/**
* Gets the Vertx instance.
*
* @return the vertx instance.
*/
public Vertx vertx() {
return vertx;
}
/**
* configure Vertx instance.
*
* @param vertx Vertx instance to use.
* @return this builder to train
* @throws IllegalArgumentException if vertx is null
*/
public ClientBuilder vertx(Vertx vertx) {
Preconditions.checkArgument(vertx != null, "vertx can't be null");
this.vertx = vertx;
return this;
}
/**
* build a new Client.
*
@ -608,13 +740,15 @@ public final class ClientBuilder implements Cloneable {
* @throws EtcdException if client experiences build error.
*/
public Client build() {
checkState(!endpoints.isEmpty(), "please configure etcd server endpoints before build.");
Preconditions.checkState(target != null, "please configure etcd server endpoints before build.");
return new ClientImpl(this);
}
/**
* @return a copy of this builder
* Returns a copy of this builder
*
* @return a copy of the builder.
*/
public ClientBuilder copy() {
try {

View File

@ -1,299 +0,0 @@
/*
* Copyright 2016-2021 The jetcd authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.etcd.jetcd;
import java.net.URI;
import java.util.Collection;
import java.util.Collections;
import java.util.concurrent.Callable;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import java.util.function.BiConsumer;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.Iterables;
import com.google.common.util.concurrent.ListenableFuture;
import io.etcd.jetcd.auth.AuthInterceptor;
import io.etcd.jetcd.resolver.DnsSrvNameResolver;
import io.etcd.jetcd.resolver.IPNameResolver;
import io.grpc.CallOptions;
import io.grpc.Channel;
import io.grpc.ClientCall;
import io.grpc.ClientInterceptor;
import io.grpc.ForwardingClientCall.SimpleForwardingClientCall;
import io.grpc.ManagedChannel;
import io.grpc.ManagedChannelBuilder;
import io.grpc.Metadata;
import io.grpc.MethodDescriptor;
import io.grpc.netty.NegotiationType;
import io.grpc.netty.NettyChannelBuilder;
import io.grpc.stub.AbstractStub;
import io.netty.channel.ChannelOption;
import net.jodah.failsafe.Failsafe;
import net.jodah.failsafe.RetryPolicy;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import static io.etcd.jetcd.common.exception.EtcdExceptionFactory.toEtcdException;
final class ClientConnectionManager {
private static final Logger LOGGER = LoggerFactory.getLogger(ClientConnectionManager.class);
private final Object lock;
private final ClientBuilder builder;
private final ExecutorService executorService;
private final AuthInterceptor authInterceptor;
private volatile ManagedChannel managedChannel;
ClientConnectionManager(ClientBuilder builder) {
this(builder, null);
}
ClientConnectionManager(ClientBuilder builder, ManagedChannel managedChannel) {
this.lock = new Object();
this.builder = builder;
this.authInterceptor = new AuthInterceptor(builder);
this.managedChannel = managedChannel;
if (builder.executorService() == null) {
this.executorService = Executors.newCachedThreadPool();
} else {
this.executorService = builder.executorService();
}
}
ManagedChannel getChannel() {
if (managedChannel == null) {
synchronized (lock) {
if (managedChannel == null) {
managedChannel = defaultChannelBuilder().build();
}
}
}
return managedChannel;
}
ByteSequence getNamespace() {
return builder.namespace();
}
ExecutorService getExecutorService() {
return executorService;
}
AuthInterceptor authInterceptor() {
return authInterceptor;
}
/**
* create stub with saved channel.
*
* @param supplier the stub supplier
* @param <T> the type of stub
* @return the attached stub
*/
<T extends AbstractStub<T>> T newStub(Function<ManagedChannel, T> supplier) {
return newStub(supplier, getChannel());
}
private <T extends AbstractStub<T>> T newStub(Function<ManagedChannel, T> stubCustomizer, ManagedChannel channel) {
final T stub = stubCustomizer.apply(channel);
if (builder.waitForReady()) {
return stub.withWaitForReady();
} else {
return stub;
}
}
void close() {
synchronized (lock) {
if (managedChannel != null) {
managedChannel.shutdownNow();
}
}
if (builder.executorService() == null) {
executorService.shutdownNow();
}
}
<T extends AbstractStub<T>, R> CompletableFuture<R> withNewChannel(URI endpoint, Function<ManagedChannel, T> stubCustomizer,
Function<T, CompletableFuture<R>> stubConsumer) {
final ManagedChannel channel = defaultChannelBuilder(Collections.singletonList(endpoint)).build();
final T stub = newStub(stubCustomizer, channel);
try {
return stubConsumer.apply(stub).whenComplete((r, t) -> channel.shutdown());
} catch (Exception e) {
channel.shutdown();
throw toEtcdException(e);
}
}
@VisibleForTesting
protected ManagedChannelBuilder<?> defaultChannelBuilder() {
return defaultChannelBuilder(builder.endpoints());
}
@VisibleForTesting
@SuppressWarnings("rawtypes")
protected ManagedChannelBuilder<?> defaultChannelBuilder(Collection<URI> endpoints) {
if (endpoints.isEmpty()) {
throw new IllegalArgumentException("At least one endpoint should be provided");
}
final String target;
if (builder.discovery()) {
if (endpoints.size() != 1) {
throw new IllegalArgumentException("When configured for discovery, there should be only a single endpoint");
}
target = String.format(
"%s:///%s",
DnsSrvNameResolver.SCHEME,
Iterables.get(endpoints, 0));
} else {
target = String.format(
"%s://%s/%s",
IPNameResolver.SCHEME,
builder.authority() != null ? builder.authority() : "",
endpoints.stream().map(e -> e.getHost() + ":" + e.getPort()).collect(Collectors.joining(",")));
}
final NettyChannelBuilder channelBuilder = NettyChannelBuilder.forTarget(target);
if (builder.authority() != null) {
channelBuilder.overrideAuthority(builder.authority());
}
if (builder.maxInboundMessageSize() != null) {
channelBuilder.maxInboundMessageSize(builder.maxInboundMessageSize());
}
if (builder.sslContext() != null) {
channelBuilder.negotiationType(NegotiationType.TLS);
channelBuilder.sslContext(builder.sslContext());
} else {
channelBuilder.negotiationType(NegotiationType.PLAINTEXT);
}
if (builder.keepaliveTime() != null) {
channelBuilder.keepAliveTime(builder.keepaliveTime().toMillis(), TimeUnit.MILLISECONDS);
}
if (builder.keepaliveTimeout() != null) {
channelBuilder.keepAliveTimeout(builder.keepaliveTimeout().toMillis(), TimeUnit.MILLISECONDS);
}
if (builder.keepaliveWithoutCalls() != null) {
channelBuilder.keepAliveWithoutCalls(builder.keepaliveWithoutCalls());
}
if (builder.connectTimeout() != null) {
channelBuilder.withOption(ChannelOption.CONNECT_TIMEOUT_MILLIS, (int) builder.connectTimeout().toMillis());
}
if (builder.loadBalancerPolicy() != null) {
channelBuilder.defaultLoadBalancingPolicy(builder.loadBalancerPolicy());
} else {
channelBuilder.defaultLoadBalancingPolicy("pick_first");
}
channelBuilder.intercept(authInterceptor);
if (builder.headers() != null) {
channelBuilder.intercept(new ClientInterceptor() {
@Override
public <ReqT, RespT> ClientCall<ReqT, RespT> interceptCall(MethodDescriptor<ReqT, RespT> method,
CallOptions callOptions, Channel next) {
return new SimpleForwardingClientCall<ReqT, RespT>(next.newCall(method, callOptions)) {
@Override
public void start(Listener<RespT> responseListener, Metadata headers) {
builder.headers().forEach((BiConsumer<Metadata.Key, Object>) headers::put);
super.start(responseListener, headers);
}
};
}
});
}
if (builder.interceptors() != null) {
channelBuilder.intercept(builder.interceptors());
}
return channelBuilder;
}
/**
* execute the task and retry it in case of failure.
*
* @param task a function that returns a new ListenableFuture.
* @param resultConvert a function that converts Type S to Type T.
* @param <S> Source type
* @param <T> Converted Type.
* @return a CompletableFuture with type T.
*/
public <S, T> CompletableFuture<T> execute(Callable<ListenableFuture<S>> task, Function<S, T> resultConvert) {
return execute(task, resultConvert, Util::isRetryable);
}
/**
* execute the task and retry it in case of failure.
*
* @param task a function that returns a new SourceFuture.
* @param resultConvert a function that converts Type S to Type T.
* @param doRetry a function that determines the retry condition base on SourceFuture error.
* @param <S> Source type
* @param <T> Converted Type.
* @return a CompletableFuture with type T.
*/
@SuppressWarnings("FutureReturnValueIgnored")
public <S, T> CompletableFuture<T> execute(
Callable<ListenableFuture<S>> task,
Function<S, T> resultConvert,
Predicate<Throwable> doRetry) {
RetryPolicy<CompletableFuture<S>> retryPolicy = new RetryPolicy<CompletableFuture<S>>().handleIf(doRetry)
.onRetriesExceeded(e -> LOGGER.warn("maximum number of auto retries reached"))
.withBackoff(builder.retryDelay(), builder.retryMaxDelay(), builder.retryChronoUnit());
if (builder.retryMaxDuration() != null) {
retryPolicy = retryPolicy.withMaxDuration(builder.retryMaxDuration());
}
return Failsafe.with(retryPolicy).with(executorService)
.getAsyncExecution(execution -> {
CompletableFuture<S> wrappedFuture = new CompletableFuture<>();
ListenableFuture<S> future = task.call();
future.addListener(() -> {
try {
wrappedFuture.complete(future.get());
execution.complete(wrappedFuture);
} catch (Exception error) {
if (!execution.retryOn(error)) {
// permanent failure
wrappedFuture.completeExceptionally(error);
}
}
}, executorService);
}).thenCompose(f -> f.thenApply(resultConvert));
}
}

View File

@ -39,13 +39,22 @@ public interface Cluster extends CloseableClient {
CompletableFuture<MemberListResponse> listMember();
/**
* add a new member into the cluster.
* add a non-learner new member into the cluster.
*
* @param peerAddrs the peer addresses of the new member
* @return the response
*/
CompletableFuture<MemberAddResponse> addMember(List<URI> peerAddrs);
/**
* add a new member into the cluster.
*
* @param peerAddrs the peer addresses of the new member
* @param isLearner whether the member is raft learner
* @return the response
*/
CompletableFuture<MemberAddResponse> addMember(List<URI> peerAddrs, boolean isLearner);
/**
* removes an existing member from the cluster.
*

View File

@ -22,11 +22,11 @@ import io.grpc.Metadata;
* Constants of Etcd.
*/
public class Constants {
public static final String TOKEN = "token";
public static final ByteSequence NULL_KEY = ByteSequence.from(new byte[] { '\0' });
public static final Metadata.Key<String> REQUIRE_LEADER_KEY = Metadata.Key.of("hasleader",
public static final Metadata.Key<String> REQUIRE_LEADER_KEY = Metadata.Key.of(
"hasleader",
Metadata.ASCII_STRING_MARSHALLER);
public static final String REQUIRE_LEADER_VALUE = "true";
}

View File

@ -1,185 +0,0 @@
/*
* Copyright 2016-2021 The jetcd authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.etcd.jetcd;
import java.util.concurrent.CompletableFuture;
import java.util.function.Function;
import io.etcd.jetcd.api.CampaignRequest;
import io.etcd.jetcd.api.ElectionGrpc;
import io.etcd.jetcd.api.LeaderRequest;
import io.etcd.jetcd.api.ProclaimRequest;
import io.etcd.jetcd.api.ResignRequest;
import io.etcd.jetcd.common.exception.EtcdExceptionFactory;
import io.etcd.jetcd.election.CampaignResponse;
import io.etcd.jetcd.election.LeaderKey;
import io.etcd.jetcd.election.LeaderResponse;
import io.etcd.jetcd.election.NoLeaderException;
import io.etcd.jetcd.election.NotLeaderException;
import io.etcd.jetcd.election.ProclaimResponse;
import io.etcd.jetcd.election.ResignResponse;
import io.grpc.StatusRuntimeException;
import io.grpc.stub.StreamObserver;
import static com.google.common.base.Preconditions.checkNotNull;
final class ElectionImpl implements Election {
private final ElectionGrpc.ElectionStub stub;
private final ByteSequence namespace;
ElectionImpl(ClientConnectionManager connectionManager) {
this.stub = connectionManager.newStub(ElectionGrpc::newStub);
this.namespace = connectionManager.getNamespace();
}
@Override
public CompletableFuture<CampaignResponse> campaign(ByteSequence electionName, long leaseId, ByteSequence proposal) {
checkNotNull(electionName, "election name should not be null");
checkNotNull(proposal, "proposal should not be null");
CampaignRequest request = CampaignRequest.newBuilder()
.setName(Util.prefixNamespace(electionName.getByteString(), namespace))
.setValue(proposal.getByteString())
.setLease(leaseId)
.build();
final StreamObserverDelegate<io.etcd.jetcd.api.CampaignResponse, CampaignResponse> observer = new StreamObserverDelegate<>(
CampaignResponse::new);
stub.campaign(request, observer);
return observer.getFuture();
}
@Override
public CompletableFuture<ProclaimResponse> proclaim(LeaderKey leaderKey, ByteSequence proposal) {
checkNotNull(leaderKey, "leader key should not be null");
checkNotNull(proposal, "proposal should not be null");
io.etcd.jetcd.api.LeaderKey leader = io.etcd.jetcd.api.LeaderKey.newBuilder()
.setKey(leaderKey.getKey()).setName(leaderKey.getName())
.setLease(leaderKey.getLease()).setRev(leaderKey.getRevision())
.build();
ProclaimRequest request = ProclaimRequest.newBuilder()
.setLeader(leader).setValue(proposal.getByteString())
.build();
final StreamObserverDelegate<io.etcd.jetcd.api.ProclaimResponse, ProclaimResponse> observer = new StreamObserverDelegate<>(
ProclaimResponse::new);
stub.proclaim(request, observer);
return observer.getFuture();
}
@Override
public CompletableFuture<LeaderResponse> leader(ByteSequence electionName) {
checkNotNull(electionName, "election name should not be null");
LeaderRequest request = LeaderRequest.newBuilder()
.setName(Util.prefixNamespace(electionName.getByteString(), namespace))
.build();
final StreamObserverDelegate<io.etcd.jetcd.api.LeaderResponse, LeaderResponse> observer = new StreamObserverDelegate<>(
input -> new LeaderResponse(input, namespace));
stub.leader(request, observer);
return observer.getFuture();
}
@Override
public void observe(ByteSequence electionName, Listener listener) {
checkNotNull(electionName, "election name should not be null");
checkNotNull(listener, "listener should not be null");
LeaderRequest request = LeaderRequest.newBuilder().setName(electionName.getByteString()).build();
stub.observe(request, new StreamObserver<io.etcd.jetcd.api.LeaderResponse>() {
@Override
public void onNext(io.etcd.jetcd.api.LeaderResponse value) {
listener.onNext(new LeaderResponse(value, namespace));
}
@Override
public void onError(Throwable error) {
listener.onError(EtcdExceptionFactory.toEtcdException(error));
}
@Override
public void onCompleted() {
listener.onCompleted();
}
});
}
@Override
public CompletableFuture<ResignResponse> resign(LeaderKey leaderKey) {
checkNotNull(leaderKey, "leader key should not be null");
io.etcd.jetcd.api.LeaderKey leader = io.etcd.jetcd.api.LeaderKey.newBuilder()
.setKey(leaderKey.getKey()).setName(leaderKey.getName())
.setLease(leaderKey.getLease()).setRev(leaderKey.getRevision())
.build();
ResignRequest request = ResignRequest.newBuilder().setLeader(leader).build();
final StreamObserverDelegate<io.etcd.jetcd.api.ResignResponse, ResignResponse> observer = new StreamObserverDelegate<>(
ResignResponse::new);
stub.resign(request, observer);
return observer.getFuture();
}
@Override
public void close() {
}
private static class StreamObserverDelegate<S, T> implements StreamObserver<S> {
private final CompletableFuture<T> future = new CompletableFuture<>();
private final Function<S, T> converter;
public StreamObserverDelegate(Function<S, T> converter) {
this.converter = converter;
}
@Override
public void onNext(S value) {
future.complete(converter.apply(value));
}
@Override
public void onError(Throwable error) {
if (error instanceof StatusRuntimeException) {
StatusRuntimeException exception = (StatusRuntimeException) error;
String description = exception.getStatus().getDescription();
// different APIs use different messages. we cannot distinguish missing leader error otherwise,
// because communicated status is always UNKNOWN
if ("election: not leader".equals(description)) {
future.completeExceptionally(NotLeaderException.INSTANCE);
} else if ("election: no leader".equals(description)) {
future.completeExceptionally(NoLeaderException.INSTANCE);
}
}
future.completeExceptionally(EtcdExceptionFactory.toEtcdException(error));
}
@Override
public void onCompleted() {
}
public CompletableFuture<T> getFuture() {
return future;
}
}
}

View File

@ -26,6 +26,7 @@ import io.etcd.jetcd.options.CompactOption;
import io.etcd.jetcd.options.DeleteOption;
import io.etcd.jetcd.options.GetOption;
import io.etcd.jetcd.options.PutOption;
import io.etcd.jetcd.options.TxnOption;
import io.etcd.jetcd.support.CloseableClient;
/**
@ -115,4 +116,12 @@ public interface KV extends CloseableClient {
* @return a Txn
*/
Txn txn();
/**
* creates a transaction.
*
* @param option TxnOption
* @return a Txn
*/
Txn txn(TxnOption option);
}

View File

@ -1,180 +0,0 @@
/*
* Copyright 2016-2021 The jetcd authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.etcd.jetcd;
import java.util.concurrent.CompletableFuture;
import io.etcd.jetcd.api.CompactionRequest;
import io.etcd.jetcd.api.DeleteRangeRequest;
import io.etcd.jetcd.api.KVGrpc;
import io.etcd.jetcd.api.PutRequest;
import io.etcd.jetcd.api.RangeRequest;
import io.etcd.jetcd.kv.CompactResponse;
import io.etcd.jetcd.kv.DeleteResponse;
import io.etcd.jetcd.kv.GetResponse;
import io.etcd.jetcd.kv.PutResponse;
import io.etcd.jetcd.kv.TxnResponse;
import io.etcd.jetcd.op.TxnImpl;
import io.etcd.jetcd.options.CompactOption;
import io.etcd.jetcd.options.DeleteOption;
import io.etcd.jetcd.options.GetOption;
import io.etcd.jetcd.options.OptionsUtil;
import io.etcd.jetcd.options.PutOption;
import static com.google.common.base.Preconditions.checkNotNull;
import static io.etcd.jetcd.options.OptionsUtil.toRangeRequestSortOrder;
import static io.etcd.jetcd.options.OptionsUtil.toRangeRequestSortTarget;
/**
* Implementation of etcd kv client.
*/
final class KVImpl implements KV {
private final ClientConnectionManager connectionManager;
private final KVGrpc.KVFutureStub stub;
private final ByteSequence namespace;
KVImpl(ClientConnectionManager connectionManager) {
this.connectionManager = connectionManager;
this.stub = connectionManager.newStub(KVGrpc::newFutureStub);
this.namespace = connectionManager.getNamespace();
}
@Override
public CompletableFuture<PutResponse> put(ByteSequence key, ByteSequence value) {
return this.put(key, value, PutOption.DEFAULT);
}
@Override
public CompletableFuture<PutResponse> put(ByteSequence key, ByteSequence value, PutOption option) {
checkNotNull(key, "key should not be null");
checkNotNull(value, "value should not be null");
checkNotNull(option, "option should not be null");
PutRequest request = PutRequest.newBuilder()
.setKey(Util.prefixNamespace(key.getByteString(), namespace))
.setValue(value.getByteString())
.setLease(option.getLeaseId())
.setPrevKv(option.getPrevKV())
.build();
return connectionManager.execute(
() -> stub.put(request),
response -> new PutResponse(response, namespace),
Util::isRetryable);
}
@Override
public CompletableFuture<GetResponse> get(ByteSequence key) {
return this.get(key, GetOption.DEFAULT);
}
@Override
public CompletableFuture<GetResponse> get(ByteSequence key, GetOption option) {
checkNotNull(key, "key should not be null");
checkNotNull(option, "option should not be null");
RangeRequest.Builder builder = RangeRequest.newBuilder()
.setKey(Util.prefixNamespace(key.getByteString(), namespace))
.setCountOnly(option.isCountOnly())
.setLimit(option.getLimit())
.setRevision(option.getRevision())
.setKeysOnly(option.isKeysOnly())
.setSerializable(option.isSerializable())
.setSortOrder(toRangeRequestSortOrder(option.getSortOrder()))
.setSortTarget(toRangeRequestSortTarget(option.getSortField()))
.setMinCreateRevision(option.getMinCreateRevision())
.setMaxCreateRevision(option.getMaxCreateRevision())
.setMinModRevision(option.getMinModRevision())
.setMaxModRevision(option.getMaxModRevision());
option.getEndKey().map(endKey -> Util.prefixNamespaceToRangeEnd(endKey.getByteString(), namespace))
.ifPresent(builder::setRangeEnd);
if (!option.getEndKey().isPresent() && option.isPrefix()) {
ByteSequence endKey = OptionsUtil.prefixEndOf(key);
builder.setRangeEnd(Util.prefixNamespaceToRangeEnd(endKey.getByteString(), namespace));
}
RangeRequest request = builder.build();
return connectionManager.execute(
() -> stub.range(request),
response -> new GetResponse(response, namespace),
Util::isRetryable);
}
@Override
public CompletableFuture<DeleteResponse> delete(ByteSequence key) {
return this.delete(key, DeleteOption.DEFAULT);
}
@Override
public CompletableFuture<DeleteResponse> delete(ByteSequence key, DeleteOption option) {
checkNotNull(key, "key should not be null");
checkNotNull(option, "option should not be null");
DeleteRangeRequest.Builder builder = DeleteRangeRequest.newBuilder()
.setKey(Util.prefixNamespace(key.getByteString(), namespace))
.setPrevKv(option.isPrevKV());
option.getEndKey()
.map(endKey -> Util.prefixNamespaceToRangeEnd(endKey.getByteString(), namespace))
.ifPresent(builder::setRangeEnd);
if (!option.getEndKey().isPresent() && option.isPrefix()) {
ByteSequence endKey = OptionsUtil.prefixEndOf(key);
builder.setRangeEnd(Util.prefixNamespaceToRangeEnd(endKey.getByteString(), namespace));
}
DeleteRangeRequest request = builder.build();
return connectionManager.execute(
() -> stub.deleteRange(request),
response -> new DeleteResponse(response, namespace),
Util::isRetryable);
}
@Override
public CompletableFuture<CompactResponse> compact(long rev) {
return this.compact(rev, CompactOption.DEFAULT);
}
@Override
public CompletableFuture<CompactResponse> compact(long rev, CompactOption option) {
checkNotNull(option, "option should not be null");
CompactionRequest request = CompactionRequest.newBuilder()
.setRevision(rev).setPhysical(option.isPhysical())
.build();
return connectionManager.execute(
() -> stub.compact(request),
CompactResponse::new,
Util::isRetryable);
}
public Txn txn() {
return TxnImpl.newTxn(
request -> connectionManager.execute(
() -> stub.txn(request),
response -> new TxnResponse(response, namespace), Util::isRetryable),
namespace);
}
}

View File

@ -16,6 +16,8 @@
package io.etcd.jetcd;
import io.etcd.jetcd.support.Util;
/**
* Etcd key value pair.
*/
@ -27,26 +29,35 @@ public class KeyValue {
public KeyValue(io.etcd.jetcd.api.KeyValue kv, ByteSequence namespace) {
this.kv = kv;
this.unprefixedKey = ByteSequence
.from(kv.getKey().isEmpty() ? kv.getKey() : Util.unprefixNamespace(kv.getKey(), namespace));
this.value = ByteSequence.from(kv.getValue());
this.unprefixedKey = ByteSequence.from(
kv.getKey().isEmpty()
? kv.getKey()
: Util.unprefixNamespace(kv.getKey(), namespace));
}
/**
* @return the key
* Returns the key
*
* @return the key.
*/
public ByteSequence getKey() {
return unprefixedKey;
}
/**
* @return the value
* Returns the value
*
* @return the value.
*/
public ByteSequence getValue() {
return value;
}
/**
* Returns the create revision.
*
* @return the create revision.
*/
public long getCreateRevision() {
@ -54,6 +65,8 @@ public class KeyValue {
}
/**
* Returns the mod revision.
*
* @return the mod revision.
*/
public long getModRevision() {
@ -61,6 +74,8 @@ public class KeyValue {
}
/**
* Returns the version.
*
* @return the version.
*/
public long getVersion() {
@ -68,6 +83,8 @@ public class KeyValue {
}
/**
* Returns the lease.
*
* @return the lease.
*/
public long getLease() {

View File

@ -1,352 +0,0 @@
/*
* Copyright 2016-2021 The jetcd authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.etcd.jetcd;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import com.google.common.util.concurrent.FutureCallback;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListeningScheduledExecutorService;
import com.google.common.util.concurrent.MoreExecutors;
import io.etcd.jetcd.api.LeaseGrantRequest;
import io.etcd.jetcd.api.LeaseGrpc;
import io.etcd.jetcd.api.LeaseKeepAliveRequest;
import io.etcd.jetcd.api.LeaseRevokeRequest;
import io.etcd.jetcd.api.LeaseTimeToLiveRequest;
import io.etcd.jetcd.common.exception.ErrorCode;
import io.etcd.jetcd.lease.LeaseGrantResponse;
import io.etcd.jetcd.lease.LeaseKeepAliveResponse;
import io.etcd.jetcd.lease.LeaseRevokeResponse;
import io.etcd.jetcd.lease.LeaseTimeToLiveResponse;
import io.etcd.jetcd.options.LeaseOption;
import io.etcd.jetcd.support.CloseableClient;
import io.etcd.jetcd.support.Observers;
import io.grpc.stub.StreamObserver;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import static com.google.common.base.Preconditions.checkNotNull;
import static io.etcd.jetcd.common.exception.EtcdExceptionFactory.newClosedLeaseClientException;
import static io.etcd.jetcd.common.exception.EtcdExceptionFactory.newEtcdException;
import static io.etcd.jetcd.common.exception.EtcdExceptionFactory.toEtcdException;
/**
* Implementation of lease client.
*/
final class LeaseImpl implements Lease {
private static final Logger LOG = LoggerFactory.getLogger(LeaseImpl.class);
/**
* FIRST_KEEPALIVE_TIMEOUT_MS is the timeout for the first keepalive request
* before the actual TTL is known to the lease client.
*/
private static final int FIRST_KEEPALIVE_TIMEOUT_MS = 5000;
private final ClientConnectionManager connectionManager;
private final LeaseGrpc.LeaseFutureStub stub;
private final LeaseGrpc.LeaseStub leaseStub;
private final Map<Long, KeepAlive> keepAlives;
/**
* Timer schedule to send keep alive request.
*/
private final ListeningScheduledExecutorService scheduledExecutorService;
private ScheduledFuture<?> keepAliveFuture;
private ScheduledFuture<?> deadlineFuture;
/**
* KeepAlive Request Stream, put request into this stream to keep the lease alive.
*/
private StreamObserver<LeaseKeepAliveRequest> keepAliveRequestObserver;
/**
* KeepAlive Response Streamer, receive keep alive response from this stream and update the
* nextKeepAliveTime and deadline of the leases.
*/
private StreamObserver<io.etcd.jetcd.api.LeaseKeepAliveResponse> keepAliveResponseObserver;
/**
* hasKeepAliveServiceStarted indicates whether the background keep alive service has started.
*/
private volatile boolean hasKeepAliveServiceStarted;
private volatile boolean closed;
LeaseImpl(ClientConnectionManager connectionManager) {
this.connectionManager = connectionManager;
this.stub = connectionManager.newStub(LeaseGrpc::newFutureStub);
this.leaseStub = Util.applyRequireLeader(true, connectionManager.newStub(LeaseGrpc::newStub));
this.keepAlives = new ConcurrentHashMap<>();
this.scheduledExecutorService = MoreExecutors.listeningDecorator(Executors.newScheduledThreadPool(2));
}
@Override
public CompletableFuture<LeaseGrantResponse> grant(long ttl) {
return connectionManager.execute(() -> this.stub.leaseGrant(LeaseGrantRequest.newBuilder().setTTL(ttl).build()),
LeaseGrantResponse::new);
}
@Override
public CompletableFuture<LeaseGrantResponse> grant(long ttl, long timeout, TimeUnit unit) {
return connectionManager.execute(
() -> this.stub.withDeadlineAfter(timeout, unit).leaseGrant(LeaseGrantRequest.newBuilder().setTTL(ttl).build()),
LeaseGrantResponse::new);
}
@Override
public CompletableFuture<LeaseRevokeResponse> revoke(long leaseId) {
return connectionManager.execute(() -> this.stub.leaseRevoke(LeaseRevokeRequest.newBuilder().setID(leaseId).build()),
LeaseRevokeResponse::new);
}
@Override
public synchronized CloseableClient keepAlive(long leaseId, StreamObserver<LeaseKeepAliveResponse> observer) {
if (this.closed) {
throw newClosedLeaseClientException();
}
KeepAlive keepAlive = this.keepAlives.computeIfAbsent(leaseId, (key) -> new KeepAlive(leaseId));
keepAlive.addObserver(observer);
if (!this.hasKeepAliveServiceStarted) {
this.hasKeepAliveServiceStarted = true;
this.start();
}
return new CloseableClient() {
@Override
public void close() {
keepAlive.removeObserver(observer);
}
};
}
@Override
public synchronized void close() {
if (this.closed) {
return;
}
this.closed = true;
if (!this.hasKeepAliveServiceStarted) { // hasKeepAliveServiceStarted hasn't started.
return;
}
this.keepAliveFuture.cancel(true);
this.deadlineFuture.cancel(true);
this.keepAliveRequestObserver.onCompleted();
this.keepAliveResponseObserver.onCompleted();
this.scheduledExecutorService.shutdownNow();
final Throwable errResp = newClosedLeaseClientException();
this.keepAlives.forEach((k, v) -> v.onError(errResp));
this.keepAlives.clear();
}
private synchronized void removeKeepAlive(long leaseId) {
this.keepAlives.remove(leaseId);
}
private void start() {
this.sendKeepAliveExecutor();
this.deadLineExecutor();
}
private void reset() {
this.keepAliveFuture.cancel(true);
this.keepAliveRequestObserver.onCompleted();
this.keepAliveResponseObserver.onCompleted();
this.sendKeepAliveExecutor();
}
private void sendKeepAliveExecutor() {
this.keepAliveResponseObserver = Observers.observer(this::processKeepAliveResponse, error -> processOnError());
this.keepAliveRequestObserver = this.leaseStub.leaseKeepAlive(this.keepAliveResponseObserver);
this.keepAliveFuture = scheduledExecutorService.scheduleAtFixedRate(() -> {
// send keep alive req to the leases whose next keep alive is before now.
this.keepAlives.entrySet().stream()
.filter(entry -> entry.getValue().getNextKeepAlive() < System.currentTimeMillis()).map(Entry::getKey)
.map(leaseId -> LeaseKeepAliveRequest.newBuilder().setID(leaseId).build())
.forEach(keepAliveRequestObserver::onNext);
}, 0, 500, TimeUnit.MILLISECONDS);
}
private synchronized void processOnError() {
if (this.closed) {
return;
}
Futures.addCallback(this.scheduledExecutorService.schedule(this::reset, 500, TimeUnit.MILLISECONDS),
new FutureCallback<Object>() {
@Override
public void onFailure(Throwable throwable) {
LOG.error("scheduled reset failed", throwable);
}
@Override
public void onSuccess(Object result) {
}
}, this.scheduledExecutorService);
}
private synchronized void processKeepAliveResponse(io.etcd.jetcd.api.LeaseKeepAliveResponse leaseKeepAliveResponse) {
if (this.closed) {
return;
}
final long leaseID = leaseKeepAliveResponse.getID();
final long ttl = leaseKeepAliveResponse.getTTL();
final KeepAlive ka = this.keepAlives.get(leaseID);
if (ka == null) {
// return if the corresponding keep alive has closed.
return;
}
if (ttl > 0) {
long nextKeepAlive = System.currentTimeMillis() + ttl * 1000 / 3;
ka.setNextKeepAlive(nextKeepAlive);
ka.setDeadLine(System.currentTimeMillis() + ttl * 1000);
ka.onNext(leaseKeepAliveResponse);
} else {
// lease expired; close all keep alive
this.removeKeepAlive(leaseID);
ka.onError(newEtcdException(ErrorCode.NOT_FOUND, "etcdserver: requested lease not found"));
}
}
private void deadLineExecutor() {
this.deadlineFuture = scheduledExecutorService.scheduleAtFixedRate(() -> {
long now = System.currentTimeMillis();
this.keepAlives.values().removeIf(ka -> {
if (ka.getDeadLine() < now) {
ka.onCompleted();
return true;
}
return false;
});
}, 0, 1000, TimeUnit.MILLISECONDS);
}
@Override
public CompletableFuture<LeaseKeepAliveResponse> keepAliveOnce(long leaseId) {
CompletableFuture<LeaseKeepAliveResponse> future = new CompletableFuture<>();
StreamObserver<LeaseKeepAliveRequest> requestObserver = Observers.observe(
this.leaseStub::leaseKeepAlive,
response -> future.complete(new LeaseKeepAliveResponse(response)),
throwable -> future.completeExceptionally(toEtcdException(throwable)));
// cancel grpc stream when leaseKeepAliveResponseCompletableFuture completes.
CompletableFuture<LeaseKeepAliveResponse> answer = future
.whenCompleteAsync((val, throwable) -> requestObserver.onCompleted(), connectionManager.getExecutorService());
requestObserver.onNext(LeaseKeepAliveRequest.newBuilder().setID(leaseId).build());
return answer;
}
@Override
public CompletableFuture<LeaseTimeToLiveResponse> timeToLive(long leaseId, LeaseOption option) {
checkNotNull(option, "LeaseOption should not be null");
LeaseTimeToLiveRequest leaseTimeToLiveRequest = LeaseTimeToLiveRequest.newBuilder()
.setID(leaseId)
.setKeys(option.isAttachedKeys())
.build();
return connectionManager.execute(
() -> this.stub.leaseTimeToLive(leaseTimeToLiveRequest),
LeaseTimeToLiveResponse::new);
}
/**
* The KeepAlive hold the keepAlive information for lease.
*/
private final class KeepAlive implements StreamObserver<io.etcd.jetcd.api.LeaseKeepAliveResponse> {
private final List<StreamObserver<LeaseKeepAliveResponse>> observers;
private final long leaseId;
private long deadLine;
private long nextKeepAlive;
public KeepAlive(long leaseId) {
this.nextKeepAlive = System.currentTimeMillis();
this.deadLine = nextKeepAlive + FIRST_KEEPALIVE_TIMEOUT_MS;
this.observers = new CopyOnWriteArrayList<>();
this.leaseId = leaseId;
}
public long getDeadLine() {
return deadLine;
}
public void setDeadLine(long deadLine) {
this.deadLine = deadLine;
}
public void addObserver(StreamObserver<LeaseKeepAliveResponse> observer) {
this.observers.add(observer);
}
//removeObserver only would be called synchronously by close in KeepAliveListener, no need to get lock here
public void removeObserver(StreamObserver<LeaseKeepAliveResponse> listener) {
this.observers.remove(listener);
if (this.observers.isEmpty()) {
removeKeepAlive(leaseId);
}
}
public long getNextKeepAlive() {
return nextKeepAlive;
}
public void setNextKeepAlive(long nextKeepAlive) {
this.nextKeepAlive = nextKeepAlive;
}
@Override
public void onNext(io.etcd.jetcd.api.LeaseKeepAliveResponse response) {
for (StreamObserver<LeaseKeepAliveResponse> observer : observers) {
observer.onNext(new LeaseKeepAliveResponse(response));
}
}
@Override
public void onError(Throwable throwable) {
for (StreamObserver<LeaseKeepAliveResponse> observer : observers) {
observer.onError(toEtcdException(throwable));
}
}
@Override
public void onCompleted() {
this.observers.forEach(StreamObserver::onCompleted);
this.observers.clear();
}
}
}

View File

@ -1,71 +0,0 @@
/*
* Copyright 2016-2021 The jetcd authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.etcd.jetcd;
import java.util.concurrent.CompletableFuture;
import io.etcd.jetcd.api.lock.LockGrpc;
import io.etcd.jetcd.api.lock.LockRequest;
import io.etcd.jetcd.api.lock.UnlockRequest;
import io.etcd.jetcd.lock.LockResponse;
import io.etcd.jetcd.lock.UnlockResponse;
import static com.google.common.base.Preconditions.checkNotNull;
final class LockImpl implements Lock {
private final ClientConnectionManager connectionManager;
private final LockGrpc.LockFutureStub stub;
private final ByteSequence namespace;
LockImpl(ClientConnectionManager connectionManager) {
this.connectionManager = connectionManager;
this.stub = connectionManager.newStub(LockGrpc::newFutureStub);
this.namespace = connectionManager.getNamespace();
}
@Override
public CompletableFuture<LockResponse> lock(ByteSequence name, long leaseId) {
checkNotNull(name);
LockRequest request = LockRequest.newBuilder()
.setName(Util.prefixNamespace(name.getByteString(), namespace))
.setLease(leaseId)
.build();
return connectionManager.execute(
() -> stub.lock(request),
response -> new LockResponse(response, namespace),
Util::isRetryable);
}
@Override
public CompletableFuture<UnlockResponse> unlock(ByteSequence lockKey) {
checkNotNull(lockKey);
UnlockRequest request = UnlockRequest.newBuilder()
.setKey(Util.prefixNamespace(lockKey.getByteString(), namespace))
.build();
return connectionManager.execute(
() -> stub.unlock(request),
UnlockResponse::new,
Util::isRetryable);
}
}

View File

@ -17,16 +17,9 @@
package io.etcd.jetcd;
import java.io.OutputStream;
import java.net.URI;
import java.util.concurrent.CompletableFuture;
import io.etcd.jetcd.maintenance.AlarmMember;
import io.etcd.jetcd.maintenance.AlarmResponse;
import io.etcd.jetcd.maintenance.DefragmentResponse;
import io.etcd.jetcd.maintenance.HashKVResponse;
import io.etcd.jetcd.maintenance.MoveLeaderResponse;
import io.etcd.jetcd.maintenance.SnapshotResponse;
import io.etcd.jetcd.maintenance.StatusResponse;
import io.etcd.jetcd.maintenance.*;
import io.etcd.jetcd.support.CloseableClient;
import io.grpc.stub.StreamObserver;
@ -55,7 +48,7 @@ public interface Maintenance extends CloseableClient {
/**
* get all active keyspace alarm.
*
*
* @return the response
*/
CompletableFuture<AlarmResponse> listAlarms();
@ -69,7 +62,7 @@ public interface Maintenance extends CloseableClient {
CompletableFuture<AlarmResponse> alarmDisarm(AlarmMember member);
/**
* defragment one member of the cluster by its endpoint.
* Defragment one member of the cluster by its endpoint.
*
* <p>
* After compacting the keyspace, the backend database may exhibit internal
@ -85,29 +78,29 @@ public interface Maintenance extends CloseableClient {
* To defragment multiple members in the cluster, user need to call defragment
* multiple times with different endpoints.
*
* @param endpoint the etcd server endpoint.
* @return the response result
* @param target the etcd server endpoint.
* @return the response result
*/
CompletableFuture<DefragmentResponse> defragmentMember(URI endpoint);
CompletableFuture<DefragmentResponse> defragmentMember(String target);
/**
* get the status of a member by its endpoint.
*
* @param endpoint the etcd server endpoint.
* @return the response result
* @param target the etcd server endpoint.
* @return the response result
*/
CompletableFuture<StatusResponse> statusMember(URI endpoint);
CompletableFuture<StatusResponse> statusMember(String target);
/**
* returns a hash of the KV state at the time of the RPC.
* If revision is zero, the hash is computed on all keys. If the revision
* is non-zero, the hash is computed on all keys at or below the given revision.
*
* @param endpoint the etcd server endpoint.
* @param rev the revision
* @return the response result
* @param target the etcd server endpoint.
* @param rev the revision
* @return the response result
*/
CompletableFuture<HashKVResponse> hashKV(URI endpoint, long rev);
CompletableFuture<HashKVResponse> hashKV(String target, long rev);
/**
* retrieves backend snapshot.

View File

@ -1,208 +0,0 @@
/*
* Copyright 2016-2021 The jetcd authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.etcd.jetcd;
import java.io.IOException;
import java.io.OutputStream;
import java.net.URI;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.atomic.AtomicLong;
import io.etcd.jetcd.api.AlarmRequest;
import io.etcd.jetcd.api.AlarmType;
import io.etcd.jetcd.api.DefragmentRequest;
import io.etcd.jetcd.api.HashKVRequest;
import io.etcd.jetcd.api.MaintenanceGrpc;
import io.etcd.jetcd.api.MoveLeaderRequest;
import io.etcd.jetcd.api.SnapshotRequest;
import io.etcd.jetcd.api.SnapshotResponse;
import io.etcd.jetcd.api.StatusRequest;
import io.etcd.jetcd.maintenance.AlarmResponse;
import io.etcd.jetcd.maintenance.DefragmentResponse;
import io.etcd.jetcd.maintenance.HashKVResponse;
import io.etcd.jetcd.maintenance.MoveLeaderResponse;
import io.etcd.jetcd.maintenance.StatusResponse;
import io.grpc.stub.StreamObserver;
import static com.google.common.base.Preconditions.checkArgument;
import static io.etcd.jetcd.common.exception.EtcdExceptionFactory.toEtcdException;
/**
* Implementation of maintenance client.
*/
final class MaintenanceImpl implements Maintenance {
private final ClientConnectionManager connectionManager;
private final MaintenanceGrpc.MaintenanceFutureStub stub;
private final MaintenanceGrpc.MaintenanceStub streamStub;
MaintenanceImpl(ClientConnectionManager connectionManager) {
this.connectionManager = connectionManager;
this.stub = connectionManager.newStub(MaintenanceGrpc::newFutureStub);
this.streamStub = connectionManager.newStub(MaintenanceGrpc::newStub);
}
/**
* get all active keyspace alarm.
*
* @return alarm list
*/
@Override
public CompletableFuture<AlarmResponse> listAlarms() {
AlarmRequest alarmRequest = AlarmRequest.newBuilder()
.setAlarm(AlarmType.NONE)
.setAction(AlarmRequest.AlarmAction.GET)
.setMemberID(0)
.build();
return Util.toCompletableFuture(this.stub.alarm(alarmRequest), AlarmResponse::new,
this.connectionManager.getExecutorService());
}
/**
* disarms a given alarm.
*
* @param member the alarm
* @return the response result
*/
@Override
public CompletableFuture<AlarmResponse> alarmDisarm(io.etcd.jetcd.maintenance.AlarmMember member) {
checkArgument(member.getMemberId() != 0, "the member id can not be 0");
checkArgument(member.getAlarmType() != io.etcd.jetcd.maintenance.AlarmType.NONE, "alarm type can not be NONE");
AlarmRequest alarmRequest = AlarmRequest.newBuilder()
.setAlarm(AlarmType.NOSPACE)
.setAction(AlarmRequest.AlarmAction.DEACTIVATE)
.setMemberID(member.getMemberId())
.build();
return Util.toCompletableFuture(this.stub.alarm(alarmRequest), AlarmResponse::new,
this.connectionManager.getExecutorService());
}
/**
* defragment one member of the cluster.
*
* <p>
* After compacting the keyspace, the backend database may exhibit internal
* fragmentation. Any internal fragmentation is space that is free to use
* by the backend but still consumes storage space. The process of
* defragmentation releases this storage space back to the file system.
* Defragmentation is issued on a per-member so that cluster-wide latency
* spikes may be avoided.
*
* <p>
* Defragment is an expensive operation. User should avoid defragmenting
* multiple members at the same time.
* To defragment multiple members in the cluster, user need to call defragment
* multiple times with different endpoints.
*/
@Override
public CompletableFuture<DefragmentResponse> defragmentMember(URI endpoint) {
return this.connectionManager.withNewChannel(
endpoint,
MaintenanceGrpc::newFutureStub,
stub -> Util.toCompletableFuture(
stub.defragment(DefragmentRequest.getDefaultInstance()),
DefragmentResponse::new,
this.connectionManager.getExecutorService()));
}
/**
* get the status of one member.
*/
@Override
public CompletableFuture<StatusResponse> statusMember(URI endpoint) {
return this.connectionManager.withNewChannel(
endpoint,
MaintenanceGrpc::newFutureStub,
stub -> Util.toCompletableFuture(
stub.status(StatusRequest.getDefaultInstance()),
StatusResponse::new,
this.connectionManager.getExecutorService()));
}
@Override
public CompletableFuture<MoveLeaderResponse> moveLeader(long transfereeID) {
return Util.toCompletableFuture(
this.stub.moveLeader(MoveLeaderRequest.newBuilder().setTargetID(transfereeID).build()),
MoveLeaderResponse::new,
this.connectionManager.getExecutorService());
}
@Override
public CompletableFuture<HashKVResponse> hashKV(URI endpoint, long rev) {
return this.connectionManager.withNewChannel(
endpoint,
MaintenanceGrpc::newFutureStub,
stub -> Util.toCompletableFuture(
stub.hashKV(HashKVRequest.newBuilder().setRevision(rev).build()),
HashKVResponse::new,
this.connectionManager.getExecutorService()));
}
@Override
public CompletableFuture<Long> snapshot(OutputStream outputStream) {
final CompletableFuture<Long> answer = new CompletableFuture<>();
final AtomicLong bytes = new AtomicLong(0);
this.streamStub.snapshot(SnapshotRequest.getDefaultInstance(), new StreamObserver<SnapshotResponse>() {
@Override
public void onNext(SnapshotResponse snapshotResponse) {
try {
snapshotResponse.getBlob().writeTo(outputStream);
bytes.addAndGet(snapshotResponse.getBlob().size());
} catch (IOException e) {
answer.completeExceptionally(toEtcdException(e));
}
}
@Override
public void onError(Throwable throwable) {
answer.completeExceptionally(toEtcdException(throwable));
}
@Override
public void onCompleted() {
answer.complete(bytes.get());
}
});
return answer;
}
@Override
public void snapshot(StreamObserver<io.etcd.jetcd.maintenance.SnapshotResponse> observer) {
this.streamStub.snapshot(SnapshotRequest.getDefaultInstance(), new StreamObserver<SnapshotResponse>() {
@Override
public void onNext(SnapshotResponse snapshotResponse) {
observer.onNext(new io.etcd.jetcd.maintenance.SnapshotResponse(snapshotResponse));
}
@Override
public void onError(Throwable throwable) {
observer.onError(toEtcdException(throwable));
}
@Override
public void onCompleted() {
observer.onCompleted();
}
});
}
}

View File

@ -0,0 +1,32 @@
/*
* Copyright 2016-2023 The jetcd authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.etcd.jetcd;
public class Preconditions {
public static void checkArgument(boolean expression, String errorMessage) {
if (!expression) {
throw new IllegalArgumentException(errorMessage);
}
}
public static void checkState(boolean expression, String errorMessage) {
if (!expression) {
throw new IllegalStateException(errorMessage);
}
}
}

View File

@ -22,29 +22,39 @@ package io.etcd.jetcd;
public interface Response {
/**
* @return the response header
* Returns the response header
*
* @return the header.
*/
Header getHeader();
interface Header {
/**
* @return the cluster id
* Returns the cluster id
*
* @return the cluster id.
*/
long getClusterId();
/**
* @return the member id
* Returns the member id
*
* @return the member id.
*/
long getMemberId();
/**
* @return the revision id
* Returns the revision id
*
* @return the revision.
*/
long getRevision();
/**
* @return the raft term
* Returns the raft term
*
* @return theraft term.
*/
long getRaftTerm();
}

View File

@ -1,5 +1,5 @@
/*
* Copyright 2016-2021 The jetcd authors
* Copyright 2016-2023 The jetcd authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -25,20 +25,19 @@ import io.etcd.jetcd.op.Op;
/**
* Txn is the interface that wraps mini-transactions.
*
* <h3>Usage examples</h3>
* <h2>Usage examples</h2>
*
* <pre>
* {@code
* txn.If(
* new Cmp(KEY, Cmp.Op.GREATER, CmpTarget.value(VALUE)),
* new Cmp(KEY, cmp.Op.EQUAL, CmpTarget.version(2))
* ).Then(
* Op.put(KEY2, VALUE2, PutOption.DEFAULT),
* Op.put(KEY3, VALUE3, PutOption.DEFAULT)
* ).Else(
* Op.put(KEY4, VALUE4, PutOption.DEFAULT),
* Op.put(KEY4, VALUE4, PutOption.DEFAULT)
* ).commit();
* new Cmp(KEY, Cmp.Op.GREATER, CmpTarget.value(VALUE)),
* new Cmp(KEY, cmp.Op.EQUAL, CmpTarget.version(2))).Then(
* Op.put(KEY2, VALUE2, PutOption.DEFAULT),
* Op.put(KEY3, VALUE3, PutOption.DEFAULT))
* .Else(
* Op.put(KEY4, VALUE4, PutOption.DEFAULT),
* Op.put(KEY4, VALUE4, PutOption.DEFAULT))
* .commit();
* }
* </pre>
*
@ -48,18 +47,17 @@ import io.etcd.jetcd.op.Op;
* <pre>
* {@code
* txn.If(
* new Cmp(KEY, Cmp.Op.GREATER, CmpTarget.value(VALUE))
* ).If(
* new Cmp(KEY, cmp.Op.EQUAL, CmpTarget.version(VERSION))
* ).Then(
* Op.put(KEY2, VALUE2, PutOption.DEFAULT)
* ).Then(
* Op.put(KEY3, VALUE3, PutOption.DEFAULT)
* ).Else(
* Op.put(KEY4, VALUE4, PutOption.DEFAULT)
* ).Else(
* Op.put(KEY4, VALUE4, PutOption.DEFAULT)
* ).commit();
* new Cmp(KEY, Cmp.Op.GREATER, CmpTarget.value(VALUE))).If(
* new Cmp(KEY, cmp.Op.EQUAL, CmpTarget.version(VERSION)))
* .Then(
* Op.put(KEY2, VALUE2, PutOption.DEFAULT))
* .Then(
* Op.put(KEY3, VALUE3, PutOption.DEFAULT))
* .Else(
* Op.put(KEY4, VALUE4, PutOption.DEFAULT))
* .Else(
* Op.put(KEY4, VALUE4, PutOption.DEFAULT))
* .commit();
* }
* </pre>
*/

View File

@ -1,145 +0,0 @@
/*
* Copyright 2016-2021 The jetcd authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.etcd.jetcd;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Collection;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Executor;
import java.util.function.Function;
import java.util.function.Supplier;
import java.util.stream.Collectors;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.protobuf.ByteString;
import io.grpc.Metadata;
import io.grpc.Status;
import io.grpc.stub.AbstractStub;
import io.grpc.stub.MetadataUtils;
import static io.etcd.jetcd.common.exception.EtcdExceptionFactory.toEtcdException;
public final class Util {
private Util() {
}
public static List<URI> toURIs(Collection<String> uris) {
return uris.stream().map(uri -> {
try {
return new URI(uri);
} catch (URISyntaxException e) {
throw new IllegalArgumentException("Invalid endpoint URI: " + uri, e);
}
}).collect(Collectors.toList());
}
/**
* convert ListenableFuture of Type S to CompletableFuture of Type T.
*/
static <S, T> CompletableFuture<T> toCompletableFuture(ListenableFuture<S> sourceFuture, Function<S, T> resultConvert,
Executor executor) {
CompletableFuture<T> targetFuture = new CompletableFuture<T>() {
// the cancel of targetFuture also cancels the sourceFuture.
@Override
public boolean cancel(boolean mayInterruptIfRunning) {
super.cancel(mayInterruptIfRunning);
return sourceFuture.cancel(mayInterruptIfRunning);
}
};
sourceFuture.addListener(() -> {
try {
targetFuture.complete(resultConvert.apply(sourceFuture.get()));
} catch (Exception e) {
targetFuture.completeExceptionally(toEtcdException(e));
}
}, executor);
return targetFuture;
}
public static boolean isRetryable(Throwable e) {
Status status = Status.fromThrowable(e);
return Status.UNAVAILABLE.getCode().equals(status.getCode()) || isInvalidTokenError(status);
}
public static boolean isInvalidTokenError(Status status) {
return status.getCode() == Status.Code.UNAUTHENTICATED
&& "etcdserver: invalid auth token".equals(status.getDescription());
}
public static <T> T supplyIfNull(T target, Supplier<T> supplier) {
return target != null ? target : supplier.get();
}
public static ByteString prefixNamespace(ByteString key, ByteSequence namespace) {
return namespace.isEmpty() ? key : namespace.getByteString().concat(key);
}
public static ByteString prefixNamespaceToRangeEnd(ByteString end, ByteSequence namespace) {
if (namespace.isEmpty()) {
return end;
}
if (end.size() == 1 && end.toByteArray()[0] == 0) {
// range end is '\0', calculate the prefixed range end by (key + 1)
byte[] prefixedEndArray = namespace.getByteString().toByteArray();
boolean ok = false;
for (int i = prefixedEndArray.length - 1; i >= 0; i--) {
prefixedEndArray[i] = (byte) (prefixedEndArray[i] + 1);
if (prefixedEndArray[i] != 0) {
ok = true;
break;
}
}
if (!ok) {
// 0xff..ff => 0x00
prefixedEndArray = new byte[] { 0 };
}
return ByteString.copyFrom(prefixedEndArray);
} else {
return namespace.getByteString().concat(end);
}
}
public static ByteString unprefixNamespace(ByteString key, ByteSequence namespace) {
return namespace.isEmpty() ? key : key.substring(namespace.size());
}
static <T extends AbstractStub<T>> T applyRequireLeader(boolean requireLeader, T stub) {
if (!requireLeader) {
return stub;
}
final Metadata md = new Metadata();
md.put(Constants.REQUIRE_LEADER_KEY, Constants.REQUIRE_LEADER_VALUE);
return MetadataUtils.attachHeaders(stub, md);
}
public static boolean isHaltError(final Status status) {
return status.getCode() != Status.Code.UNAVAILABLE && status.getCode() != Status.Code.INTERNAL;
}
static final String NO_LEADER_ERROR_MESSAGE = "etcdserver: no leader";
public static boolean isNoLeaderError(final Status status) {
return status.getCode() == Status.Code.UNAVAILABLE && NO_LEADER_ERROR_MESSAGE.equals(status.getDescription());
}
}

View File

@ -53,6 +53,8 @@ public interface Watch extends CloseableClient {
}
/**
* Watch key.
*
* @param key key to be watched on.
* @param onNext the on next consumer
* @return this watcher
@ -62,6 +64,8 @@ public interface Watch extends CloseableClient {
}
/**
* Watch key.
*
* @param key key to be watched on.
* @param onNext the on next consumer
* @param onError the on error consumer
@ -72,6 +76,8 @@ public interface Watch extends CloseableClient {
}
/**
* Watch key.
*
* @param key key to be watched on.
* @param onNext the on next consumer
* @param onError the on error consumer
@ -83,6 +89,8 @@ public interface Watch extends CloseableClient {
}
/**
* Watch key.
*
* @param key key to be watched on.
* @param onNext the on next consumer
* @param onCompleted the on completion consumer
@ -94,6 +102,7 @@ public interface Watch extends CloseableClient {
}
/**
* Watch key with option.
*
* @param key key to be watched on.
* @param option the options
@ -105,6 +114,8 @@ public interface Watch extends CloseableClient {
}
/**
* Watch key with option.
*
* @param key key to be watched on.
* @param option the options
* @param onNext the on next consumer
@ -116,6 +127,8 @@ public interface Watch extends CloseableClient {
}
/**
* Watch key with option.
*
* @param key key to be watched on.
* @param option the options
* @param onNext the on next consumer
@ -128,6 +141,8 @@ public interface Watch extends CloseableClient {
}
/**
* Watch key with option.
*
* @param key key to be watched on.
* @param option the options
* @param onNext the on next consumer
@ -211,6 +226,11 @@ public interface Watch extends CloseableClient {
@Override
void close();
/**
* Returns if watcher is already closed
*/
boolean isClosed();
/**
* Requests the latest revision processed and propagates it to listeners
*/

View File

@ -16,10 +16,11 @@
package io.etcd.jetcd.auth;
import io.etcd.jetcd.AbstractResponse;
import io.etcd.jetcd.Auth;
import io.etcd.jetcd.impl.AbstractResponse;
/**
* AuthDisableResponse returned by {@link io.etcd.jetcd.Auth#authDisable()} contains a header.
* AuthDisableResponse returned by {@link Auth#authDisable()} contains a header.
*/
public class AuthDisableResponse extends AbstractResponse<io.etcd.jetcd.api.AuthDisableResponse> {

View File

@ -16,10 +16,11 @@
package io.etcd.jetcd.auth;
import io.etcd.jetcd.AbstractResponse;
import io.etcd.jetcd.Auth;
import io.etcd.jetcd.impl.AbstractResponse;
/**
* AuthEnableResponse returned by {@link io.etcd.jetcd.Auth#authEnable()} call contains a header.
* AuthEnableResponse returned by {@link Auth#authEnable()} call contains a header.
*/
public class AuthEnableResponse extends AbstractResponse<io.etcd.jetcd.api.AuthEnableResponse> {

View File

@ -1,179 +0,0 @@
/*
* Copyright 2016-2021 The jetcd authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.etcd.jetcd.auth;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ExecutionException;
import java.util.function.BiConsumer;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.protobuf.ByteString;
import io.etcd.jetcd.ClientBuilder;
import io.etcd.jetcd.api.AuthGrpc;
import io.etcd.jetcd.api.AuthenticateRequest;
import io.etcd.jetcd.api.AuthenticateResponse;
import io.grpc.CallOptions;
import io.grpc.Channel;
import io.grpc.ClientCall;
import io.grpc.ClientInterceptor;
import io.grpc.ForwardingClientCall;
import io.grpc.ForwardingClientCallListener;
import io.grpc.Metadata;
import io.grpc.MethodDescriptor;
import io.grpc.Status;
import io.grpc.stub.MetadataUtils;
import static com.google.common.base.Preconditions.checkArgument;
import static io.etcd.jetcd.Util.isInvalidTokenError;
import static io.etcd.jetcd.common.exception.EtcdExceptionFactory.handleInterrupt;
import static io.etcd.jetcd.common.exception.EtcdExceptionFactory.toEtcdException;
/**
* AuthTokenInterceptor fills header with Auth token of any rpc calls and
* refreshes token if the rpc results an invalid Auth token error.
*/
public class AuthInterceptor implements ClientInterceptor {
private static final Metadata.Key<String> TOKEN = Metadata.Key.of("token", Metadata.ASCII_STRING_MARSHALLER);
private final Object lock;
private final ClientBuilder builder;
private final ClientInterceptor[] interceptors;
private volatile String token;
public AuthInterceptor(ClientBuilder builder) {
this.lock = new Object();
this.builder = builder;
List<ClientInterceptor> interceptorsChain = new ArrayList<>();
if (builder.authHeaders() != null) {
Metadata metadata = new Metadata();
builder.authHeaders().forEach((BiConsumer<Metadata.Key, Object>) metadata::put);
interceptorsChain.add(MetadataUtils.newAttachHeadersInterceptor(metadata));
}
if (builder.authInterceptors() != null) {
interceptorsChain.addAll(builder.authInterceptors());
}
this.interceptors = interceptorsChain.isEmpty() ? null : interceptorsChain.toArray(new ClientInterceptor[0]);
}
@Override
public <ReqT, RespT> ClientCall<ReqT, RespT> interceptCall(
MethodDescriptor<ReqT, RespT> method, CallOptions callOptions, Channel next) {
return new ForwardingClientCall.SimpleForwardingClientCall<ReqT, RespT>(next.newCall(method, callOptions)) {
@Override
public void start(Listener<RespT> responseListener, Metadata headers) {
String token = getToken(next);
if (token != null) {
headers.put(TOKEN, token);
}
super.start(new ForwardingClientCallListener.SimpleForwardingClientCallListener<RespT>(responseListener) {
@Override
public void onClose(Status status, Metadata trailers) {
if (isInvalidTokenError(status)) {
try {
refreshToken(next);
} catch (Exception e) {
// don't throw any error here.
// rpc will retry on expired auth token.
}
}
super.onClose(status, trailers);
}
}, headers);
}
};
}
public void refresh() {
synchronized (lock) {
token = null;
}
}
/**
* get token from etcd with name and password.
*
* @param channel channel to etcd
* @return authResp
*/
@SuppressWarnings("rawtypes")
private ListenableFuture<AuthenticateResponse> authenticate(@Nonnull Channel channel) {
final ByteString user = ByteString.copyFrom(builder.user().getBytes());
final ByteString pass = ByteString.copyFrom(builder.password().getBytes());
checkArgument(!user.isEmpty(), "username can not be empty.");
checkArgument(!pass.isEmpty(), "password can not be empty.");
AuthGrpc.AuthFutureStub authFutureStub = AuthGrpc.newFutureStub(channel);
if (interceptors != null) {
authFutureStub = authFutureStub.withInterceptors(interceptors);
}
return authFutureStub.authenticate(
AuthenticateRequest.newBuilder()
.setNameBytes(user)
.setPasswordBytes(pass)
.build());
}
@Nullable
private String getToken(Channel channel) {
if (token == null) {
synchronized (lock) {
if (token == null) {
token = generateToken(channel);
}
}
}
return token;
}
private void refreshToken(Channel channel) {
synchronized (lock) {
token = generateToken(channel);
}
}
/**
* get token with ClientBuilder.
*
* @return the auth token
* @throws io.etcd.jetcd.common.exception.EtcdException a exception indicates failure reason.
*/
@Nullable
private String generateToken(Channel channel) {
if (builder.user() != null && builder.password() != null) {
try {
return authenticate(channel).get().getToken();
} catch (InterruptedException ite) {
throw handleInterrupt(ite);
} catch (ExecutionException exee) {
throw toEtcdException(exee);
}
}
return null;
}
}

View File

@ -16,11 +16,12 @@
package io.etcd.jetcd.auth;
import io.etcd.jetcd.AbstractResponse;
import io.etcd.jetcd.Auth;
import io.etcd.jetcd.ByteSequence;
import io.etcd.jetcd.impl.AbstractResponse;
/**
* AuthRoleAddResponse returned by {@link io.etcd.jetcd.Auth#roleAdd(ByteSequence)} contains
* AuthRoleAddResponse returned by {@link Auth#roleAdd(ByteSequence)} contains
* a header.
*/
public class AuthRoleAddResponse extends AbstractResponse<io.etcd.jetcd.api.AuthRoleAddResponse> {

View File

@ -16,11 +16,12 @@
package io.etcd.jetcd.auth;
import io.etcd.jetcd.AbstractResponse;
import io.etcd.jetcd.Auth;
import io.etcd.jetcd.ByteSequence;
import io.etcd.jetcd.impl.AbstractResponse;
/**
* AuthRoleDeleteResponse returned by {@link io.etcd.jetcd.Auth#roleDelete(ByteSequence)}
* AuthRoleDeleteResponse returned by {@link Auth#roleDelete(ByteSequence)}
* contains a header.
*/
public class AuthRoleDeleteResponse extends AbstractResponse<io.etcd.jetcd.api.AuthRoleDeleteResponse> {

View File

@ -19,12 +19,12 @@ package io.etcd.jetcd.auth;
import java.util.List;
import java.util.stream.Collectors;
import io.etcd.jetcd.AbstractResponse;
import io.etcd.jetcd.Auth;
import io.etcd.jetcd.ByteSequence;
import io.etcd.jetcd.auth.Permission.Type;
import io.etcd.jetcd.impl.AbstractResponse;
/**
* AuthRoleGetResponse returned by {@link io.etcd.jetcd.Auth#roleGet(ByteSequence)} contains
* AuthRoleGetResponse returned by {@link Auth#roleGet(ByteSequence)} contains
* a header and a list of permissions.
*/
public class AuthRoleGetResponse extends AbstractResponse<io.etcd.jetcd.api.AuthRoleGetResponse> {
@ -42,16 +42,16 @@ public class AuthRoleGetResponse extends AbstractResponse<io.etcd.jetcd.api.Auth
Permission.Type type;
switch (perm.getPermType()) {
case READ:
type = Type.READ;
type = Permission.Type.READ;
break;
case WRITE:
type = Type.WRITE;
type = Permission.Type.WRITE;
break;
case READWRITE:
type = Type.READWRITE;
type = Permission.Type.READWRITE;
break;
default:
type = Type.UNRECOGNIZED;
type = Permission.Type.UNRECOGNIZED;
}
return new Permission(type, key, rangeEnd);

View File

@ -16,12 +16,13 @@
package io.etcd.jetcd.auth;
import io.etcd.jetcd.AbstractResponse;
import io.etcd.jetcd.Auth;
import io.etcd.jetcd.ByteSequence;
import io.etcd.jetcd.impl.AbstractResponse;
/**
* AuthRoleGrantPermissionResponse returned by
* {@link io.etcd.jetcd.Auth#roleGrantPermission(ByteSequence, ByteSequence, ByteSequence, Permission.Type)} contains a
* {@link Auth#roleGrantPermission(ByteSequence, ByteSequence, ByteSequence, Permission.Type)} contains a
* header.
*/
public class AuthRoleGrantPermissionResponse extends AbstractResponse<io.etcd.jetcd.api.AuthRoleGrantPermissionResponse> {

View File

@ -18,8 +18,8 @@ package io.etcd.jetcd.auth;
import java.util.List;
import io.etcd.jetcd.AbstractResponse;
import io.etcd.jetcd.Auth;
import io.etcd.jetcd.impl.AbstractResponse;
/**
* AuthRoleListResponse returned by {@link Auth#roleList()} contains a header and
@ -32,7 +32,9 @@ public class AuthRoleListResponse extends AbstractResponse<io.etcd.jetcd.api.Aut
}
/**
* @return a list of roles.
* Returns a list of roles.
*
* @return the roles.
*/
public List<String> getRoles() {
return getResponse().getRolesList();

View File

@ -16,12 +16,10 @@
package io.etcd.jetcd.auth;
import io.etcd.jetcd.AbstractResponse;
import io.etcd.jetcd.impl.AbstractResponse;
/**
* AuthRoleRevokePermissionResponse returned by
* {@link io.etcd.jetcd.Auth#roleRevokePermission(io.etcd.jetcd.ByteSequence.ByteSequence,
* io.etcd.jetcd.ByteSequence.ByteSequence, io.etcd.jetcd.ByteSequence.ByteSequence)} contains a header.
* AuthRoleRevokePermissionResponse
*/
public class AuthRoleRevokePermissionResponse extends AbstractResponse<io.etcd.jetcd.api.AuthRoleRevokePermissionResponse> {

View File

@ -16,11 +16,12 @@
package io.etcd.jetcd.auth;
import io.etcd.jetcd.AbstractResponse;
import io.etcd.jetcd.Auth;
import io.etcd.jetcd.ByteSequence;
import io.etcd.jetcd.impl.AbstractResponse;
/**
* AuthUserAddResponse returned by {@link io.etcd.jetcd.Auth#userAdd(ByteSequence, ByteSequence)} contains a
* AuthUserAddResponse returned by {@link Auth#userAdd(ByteSequence, ByteSequence)} contains a
* header.
*/
public class AuthUserAddResponse extends AbstractResponse<io.etcd.jetcd.api.AuthUserAddResponse> {

View File

@ -16,12 +16,10 @@
package io.etcd.jetcd.auth;
import io.etcd.jetcd.AbstractResponse;
import io.etcd.jetcd.impl.AbstractResponse;
/**
* AuthUserChangePasswordResponse returned by
* {@link io.etcd.jetcd.Auth#userChangePassword(io.etcd.jetcd.ByteSequence.ByteSequence,
* io.etcd.jetcd.ByteSequence.ByteSequence)} contains a header.
* AuthUserChangePasswordResponse
*/
public class AuthUserChangePasswordResponse extends AbstractResponse<io.etcd.jetcd.api.AuthUserChangePasswordResponse> {

View File

@ -16,11 +16,12 @@
package io.etcd.jetcd.auth;
import io.etcd.jetcd.AbstractResponse;
import io.etcd.jetcd.Auth;
import io.etcd.jetcd.ByteSequence;
import io.etcd.jetcd.impl.AbstractResponse;
/**
* AuthUserDeleteResponse returned by {@link io.etcd.jetcd.Auth#userDelete(ByteSequence)} contains a header.
* AuthUserDeleteResponse returned by {@link Auth#userDelete(ByteSequence)} contains a header.
*/
public class AuthUserDeleteResponse extends AbstractResponse<io.etcd.jetcd.api.AuthUserDeleteResponse> {

View File

@ -18,11 +18,12 @@ package io.etcd.jetcd.auth;
import java.util.List;
import io.etcd.jetcd.AbstractResponse;
import io.etcd.jetcd.Auth;
import io.etcd.jetcd.ByteSequence;
import io.etcd.jetcd.impl.AbstractResponse;
/**
* AuthUserGetResponse returned by {@link io.etcd.jetcd.Auth#userGet(ByteSequence)} contains a header and
* AuthUserGetResponse returned by {@link Auth#userGet(ByteSequence)} contains a header and
* a list of roles associated with the user.
*/
public class AuthUserGetResponse extends AbstractResponse<io.etcd.jetcd.api.AuthUserGetResponse> {
@ -32,7 +33,9 @@ public class AuthUserGetResponse extends AbstractResponse<io.etcd.jetcd.api.Auth
}
/**
* @return a list of roles.
* Returns a list of roles.
*
* @return the roles.
*/
public List<String> getRoles() {
return getResponse().getRolesList();

View File

@ -16,12 +16,10 @@
package io.etcd.jetcd.auth;
import io.etcd.jetcd.AbstractResponse;
import io.etcd.jetcd.impl.AbstractResponse;
/**
* AuthUserGrantRoleResponse returned by
* {@link io.etcd.jetcd.Auth#userGrantRole(io.etcd.jetcd.ByteSequence.ByteSequence,
* io.etcd.jetcd.ByteSequence.ByteSequence)} contains a header.
* AuthUserGrantRoleResponse
*/
public class AuthUserGrantRoleResponse extends AbstractResponse<io.etcd.jetcd.api.AuthUserGrantRoleResponse> {

View File

@ -18,10 +18,11 @@ package io.etcd.jetcd.auth;
import java.util.List;
import io.etcd.jetcd.AbstractResponse;
import io.etcd.jetcd.Auth;
import io.etcd.jetcd.impl.AbstractResponse;
/**
* AuthUserListResponse returned by {@link io.etcd.jetcd.Auth#userList()} contains a header and
* AuthUserListResponse returned by {@link Auth#userList()} contains a header and
* a list of users.
*/
public class AuthUserListResponse extends AbstractResponse<io.etcd.jetcd.api.AuthUserListResponse> {
@ -31,7 +32,9 @@ public class AuthUserListResponse extends AbstractResponse<io.etcd.jetcd.api.Aut
}
/**
* @return a list of users.
* Returns a list of users.
*
* @return the users.
*/
public List<String> getUsers() {
return getResponse().getUsersList();

View File

@ -16,11 +16,12 @@
package io.etcd.jetcd.auth;
import io.etcd.jetcd.AbstractResponse;
import io.etcd.jetcd.Auth;
import io.etcd.jetcd.ByteSequence;
import io.etcd.jetcd.impl.AbstractResponse;
/**
* AuthUserRevokeRoleResponse returned by {@link io.etcd.jetcd.Auth#userRevokeRole(ByteSequence, ByteSequence)}
* AuthUserRevokeRoleResponse returned by {@link Auth#userRevokeRole(ByteSequence, ByteSequence)}
* contains a header.
*/
public class AuthUserRevokeRoleResponse extends AbstractResponse<io.etcd.jetcd.api.AuthUserRevokeRoleResponse> {

View File

@ -38,7 +38,9 @@ public class Permission {
}
/**
* @return the type of Permission: READ, WRITE, READWRITE, or UNRECOGNIZED.
* Returns the type of Permission: READ, WRITE, READWRITE, or UNRECOGNIZED.
*
* @return the permission type.
*/
public Type getPermType() {
return permType;

View File

@ -19,7 +19,7 @@ package io.etcd.jetcd.cluster;
import java.net.URI;
import java.util.List;
import io.etcd.jetcd.Util;
import io.etcd.jetcd.support.Util;
public class Member {
@ -30,31 +30,48 @@ public class Member {
}
/**
* @return the member ID for this member.
* Returns the member ID for this member.
*
* @return the id.
*/
public long getId() {
return member.getID();
}
/**
* @return the human-readable name of the member, ff the member is not started, the name will be an empty string.
* Returns the human-readable name of the member, ff the member is not started, the name will be an empty string.
*
* @return the name.
*/
public String getName() {
return member.getName();
}
/**
* @return the list of URLs the member exposes to the cluster for communication.
* Returns the list of URLs the member exposes to the cluster for communication.
*
* @return the peer url
*/
public List<URI> getPeerURIs() {
return Util.toURIs(member.getPeerURLsList());
}
/**
* @return list of URLs the member exposes to clients for communication, if the member is not started, clientURLs will
* be empty.
* Returns list of URLs the member exposes to clients for communication, if the member is not started, clientURLs will
* be empty.
*
* @return the client URIs.
*/
public List<URI> getClientURIs() {
return Util.toURIs(member.getClientURLsList());
}
/**
* Returns if the member is raft learner
*
* @return if the member is raft learner
*/
public boolean isLearner() {
return member.getIsLearner();
}
}

View File

@ -18,10 +18,11 @@ package io.etcd.jetcd.cluster;
import java.util.List;
import io.etcd.jetcd.AbstractResponse;
import io.etcd.jetcd.Cluster;
import io.etcd.jetcd.impl.AbstractResponse;
/**
* MemberAddResponse returned by {@link io.etcd.jetcd.Cluster#addMember(List)}
* MemberAddResponse returned by {@link Cluster#addMember(List, boolean)}
* contains a header, added member, and list of members after adding the new member.
*/
public class MemberAddResponse extends AbstractResponse<io.etcd.jetcd.api.MemberAddResponse> {
@ -35,14 +36,18 @@ public class MemberAddResponse extends AbstractResponse<io.etcd.jetcd.api.Member
}
/**
* @return the member information for the added member.
* Returns the member information for the added member.
*
* @return the member information.
*/
public Member getMember() {
return member;
}
/**
* @return a list of all members after adding the new member.
* Returns a list of all members after adding the new member.
*
* @return the list of members.
*/
public synchronized List<Member> getMembers() {
if (members == null) {

View File

@ -18,8 +18,8 @@ package io.etcd.jetcd.cluster;
import java.util.List;
import io.etcd.jetcd.AbstractResponse;
import io.etcd.jetcd.Cluster;
import io.etcd.jetcd.impl.AbstractResponse;
/**
* MemberListResponse returned by {@link Cluster#listMember()}
@ -34,7 +34,9 @@ public class MemberListResponse extends AbstractResponse<io.etcd.jetcd.api.Membe
}
/**
* @return a list of members. empty list if none.
* Returns a list of members. empty list if none.
*
* @return the list of members.
*/
public synchronized List<Member> getMembers() {
if (members == null) {

View File

@ -18,10 +18,11 @@ package io.etcd.jetcd.cluster;
import java.util.List;
import io.etcd.jetcd.AbstractResponse;
import io.etcd.jetcd.Cluster;
import io.etcd.jetcd.impl.AbstractResponse;
/**
* MemberRemoveResponse returned by {@link io.etcd.jetcd.Cluster#removeMember(long)}
* MemberRemoveResponse returned by {@link Cluster#removeMember(long)}
* contains a header and a list of member the removal of the member.
*/
public class MemberRemoveResponse extends AbstractResponse<io.etcd.jetcd.api.MemberRemoveResponse> {
@ -33,7 +34,9 @@ public class MemberRemoveResponse extends AbstractResponse<io.etcd.jetcd.api.Mem
}
/**
* @return a list of all members after removing the member.
* Returns a list of all members after removing the member.
*
* @return the list of members.
*/
public synchronized List<Member> getMembers() {
if (members == null) {

View File

@ -18,10 +18,11 @@ package io.etcd.jetcd.cluster;
import java.util.List;
import io.etcd.jetcd.AbstractResponse;
import io.etcd.jetcd.Cluster;
import io.etcd.jetcd.impl.AbstractResponse;
/**
* MemberUpdateResponse returned by {@link io.etcd.jetcd.Cluster#updateMember(long, List)}
* MemberUpdateResponse returned by {@link Cluster#updateMember(long, List)}
* contains a header and a list of members after the member update.
*/
public class MemberUpdateResponse extends AbstractResponse<io.etcd.jetcd.api.MemberUpdateResponse> {
@ -33,7 +34,9 @@ public class MemberUpdateResponse extends AbstractResponse<io.etcd.jetcd.api.Mem
}
/**
* @return a list of all members after updating the member.
* Return a list of all members after updating the member.
*
* @return the list of members.
*/
public synchronized List<Member> getMembers() {
if (members == null) {

View File

@ -22,7 +22,9 @@ import java.util.stream.Collectors;
/**
* Util class for Cluster models.
*/
public class Util {
final class Util {
private Util() {
}
/**
* Converts a list of API member to a List of client side member.

View File

@ -16,22 +16,26 @@
package io.etcd.jetcd.election;
import io.etcd.jetcd.AbstractResponse;
import io.etcd.jetcd.ByteSequence;
import io.etcd.jetcd.impl.AbstractResponse;
public class CampaignResponse extends AbstractResponse<io.etcd.jetcd.api.CampaignResponse> {
private final LeaderKey leaderKey;
public CampaignResponse(io.etcd.jetcd.api.CampaignResponse response) {
super(response, response.getHeader());
this.leaderKey = toLeaderKey(getResponse().getLeader());
}
private static LeaderKey toLeaderKey(io.etcd.jetcd.api.LeaderKey leader) {
return new LeaderKey(leader.getName(), leader.getKey(), leader.getRev(), leader.getLease());
this.leaderKey = new LeaderKey(
ByteSequence.from(getResponse().getLeader().getName()),
ByteSequence.from(getResponse().getLeader().getKey()),
getResponse().getLeader().getRev(),
getResponse().getLeader().getLease());
}
/**
* @return the resources used for holding leadership of the election.
* Returns the resources used for holding leadership of the election.
*
* @return the leader.
*/
public LeaderKey getLeader() {
return leaderKey;

View File

@ -16,15 +16,15 @@
package io.etcd.jetcd.election;
import com.google.protobuf.ByteString;
import io.etcd.jetcd.ByteSequence;
public class LeaderKey {
private final ByteString name;
private final ByteString key;
private final ByteSequence name;
private final ByteSequence key;
private final long revision;
private final long lease;
public LeaderKey(ByteString name, ByteString key, long revision, long lease) {
public LeaderKey(ByteSequence name, ByteSequence key, long revision, long lease) {
this.name = name;
this.key = key;
this.revision = revision;
@ -32,31 +32,39 @@ public class LeaderKey {
}
/**
* @return the election identifier that corresponds to the leadership key. *
* Returns the election identifier that corresponds to the leadership key.
*
* @return the name.
*/
public ByteString getName() {
public ByteSequence getName() {
return name;
}
/**
* @return the opaque key representing the ownership of the election. If the key
* is deleted, then leadership is lost.
* Returns the opaque key representing the ownership of the election. If the key
* is deleted, then leadership is lost.
*
* @return the key.
*/
public ByteString getKey() {
public ByteSequence getKey() {
return key;
}
/**
* @return the creation revision of the key. It can be used to test for ownership
* of an election during transactions by testing the key's creation revision
* matches rev.
* Returns the creation revision of the key. It can be used to test for ownership
* of an election during transactions by testing the key's creation revision
* matches rev.
*
* @return the revision.
*/
public long getRevision() {
return revision;
}
/**
* @return the lease ID of the election leader.
* Returns the lease ID of the election leader.
*
* @return the lese id.
*/
public long getLease() {
return lease;

View File

@ -16,9 +16,9 @@
package io.etcd.jetcd.election;
import io.etcd.jetcd.AbstractResponse;
import io.etcd.jetcd.ByteSequence;
import io.etcd.jetcd.KeyValue;
import io.etcd.jetcd.impl.AbstractResponse;
public class LeaderResponse extends AbstractResponse<io.etcd.jetcd.api.LeaderResponse> {
private final KeyValue kv;
@ -29,7 +29,9 @@ public class LeaderResponse extends AbstractResponse<io.etcd.jetcd.api.LeaderRes
}
/**
* @return the key-value pair representing the latest leader update.
* Returns the key-value pair representing the latest leader update.
*
* @return the kv.
*/
public KeyValue getKv() {
return kv;

View File

@ -20,5 +20,4 @@ package io.etcd.jetcd.election;
* Signals that leader for given election does not exist.
*/
public class NoLeaderException extends RuntimeException {
public static final NoLeaderException INSTANCE = new NoLeaderException();
}

Some files were not shown because too many files have changed in this diff Show More