health

package
v0.0.0-...-6e78c53 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package health xxx

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrSchemeInValid invalid scheme
	ErrSchemeInValid = errors.New("scheme invalid, should be http/https")
	// ErrHealthConfigNotInited show HealthConfig not inited
	ErrHealthConfigNotInited = errors.New("healthConfig not inited")
)

Functions

This section is empty.

Types

type HealthCheck

type HealthCheck interface {
	IsHTTPAPIHealth(addr string, port uint32) bool
}

HealthCheck is interface for check addr:port health nolint

func NewHealthConfig

func NewHealthConfig(scheme string, path string) (HealthCheck, error)

NewHealthConfig init HealthConfig

type HealthConfig

type HealthConfig struct {
	Shem string
	Path string
}

HealthConfig conf immutable schem/path nolint

func (*HealthConfig) IsHTTPAPIHealth

func (hc *HealthConfig) IsHTTPAPIHealth(addr string, port uint32) bool

IsHTTPAPIHealth for check schem://addr:port/Path health

Jump to

Keyboard shortcuts

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