services

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HealthCheck

func HealthCheck(ctx context.Context, deps []Dependency) error

HealthCheck performs a health check on each provided dependency and returns an error on any failures.

Types

type Dependency

type Dependency interface {
	// Name returns the name of the service dependency
	Name() string

	// HealthCheck provides a mechanism for the client to check health of the provider.
	// Should return true if health check is successful, false otherwise.
	HealthCheck(ctx context.Context) (bool, error)
}

Dependency provides a unified interface for a service dependency requiring a health check.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL