1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-07-05 05:25:23 +00:00
v2fly/infra/conf/observatory.go
2021-07-01 19:02:27 +01:00

20 lines
577 B
Go

package conf
import (
"github.com/golang/protobuf/proto"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/duration"
"github.com/v2fly/v2ray-core/v4/app/observatory"
)
type ObservatoryConfig struct {
SubjectSelector []string `json:"subjectSelector"`
ProbeURL string `json:"probeURL"`
ProbeInterval duration.Duration `json:"ProbeInterval"`
}
func (o *ObservatoryConfig) Build() (proto.Message, error) {
return &observatory.Config{SubjectSelector: o.SubjectSelector, ProbeUrl: o.ProbeURL, ProbeInterval: int64(o.ProbeInterval)}, nil
}