Skip to content

SDK: Expose public method for post-creation platform health/connectivity check #3370

@ryanulit

Description

@ryanulit

Background

The Go SDK currently supports platform connectivity validation only at client creation time via sdk.WithConnectionValidation(). This calls the internal (unexported) validateHealthyPlatformConnection function, which uses the gRPC health check protocol (grpc.health.v1.Health/Check).

Problem

Consumers like Data Harbor need to validate platform connectivity after SDK creation — specifically for use in Kubernetes readiness probes. Today the only option is to validate during sdk.New(), which means a connectivity failure surfaces as a fatal error in main.go rather than a recoverable readiness check failure.

Proposed Changes Options

  1. Expose a public ValidateConnection() method on SDK — surfaces the same logic currently used by WithConnectionValidation() so it can be called on-demand after client creation.
  2. Expose the health client — make the health client (currently internal, created here) accessible so consumers can use it directly for custom health check flows.

Use case

A downstream service (e.g. Data Harbor) creates the SDK instance once at startup, then uses the exposed health check in its K8s readiness probe to report whether the platform is reachable — allowing the pod to go not-ready and stop receiving traffic rather than crashing outright.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions