Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DatastoreChecker ¶
type DatastoreChecker interface { // ReadyState returns whether the datastore is ready to be used. ReadyState(ctx context.Context) (datastore.ReadyState, error) }
DatastoreChecker is an interface for determining if the datastore is ready for traffic.
type Manager ¶
type Manager interface { // RegisterReportedService registers the name of service under the same server // for whom the health is being managed by this manager. RegisterReportedService(serviceName string) // HealthSvc is the health service this manager is managing. HealthSvc() *grpcutil.AuthlessHealthServer // Checker returns a function that can be run via an errgroup to perform the health checks. Checker(ctx context.Context) func() error }
Manager is a system which manages the health service statuses.
func NewHealthManager ¶
func NewHealthManager(dispatcher dispatch.Dispatcher, dsc DatastoreChecker) Manager
NewHealthManager creates and returns a new health manager that checks the IsReady status of the given dispatcher and datastore checker and sets the health check to return healthy once both have gone to true.
Click to show internal directories.
Click to hide internal directories.