github.com/v2fly/v2ray-core/v4@v4.45.2/infra/conf/observatory.go (about) 1 package conf 2 3 import ( 4 "github.com/golang/protobuf/proto" 5 6 "github.com/v2fly/v2ray-core/v4/app/observatory" 7 "github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/duration" 8 ) 9 10 type ObservatoryConfig struct { 11 SubjectSelector []string `json:"subjectSelector"` 12 ProbeURL string `json:"probeURL"` 13 ProbeInterval duration.Duration `json:"probeInterval"` 14 } 15 16 func (o *ObservatoryConfig) Build() (proto.Message, error) { 17 return &observatory.Config{SubjectSelector: o.SubjectSelector, ProbeUrl: o.ProbeURL, ProbeInterval: int64(o.ProbeInterval)}, nil 18 }