2021-04-08 17:20:30 -04:00
|
|
|
package conf
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/golang/protobuf/proto"
|
2021-05-03 22:15:11 -04:00
|
|
|
|
2021-04-08 17:20:30 -04:00
|
|
|
"github.com/v2fly/v2ray-core/v4/app/observatory"
|
|
|
|
)
|
|
|
|
|
|
|
|
type ObservatoryConfig struct {
|
|
|
|
SubjectSelector []string `json:"subjectSelector"`
|
2021-06-30 12:47:29 -04:00
|
|
|
ProbeURL string `json:"probeURL"`
|
2021-04-08 17:20:30 -04:00
|
|
|
}
|
|
|
|
|
2021-05-01 10:28:23 -04:00
|
|
|
func (o *ObservatoryConfig) Build() (proto.Message, error) {
|
2021-06-30 12:47:29 -04:00
|
|
|
return &observatory.Config{SubjectSelector: o.SubjectSelector, ProbeUrl: o.ProbeURL}, nil
|
2021-04-08 17:20:30 -04:00
|
|
|
}
|