health

package
v0.0.0-...-21df278 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HealthChecker

type HealthChecker struct {
	// contains filtered or unexported fields
}

func New

func New() *HealthChecker

func (*HealthChecker) CheckGRPCServices

func (h *HealthChecker) CheckGRPCServices(ctx context.Context, services map[string]*ServiceHealth)

CheckGRPCServices checks the health of each grpc service

func (*HealthChecker) Init

func (h *HealthChecker) Init() error

func (*HealthChecker) QueryServices

func (h *HealthChecker) QueryServices(ctx context.Context) (map[string]*ServiceHealth, error)

QueryServices returns a list of services and their addresses for use in looking up their health via grpc health check

type ServiceHealth

type ServiceHealth struct {
	Name   string `json:"service"`
	Addr   string `json:"address"`
	Status string `json:"status"`
}

Jump to

Keyboard shortcuts

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