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