compositechecker

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checker

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

Checker 复合应用检查器

func NewChecker

func NewChecker() *Checker

NewChecker 新建复合应用检查器

func (*Checker) AddChecker

func (c *Checker) AddChecker(name string, checker health.Checker) *Checker

AddChecker 添加一个应用检查器(切记 name 不能重复)

func (*Checker) AddInfo

func (c *Checker) AddInfo(key string, value any) *Checker

AddInfo 添加健康键值信息

func (*Checker) Check

func (c *Checker) Check(ctx context.Context) health.Health

Check 检查所有应用健康情况,当某个应用健康情况不为 Up,则复合应用健康情况为 Down

func (*Checker) CheckByName

func (c *Checker) CheckByName(ctx context.Context, name string) health.Health

CheckByName 检查指定应用健康情况,当找不到该应用时,应用健康情况为 Unknown

Jump to

Keyboard shortcuts

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