mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-12-29 08:59:48 +00:00
19 lines
675 B
Go
19 lines
675 B
Go
package conf
|
|
|
|
import (
|
|
"github.com/xtls/xray-core/app/observatory"
|
|
"github.com/xtls/xray-core/infra/conf/cfgcommon/duration"
|
|
"google.golang.org/protobuf/proto"
|
|
)
|
|
|
|
type ObservatoryConfig struct {
|
|
SubjectSelector []string `json:"subjectSelector"`
|
|
ProbeURL string `json:"probeURL"`
|
|
ProbeInterval duration.Duration `json:"probeInterval"`
|
|
EnableConcurrency bool `json:"enableConcurrency"`
|
|
}
|
|
|
|
func (o *ObservatoryConfig) Build() (proto.Message, error) {
|
|
return &observatory.Config{SubjectSelector: o.SubjectSelector, ProbeUrl: o.ProbeURL, ProbeInterval: int64(o.ProbeInterval), EnableConcurrency: o.EnableConcurrency}, nil
|
|
}
|