Documentation ¶
Index ¶
- type Config
- type Detector
- func (g *Detector) Destroy() error
- func (g *Detector) DetectInstance(ins model.Instance) (result healthcheck.DetectResult, err error)
- func (g *Detector) Init(ctx *plugin.InitContext) (err error)
- func (g *Detector) IsEnable(cfg config.Configuration) bool
- func (g *Detector) Name() string
- func (g *Detector) Type() common.Type
- type ExpectedStatus
- type RequestHeader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Path HTTP请求的pattern 如/health Path string `yaml:"path" json:"path"` // Host host to add into the health check request header Host string `yaml:"host" json:"host"` // RequestHeadersToAdd headers to add into the health check request header RequestHeadersToAdd []*RequestHeader `yaml:"requestHeadersToAdd" json:"requestHeadersToAdd"` // ExpectedStatuses expected status define the status range to verify http codes ExpectedStatuses []*ExpectedStatus `yaml:"expectedStatuses" json:"expectedStatuses"` }
Config 健康探测的配置
type Detector ¶
type Detector struct { *plugin.PluginBase // contains filtered or unexported fields }
Detector TCP协议的实例健康探测器
func (*Detector) DetectInstance ¶
func (g *Detector) DetectInstance(ins model.Instance) (result healthcheck.DetectResult, err error)
DetectInstance 探测服务实例健康
type ExpectedStatus ¶
type ExpectedStatus struct { Start int `yaml:"start" json:"start"` End int `yaml:"end" json:"end"` }
ExpectedStatus status verifier to decide healthy
type RequestHeader ¶
type RequestHeader struct { Key string `yaml:"key" json:"key"` Value string `yaml:"value" json:"value"` }
RequestHeader request header key and value
Click to show internal directories.
Click to hide internal directories.