• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

spiffe / java-spiffe / 42107955719

05 Nov 2026 08:56PM UTC coverage: 88.291% (+0.5%) from 87.833%
42107955719

push

github

maxlambrecht
feat(workloadapi): allow a custom retry executor in ClientOptions

DefaultWorkloadApiClient.newClient always created its own
Executors.newSingleThreadScheduledExecutor() to schedule reconnection
retries for the X.509 context, X.509 bundles and JWT bundles watches.
Callers could already supply the executor used by the gRPC stubs and
channel through ClientOptions, but had no way to control the retry
executor, for example to use daemon threads, named threads, or an
executor shared with the rest of the application.

Add a retryExecutorService option to ClientOptions, with a matching
builder method, getter and four-argument constructor. When it is not
set, the client keeps creating a single-thread scheduled executor as
before. Like the executorService option, the provided executor is shut
down when the client is closed. The existing three-argument constructor
is kept and delegates to the new one, so the change is binary
compatible. equals, hashCode and toString include the new field.

DefaultX509Source and the JWT sources already accept a preconfigured
WorkloadApiClient through their options, so a client built with these
ClientOptions can be passed to them.

Fixes #79

Signed-off-by: NopeCharon <115794254+NopeCharon@users.noreply.github.com>

516 of 661 branches covered (78.06%)

Branch coverage included in aggregate %.

1912 of 2089 relevant lines covered (91.53%)

3.62 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

95.34
/io/spiffe/workloadapi/DefaultWorkloadApiClient.java


Source Not Available

The file "io/spiffe/workloadapi/DefaultWorkloadApiClient.java" isn't available on github. Either it's been removed, or the repo root directory needs to be updated.

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc