observatory.go 397 B

12345678910111213141516
  1. package conf
  2. import (
  3. "github.com/golang/protobuf/proto"
  4. "github.com/v2fly/v2ray-core/v4/app/observatory"
  5. )
  6. type ObservatoryConfig struct {
  7. SubjectSelector []string `json:"subjectSelector"`
  8. ProbeURL string `json:"probeURL"`
  9. }
  10. func (o *ObservatoryConfig) Build() (proto.Message, error) {
  11. return &observatory.Config{SubjectSelector: o.SubjectSelector, ProbeUrl: o.ProbeURL}, nil
  12. }