mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-09-15 22:10:26 +00:00
Routing: Export HealthCheckSettings (#6680)
This commit is contained in:
@@ -23,7 +23,7 @@ func (o *ObservatoryConfig) Build() (proto.Message, error) {
|
|||||||
type BurstObservatoryConfig struct {
|
type BurstObservatoryConfig struct {
|
||||||
SubjectSelector []string `json:"subjectSelector"`
|
SubjectSelector []string `json:"subjectSelector"`
|
||||||
// health check settings
|
// health check settings
|
||||||
HealthCheck *healthCheckSettings `json:"pingConfig,omitempty"`
|
HealthCheck *HealthCheckSettings `json:"pingConfig,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b BurstObservatoryConfig) Build() (proto.Message, error) {
|
func (b BurstObservatoryConfig) Build() (proto.Message, error) {
|
||||||
|
|||||||
@@ -43,8 +43,8 @@ type strategyLeastLoadConfig struct {
|
|||||||
Tolerance float64 `json:"tolerance,omitempty"`
|
Tolerance float64 `json:"tolerance,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// healthCheckSettings holds settings for health Checker
|
// HealthCheckSettings holds settings for health Checker
|
||||||
type healthCheckSettings struct {
|
type HealthCheckSettings struct {
|
||||||
Destination string `json:"destination"`
|
Destination string `json:"destination"`
|
||||||
Connectivity string `json:"connectivity"`
|
Connectivity string `json:"connectivity"`
|
||||||
Interval duration.Duration `json:"interval"`
|
Interval duration.Duration `json:"interval"`
|
||||||
@@ -53,7 +53,7 @@ type healthCheckSettings struct {
|
|||||||
HttpMethod string `json:"httpMethod"`
|
HttpMethod string `json:"httpMethod"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h healthCheckSettings) Build() (proto.Message, error) {
|
func (h HealthCheckSettings) Build() (proto.Message, error) {
|
||||||
var httpMethod string
|
var httpMethod string
|
||||||
if h.HttpMethod == "" {
|
if h.HttpMethod == "" {
|
||||||
httpMethod = "HEAD"
|
httpMethod = "HEAD"
|
||||||
|
|||||||
Reference in New Issue
Block a user