config.pb.go 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.36.11
  4. // protoc v6.33.5
  5. // source: app/observatory/config.proto
  6. package observatory
  7. import (
  8. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  9. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  10. reflect "reflect"
  11. sync "sync"
  12. unsafe "unsafe"
  13. )
  14. const (
  15. // Verify that this generated code is sufficiently up-to-date.
  16. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  17. // Verify that runtime/protoimpl is sufficiently up-to-date.
  18. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  19. )
  20. type ObservationResult struct {
  21. state protoimpl.MessageState `protogen:"open.v1"`
  22. Status []*OutboundStatus `protobuf:"bytes,1,rep,name=status,proto3" json:"status,omitempty"`
  23. unknownFields protoimpl.UnknownFields
  24. sizeCache protoimpl.SizeCache
  25. }
  26. func (x *ObservationResult) Reset() {
  27. *x = ObservationResult{}
  28. mi := &file_app_observatory_config_proto_msgTypes[0]
  29. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  30. ms.StoreMessageInfo(mi)
  31. }
  32. func (x *ObservationResult) String() string {
  33. return protoimpl.X.MessageStringOf(x)
  34. }
  35. func (*ObservationResult) ProtoMessage() {}
  36. func (x *ObservationResult) ProtoReflect() protoreflect.Message {
  37. mi := &file_app_observatory_config_proto_msgTypes[0]
  38. if x != nil {
  39. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  40. if ms.LoadMessageInfo() == nil {
  41. ms.StoreMessageInfo(mi)
  42. }
  43. return ms
  44. }
  45. return mi.MessageOf(x)
  46. }
  47. // Deprecated: Use ObservationResult.ProtoReflect.Descriptor instead.
  48. func (*ObservationResult) Descriptor() ([]byte, []int) {
  49. return file_app_observatory_config_proto_rawDescGZIP(), []int{0}
  50. }
  51. func (x *ObservationResult) GetStatus() []*OutboundStatus {
  52. if x != nil {
  53. return x.Status
  54. }
  55. return nil
  56. }
  57. type HealthPingMeasurementResult struct {
  58. state protoimpl.MessageState `protogen:"open.v1"`
  59. All int64 `protobuf:"varint,1,opt,name=all,proto3" json:"all,omitempty"`
  60. Fail int64 `protobuf:"varint,2,opt,name=fail,proto3" json:"fail,omitempty"`
  61. Deviation int64 `protobuf:"varint,3,opt,name=deviation,proto3" json:"deviation,omitempty"`
  62. Average int64 `protobuf:"varint,4,opt,name=average,proto3" json:"average,omitempty"`
  63. Max int64 `protobuf:"varint,5,opt,name=max,proto3" json:"max,omitempty"`
  64. Min int64 `protobuf:"varint,6,opt,name=min,proto3" json:"min,omitempty"`
  65. unknownFields protoimpl.UnknownFields
  66. sizeCache protoimpl.SizeCache
  67. }
  68. func (x *HealthPingMeasurementResult) Reset() {
  69. *x = HealthPingMeasurementResult{}
  70. mi := &file_app_observatory_config_proto_msgTypes[1]
  71. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  72. ms.StoreMessageInfo(mi)
  73. }
  74. func (x *HealthPingMeasurementResult) String() string {
  75. return protoimpl.X.MessageStringOf(x)
  76. }
  77. func (*HealthPingMeasurementResult) ProtoMessage() {}
  78. func (x *HealthPingMeasurementResult) ProtoReflect() protoreflect.Message {
  79. mi := &file_app_observatory_config_proto_msgTypes[1]
  80. if x != nil {
  81. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  82. if ms.LoadMessageInfo() == nil {
  83. ms.StoreMessageInfo(mi)
  84. }
  85. return ms
  86. }
  87. return mi.MessageOf(x)
  88. }
  89. // Deprecated: Use HealthPingMeasurementResult.ProtoReflect.Descriptor instead.
  90. func (*HealthPingMeasurementResult) Descriptor() ([]byte, []int) {
  91. return file_app_observatory_config_proto_rawDescGZIP(), []int{1}
  92. }
  93. func (x *HealthPingMeasurementResult) GetAll() int64 {
  94. if x != nil {
  95. return x.All
  96. }
  97. return 0
  98. }
  99. func (x *HealthPingMeasurementResult) GetFail() int64 {
  100. if x != nil {
  101. return x.Fail
  102. }
  103. return 0
  104. }
  105. func (x *HealthPingMeasurementResult) GetDeviation() int64 {
  106. if x != nil {
  107. return x.Deviation
  108. }
  109. return 0
  110. }
  111. func (x *HealthPingMeasurementResult) GetAverage() int64 {
  112. if x != nil {
  113. return x.Average
  114. }
  115. return 0
  116. }
  117. func (x *HealthPingMeasurementResult) GetMax() int64 {
  118. if x != nil {
  119. return x.Max
  120. }
  121. return 0
  122. }
  123. func (x *HealthPingMeasurementResult) GetMin() int64 {
  124. if x != nil {
  125. return x.Min
  126. }
  127. return 0
  128. }
  129. type OutboundStatus struct {
  130. state protoimpl.MessageState `protogen:"open.v1"`
  131. // @Document Whether this outbound is usable
  132. // @Restriction ReadOnlyForUser
  133. Alive bool `protobuf:"varint,1,opt,name=alive,proto3" json:"alive,omitempty"`
  134. // @Document The time for probe request to finish.
  135. // @Type time.ms
  136. // @Restriction ReadOnlyForUser
  137. Delay int64 `protobuf:"varint,2,opt,name=delay,proto3" json:"delay,omitempty"`
  138. // @Document The last error caused this outbound failed to relay probe request
  139. // @Restriction NotMachineReadable
  140. LastErrorReason string `protobuf:"bytes,3,opt,name=last_error_reason,json=lastErrorReason,proto3" json:"last_error_reason,omitempty"`
  141. // @Document The outbound tag for this Server
  142. // @Type id.outboundTag
  143. OutboundTag string `protobuf:"bytes,4,opt,name=outbound_tag,json=outboundTag,proto3" json:"outbound_tag,omitempty"`
  144. // @Document The time this outbound is known to be alive
  145. // @Type id.outboundTag
  146. LastSeenTime int64 `protobuf:"varint,5,opt,name=last_seen_time,json=lastSeenTime,proto3" json:"last_seen_time,omitempty"`
  147. // @Document The time this outbound is tried
  148. // @Type id.outboundTag
  149. LastTryTime int64 `protobuf:"varint,6,opt,name=last_try_time,json=lastTryTime,proto3" json:"last_try_time,omitempty"`
  150. HealthPing *HealthPingMeasurementResult `protobuf:"bytes,7,opt,name=health_ping,json=healthPing,proto3" json:"health_ping,omitempty"`
  151. unknownFields protoimpl.UnknownFields
  152. sizeCache protoimpl.SizeCache
  153. }
  154. func (x *OutboundStatus) Reset() {
  155. *x = OutboundStatus{}
  156. mi := &file_app_observatory_config_proto_msgTypes[2]
  157. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  158. ms.StoreMessageInfo(mi)
  159. }
  160. func (x *OutboundStatus) String() string {
  161. return protoimpl.X.MessageStringOf(x)
  162. }
  163. func (*OutboundStatus) ProtoMessage() {}
  164. func (x *OutboundStatus) ProtoReflect() protoreflect.Message {
  165. mi := &file_app_observatory_config_proto_msgTypes[2]
  166. if x != nil {
  167. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  168. if ms.LoadMessageInfo() == nil {
  169. ms.StoreMessageInfo(mi)
  170. }
  171. return ms
  172. }
  173. return mi.MessageOf(x)
  174. }
  175. // Deprecated: Use OutboundStatus.ProtoReflect.Descriptor instead.
  176. func (*OutboundStatus) Descriptor() ([]byte, []int) {
  177. return file_app_observatory_config_proto_rawDescGZIP(), []int{2}
  178. }
  179. func (x *OutboundStatus) GetAlive() bool {
  180. if x != nil {
  181. return x.Alive
  182. }
  183. return false
  184. }
  185. func (x *OutboundStatus) GetDelay() int64 {
  186. if x != nil {
  187. return x.Delay
  188. }
  189. return 0
  190. }
  191. func (x *OutboundStatus) GetLastErrorReason() string {
  192. if x != nil {
  193. return x.LastErrorReason
  194. }
  195. return ""
  196. }
  197. func (x *OutboundStatus) GetOutboundTag() string {
  198. if x != nil {
  199. return x.OutboundTag
  200. }
  201. return ""
  202. }
  203. func (x *OutboundStatus) GetLastSeenTime() int64 {
  204. if x != nil {
  205. return x.LastSeenTime
  206. }
  207. return 0
  208. }
  209. func (x *OutboundStatus) GetLastTryTime() int64 {
  210. if x != nil {
  211. return x.LastTryTime
  212. }
  213. return 0
  214. }
  215. func (x *OutboundStatus) GetHealthPing() *HealthPingMeasurementResult {
  216. if x != nil {
  217. return x.HealthPing
  218. }
  219. return nil
  220. }
  221. type ProbeResult struct {
  222. state protoimpl.MessageState `protogen:"open.v1"`
  223. // @Document Whether this outbound is usable
  224. // @Restriction ReadOnlyForUser
  225. Alive bool `protobuf:"varint,1,opt,name=alive,proto3" json:"alive,omitempty"`
  226. // @Document The time for probe request to finish.
  227. // @Type time.ms
  228. // @Restriction ReadOnlyForUser
  229. Delay int64 `protobuf:"varint,2,opt,name=delay,proto3" json:"delay,omitempty"`
  230. // @Document The error caused this outbound failed to relay probe request
  231. // @Restriction NotMachineReadable
  232. LastErrorReason string `protobuf:"bytes,3,opt,name=last_error_reason,json=lastErrorReason,proto3" json:"last_error_reason,omitempty"`
  233. unknownFields protoimpl.UnknownFields
  234. sizeCache protoimpl.SizeCache
  235. }
  236. func (x *ProbeResult) Reset() {
  237. *x = ProbeResult{}
  238. mi := &file_app_observatory_config_proto_msgTypes[3]
  239. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  240. ms.StoreMessageInfo(mi)
  241. }
  242. func (x *ProbeResult) String() string {
  243. return protoimpl.X.MessageStringOf(x)
  244. }
  245. func (*ProbeResult) ProtoMessage() {}
  246. func (x *ProbeResult) ProtoReflect() protoreflect.Message {
  247. mi := &file_app_observatory_config_proto_msgTypes[3]
  248. if x != nil {
  249. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  250. if ms.LoadMessageInfo() == nil {
  251. ms.StoreMessageInfo(mi)
  252. }
  253. return ms
  254. }
  255. return mi.MessageOf(x)
  256. }
  257. // Deprecated: Use ProbeResult.ProtoReflect.Descriptor instead.
  258. func (*ProbeResult) Descriptor() ([]byte, []int) {
  259. return file_app_observatory_config_proto_rawDescGZIP(), []int{3}
  260. }
  261. func (x *ProbeResult) GetAlive() bool {
  262. if x != nil {
  263. return x.Alive
  264. }
  265. return false
  266. }
  267. func (x *ProbeResult) GetDelay() int64 {
  268. if x != nil {
  269. return x.Delay
  270. }
  271. return 0
  272. }
  273. func (x *ProbeResult) GetLastErrorReason() string {
  274. if x != nil {
  275. return x.LastErrorReason
  276. }
  277. return ""
  278. }
  279. type Intensity struct {
  280. state protoimpl.MessageState `protogen:"open.v1"`
  281. // @Document The time interval for a probe request in ms.
  282. // @Type time.ms
  283. ProbeInterval uint32 `protobuf:"varint,1,opt,name=probe_interval,json=probeInterval,proto3" json:"probe_interval,omitempty"`
  284. unknownFields protoimpl.UnknownFields
  285. sizeCache protoimpl.SizeCache
  286. }
  287. func (x *Intensity) Reset() {
  288. *x = Intensity{}
  289. mi := &file_app_observatory_config_proto_msgTypes[4]
  290. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  291. ms.StoreMessageInfo(mi)
  292. }
  293. func (x *Intensity) String() string {
  294. return protoimpl.X.MessageStringOf(x)
  295. }
  296. func (*Intensity) ProtoMessage() {}
  297. func (x *Intensity) ProtoReflect() protoreflect.Message {
  298. mi := &file_app_observatory_config_proto_msgTypes[4]
  299. if x != nil {
  300. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  301. if ms.LoadMessageInfo() == nil {
  302. ms.StoreMessageInfo(mi)
  303. }
  304. return ms
  305. }
  306. return mi.MessageOf(x)
  307. }
  308. // Deprecated: Use Intensity.ProtoReflect.Descriptor instead.
  309. func (*Intensity) Descriptor() ([]byte, []int) {
  310. return file_app_observatory_config_proto_rawDescGZIP(), []int{4}
  311. }
  312. func (x *Intensity) GetProbeInterval() uint32 {
  313. if x != nil {
  314. return x.ProbeInterval
  315. }
  316. return 0
  317. }
  318. type Config struct {
  319. state protoimpl.MessageState `protogen:"open.v1"`
  320. // @Document The selectors for outbound under observation
  321. SubjectSelector []string `protobuf:"bytes,2,rep,name=subject_selector,json=subjectSelector,proto3" json:"subject_selector,omitempty"`
  322. ProbeUrl string `protobuf:"bytes,3,opt,name=probe_url,json=probeUrl,proto3" json:"probe_url,omitempty"`
  323. ProbeInterval int64 `protobuf:"varint,4,opt,name=probe_interval,json=probeInterval,proto3" json:"probe_interval,omitempty"`
  324. EnableConcurrency bool `protobuf:"varint,5,opt,name=enable_concurrency,json=enableConcurrency,proto3" json:"enable_concurrency,omitempty"`
  325. unknownFields protoimpl.UnknownFields
  326. sizeCache protoimpl.SizeCache
  327. }
  328. func (x *Config) Reset() {
  329. *x = Config{}
  330. mi := &file_app_observatory_config_proto_msgTypes[5]
  331. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  332. ms.StoreMessageInfo(mi)
  333. }
  334. func (x *Config) String() string {
  335. return protoimpl.X.MessageStringOf(x)
  336. }
  337. func (*Config) ProtoMessage() {}
  338. func (x *Config) ProtoReflect() protoreflect.Message {
  339. mi := &file_app_observatory_config_proto_msgTypes[5]
  340. if x != nil {
  341. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  342. if ms.LoadMessageInfo() == nil {
  343. ms.StoreMessageInfo(mi)
  344. }
  345. return ms
  346. }
  347. return mi.MessageOf(x)
  348. }
  349. // Deprecated: Use Config.ProtoReflect.Descriptor instead.
  350. func (*Config) Descriptor() ([]byte, []int) {
  351. return file_app_observatory_config_proto_rawDescGZIP(), []int{5}
  352. }
  353. func (x *Config) GetSubjectSelector() []string {
  354. if x != nil {
  355. return x.SubjectSelector
  356. }
  357. return nil
  358. }
  359. func (x *Config) GetProbeUrl() string {
  360. if x != nil {
  361. return x.ProbeUrl
  362. }
  363. return ""
  364. }
  365. func (x *Config) GetProbeInterval() int64 {
  366. if x != nil {
  367. return x.ProbeInterval
  368. }
  369. return 0
  370. }
  371. func (x *Config) GetEnableConcurrency() bool {
  372. if x != nil {
  373. return x.EnableConcurrency
  374. }
  375. return false
  376. }
  377. var File_app_observatory_config_proto protoreflect.FileDescriptor
  378. const file_app_observatory_config_proto_rawDesc = "" +
  379. "\n" +
  380. "\x1capp/observatory/config.proto\x12\x19xray.core.app.observatory\"V\n" +
  381. "\x11ObservationResult\x12A\n" +
  382. "\x06status\x18\x01 \x03(\v2).xray.core.app.observatory.OutboundStatusR\x06status\"\x9f\x01\n" +
  383. "\x1bHealthPingMeasurementResult\x12\x10\n" +
  384. "\x03all\x18\x01 \x01(\x03R\x03all\x12\x12\n" +
  385. "\x04fail\x18\x02 \x01(\x03R\x04fail\x12\x1c\n" +
  386. "\tdeviation\x18\x03 \x01(\x03R\tdeviation\x12\x18\n" +
  387. "\aaverage\x18\x04 \x01(\x03R\aaverage\x12\x10\n" +
  388. "\x03max\x18\x05 \x01(\x03R\x03max\x12\x10\n" +
  389. "\x03min\x18\x06 \x01(\x03R\x03min\"\xae\x02\n" +
  390. "\x0eOutboundStatus\x12\x14\n" +
  391. "\x05alive\x18\x01 \x01(\bR\x05alive\x12\x14\n" +
  392. "\x05delay\x18\x02 \x01(\x03R\x05delay\x12*\n" +
  393. "\x11last_error_reason\x18\x03 \x01(\tR\x0flastErrorReason\x12!\n" +
  394. "\foutbound_tag\x18\x04 \x01(\tR\voutboundTag\x12$\n" +
  395. "\x0elast_seen_time\x18\x05 \x01(\x03R\flastSeenTime\x12\"\n" +
  396. "\rlast_try_time\x18\x06 \x01(\x03R\vlastTryTime\x12W\n" +
  397. "\vhealth_ping\x18\a \x01(\v26.xray.core.app.observatory.HealthPingMeasurementResultR\n" +
  398. "healthPing\"e\n" +
  399. "\vProbeResult\x12\x14\n" +
  400. "\x05alive\x18\x01 \x01(\bR\x05alive\x12\x14\n" +
  401. "\x05delay\x18\x02 \x01(\x03R\x05delay\x12*\n" +
  402. "\x11last_error_reason\x18\x03 \x01(\tR\x0flastErrorReason\"2\n" +
  403. "\tIntensity\x12%\n" +
  404. "\x0eprobe_interval\x18\x01 \x01(\rR\rprobeInterval\"\xa6\x01\n" +
  405. "\x06Config\x12)\n" +
  406. "\x10subject_selector\x18\x02 \x03(\tR\x0fsubjectSelector\x12\x1b\n" +
  407. "\tprobe_url\x18\x03 \x01(\tR\bprobeUrl\x12%\n" +
  408. "\x0eprobe_interval\x18\x04 \x01(\x03R\rprobeInterval\x12-\n" +
  409. "\x12enable_concurrency\x18\x05 \x01(\bR\x11enableConcurrencyB^\n" +
  410. "\x18com.xray.app.observatoryP\x01Z)github.com/xtls/xray-core/app/observatory\xaa\x02\x14Xray.App.Observatoryb\x06proto3"
  411. var (
  412. file_app_observatory_config_proto_rawDescOnce sync.Once
  413. file_app_observatory_config_proto_rawDescData []byte
  414. )
  415. func file_app_observatory_config_proto_rawDescGZIP() []byte {
  416. file_app_observatory_config_proto_rawDescOnce.Do(func() {
  417. file_app_observatory_config_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_app_observatory_config_proto_rawDesc), len(file_app_observatory_config_proto_rawDesc)))
  418. })
  419. return file_app_observatory_config_proto_rawDescData
  420. }
  421. var file_app_observatory_config_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
  422. var file_app_observatory_config_proto_goTypes = []any{
  423. (*ObservationResult)(nil), // 0: xray.core.app.observatory.ObservationResult
  424. (*HealthPingMeasurementResult)(nil), // 1: xray.core.app.observatory.HealthPingMeasurementResult
  425. (*OutboundStatus)(nil), // 2: xray.core.app.observatory.OutboundStatus
  426. (*ProbeResult)(nil), // 3: xray.core.app.observatory.ProbeResult
  427. (*Intensity)(nil), // 4: xray.core.app.observatory.Intensity
  428. (*Config)(nil), // 5: xray.core.app.observatory.Config
  429. }
  430. var file_app_observatory_config_proto_depIdxs = []int32{
  431. 2, // 0: xray.core.app.observatory.ObservationResult.status:type_name -> xray.core.app.observatory.OutboundStatus
  432. 1, // 1: xray.core.app.observatory.OutboundStatus.health_ping:type_name -> xray.core.app.observatory.HealthPingMeasurementResult
  433. 2, // [2:2] is the sub-list for method output_type
  434. 2, // [2:2] is the sub-list for method input_type
  435. 2, // [2:2] is the sub-list for extension type_name
  436. 2, // [2:2] is the sub-list for extension extendee
  437. 0, // [0:2] is the sub-list for field type_name
  438. }
  439. func init() { file_app_observatory_config_proto_init() }
  440. func file_app_observatory_config_proto_init() {
  441. if File_app_observatory_config_proto != nil {
  442. return
  443. }
  444. type x struct{}
  445. out := protoimpl.TypeBuilder{
  446. File: protoimpl.DescBuilder{
  447. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  448. RawDescriptor: unsafe.Slice(unsafe.StringData(file_app_observatory_config_proto_rawDesc), len(file_app_observatory_config_proto_rawDesc)),
  449. NumEnums: 0,
  450. NumMessages: 6,
  451. NumExtensions: 0,
  452. NumServices: 0,
  453. },
  454. GoTypes: file_app_observatory_config_proto_goTypes,
  455. DependencyIndexes: file_app_observatory_config_proto_depIdxs,
  456. MessageInfos: file_app_observatory_config_proto_msgTypes,
  457. }.Build()
  458. File_app_observatory_config_proto = out.File
  459. file_app_observatory_config_proto_goTypes = nil
  460. file_app_observatory_config_proto_depIdxs = nil
  461. }