Interface HealthCheckService

All Superinterfaces:
org.hyperledger.besu.plugin.services.BesuService

public interface HealthCheckService extends org.hyperledger.besu.plugin.services.BesuService
This service lets plugins provide custom implementations for Besu's built-in health check endpoints. Registering a provider for /liveness or /readiness overrides that endpoint's default implementation.
  • Method Details

    • registerHealthCheck

      void registerHealthCheck(String endpoint, HealthCheckService.HealthCheckProvider provider)
      Registers a health check provider for one of the built-in endpoints, overriding its default implementation. The supported endpoints are /liveness and /readiness.
      Parameters:
      endpoint - the built-in endpoint path to override (/liveness or /readiness)
      provider - the health check provider that evaluates health status
    • unregisterHealthCheck

      void unregisterHealthCheck(String endpoint)
      Unregisters a health check provider for a specific endpoint.
      Parameters:
      endpoint - the health check endpoint path to unregister
    • getHealthCheck

      Gets the health check provider registered for a specific endpoint.
      Parameters:
      endpoint - the health check endpoint path
      Returns:
      an optional containing the provider if registered, or empty if not
    • getLivenessCheck

      default Optional<HealthCheckService.HealthCheckProvider> getLivenessCheck()
      Gets the liveness health check provider if registered.
      Returns:
      an optional containing the liveness provider if registered
    • getReadinessCheck

      default Optional<HealthCheckService.HealthCheckProvider> getReadinessCheck()
      Gets the readiness health check provider if registered.
      Returns:
      an optional containing the readiness provider if registered