Documentation
¶
Index ¶
- Constants
- type HealthChecker
- type HealthCheckerOption
- func WithBucketCheck(bucket *storage.BucketHandle) HealthCheckerOption
- func WithMetrics() HealthCheckerOption
- func WithName(name string) HealthCheckerOption
- func WithRedisCheck(client healthcheck.IRedisClient, warn bool) HealthCheckerOption
- func WithSpannerCheck(client *spanner.Client) HealthCheckerOption
Constants ¶
View Source
const ( // HTTPLivenessRoute is a standard route to use for our liveness probes. HTTPLivenessRoute = "/healthz/live" // HTTPReadinessRoute is a standard route to use for our readiness probes. HTTPReadinessRoute = "/healthz/ready" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HealthChecker ¶
type HealthChecker interface { http.Handler fmt.Stringer Shutdown(context.Context) error GRPCRegisterService(grpc.ServiceRegistrar) Register(grpc.ServiceRegistrar) // contains filtered or unexported methods }
HealthChecker is an HTTP healthcheck handler that runs checks.
func NewHealthCheck ¶
func NewHealthCheck(opts ...HealthCheckerOption) HealthChecker
NewHealthCheck returns new healthcheck.
type HealthCheckerOption ¶
type HealthCheckerOption interface {
// contains filtered or unexported methods
}
HealthCheckerOption is an option to apply to HealthChecker.
func WithBucketCheck ¶
func WithBucketCheck(bucket *storage.BucketHandle) HealthCheckerOption
WithBucketCheck adds GCS bucket check (tries to read nonexistent test object).
func WithName ¶
func WithName(name string) HealthCheckerOption
WithName allows to change healthcheck name in metrics.
func WithRedisCheck ¶
func WithRedisCheck(client healthcheck.IRedisClient, warn bool) HealthCheckerOption
WithRedisCheck adds Redis check (PING command).
func WithSpannerCheck ¶
func WithSpannerCheck(client *spanner.Client) HealthCheckerOption
WithSpannerCheck adds Spanner check (SELECT 1).
Click to show internal directories.
Click to hide internal directories.