command.pb.go 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414
  1. package command
  2. import (
  3. fmt "fmt"
  4. math "math"
  5. proto "github.com/golang/protobuf/proto"
  6. )
  7. import (
  8. "context"
  9. grpc "google.golang.org/grpc"
  10. )
  11. // Reference imports to suppress errors if they are not otherwise used.
  12. var _ = proto.Marshal
  13. var _ = fmt.Errorf
  14. var _ = math.Inf
  15. // This is a compile-time assertion to ensure that this generated file
  16. // is compatible with the proto package it is being compiled against.
  17. // A compilation error at this line likely means your copy of the
  18. // proto package needs to be updated.
  19. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  20. type GetStatsRequest struct {
  21. // Name of the stat counter.
  22. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  23. // Whether or not to reset the counter to fetching its value.
  24. Reset_ bool `protobuf:"varint,2,opt,name=reset,proto3" json:"reset,omitempty"`
  25. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  26. XXX_unrecognized []byte `json:"-"`
  27. XXX_sizecache int32 `json:"-"`
  28. }
  29. func (m *GetStatsRequest) Reset() { *m = GetStatsRequest{} }
  30. func (m *GetStatsRequest) String() string { return proto.CompactTextString(m) }
  31. func (*GetStatsRequest) ProtoMessage() {}
  32. func (*GetStatsRequest) Descriptor() ([]byte, []int) {
  33. return fileDescriptor_c902411c4948f26b, []int{0}
  34. }
  35. func (m *GetStatsRequest) XXX_Unmarshal(b []byte) error {
  36. return xxx_messageInfo_GetStatsRequest.Unmarshal(m, b)
  37. }
  38. func (m *GetStatsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  39. return xxx_messageInfo_GetStatsRequest.Marshal(b, m, deterministic)
  40. }
  41. func (m *GetStatsRequest) XXX_Merge(src proto.Message) {
  42. xxx_messageInfo_GetStatsRequest.Merge(m, src)
  43. }
  44. func (m *GetStatsRequest) XXX_Size() int {
  45. return xxx_messageInfo_GetStatsRequest.Size(m)
  46. }
  47. func (m *GetStatsRequest) XXX_DiscardUnknown() {
  48. xxx_messageInfo_GetStatsRequest.DiscardUnknown(m)
  49. }
  50. var xxx_messageInfo_GetStatsRequest proto.InternalMessageInfo
  51. func (m *GetStatsRequest) GetName() string {
  52. if m != nil {
  53. return m.Name
  54. }
  55. return ""
  56. }
  57. func (m *GetStatsRequest) GetReset_() bool {
  58. if m != nil {
  59. return m.Reset_
  60. }
  61. return false
  62. }
  63. type Stat struct {
  64. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  65. Value int64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"`
  66. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  67. XXX_unrecognized []byte `json:"-"`
  68. XXX_sizecache int32 `json:"-"`
  69. }
  70. func (m *Stat) Reset() { *m = Stat{} }
  71. func (m *Stat) String() string { return proto.CompactTextString(m) }
  72. func (*Stat) ProtoMessage() {}
  73. func (*Stat) Descriptor() ([]byte, []int) {
  74. return fileDescriptor_c902411c4948f26b, []int{1}
  75. }
  76. func (m *Stat) XXX_Unmarshal(b []byte) error {
  77. return xxx_messageInfo_Stat.Unmarshal(m, b)
  78. }
  79. func (m *Stat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  80. return xxx_messageInfo_Stat.Marshal(b, m, deterministic)
  81. }
  82. func (m *Stat) XXX_Merge(src proto.Message) {
  83. xxx_messageInfo_Stat.Merge(m, src)
  84. }
  85. func (m *Stat) XXX_Size() int {
  86. return xxx_messageInfo_Stat.Size(m)
  87. }
  88. func (m *Stat) XXX_DiscardUnknown() {
  89. xxx_messageInfo_Stat.DiscardUnknown(m)
  90. }
  91. var xxx_messageInfo_Stat proto.InternalMessageInfo
  92. func (m *Stat) GetName() string {
  93. if m != nil {
  94. return m.Name
  95. }
  96. return ""
  97. }
  98. func (m *Stat) GetValue() int64 {
  99. if m != nil {
  100. return m.Value
  101. }
  102. return 0
  103. }
  104. type GetStatsResponse struct {
  105. Stat *Stat `protobuf:"bytes,1,opt,name=stat,proto3" json:"stat,omitempty"`
  106. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  107. XXX_unrecognized []byte `json:"-"`
  108. XXX_sizecache int32 `json:"-"`
  109. }
  110. func (m *GetStatsResponse) Reset() { *m = GetStatsResponse{} }
  111. func (m *GetStatsResponse) String() string { return proto.CompactTextString(m) }
  112. func (*GetStatsResponse) ProtoMessage() {}
  113. func (*GetStatsResponse) Descriptor() ([]byte, []int) {
  114. return fileDescriptor_c902411c4948f26b, []int{2}
  115. }
  116. func (m *GetStatsResponse) XXX_Unmarshal(b []byte) error {
  117. return xxx_messageInfo_GetStatsResponse.Unmarshal(m, b)
  118. }
  119. func (m *GetStatsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  120. return xxx_messageInfo_GetStatsResponse.Marshal(b, m, deterministic)
  121. }
  122. func (m *GetStatsResponse) XXX_Merge(src proto.Message) {
  123. xxx_messageInfo_GetStatsResponse.Merge(m, src)
  124. }
  125. func (m *GetStatsResponse) XXX_Size() int {
  126. return xxx_messageInfo_GetStatsResponse.Size(m)
  127. }
  128. func (m *GetStatsResponse) XXX_DiscardUnknown() {
  129. xxx_messageInfo_GetStatsResponse.DiscardUnknown(m)
  130. }
  131. var xxx_messageInfo_GetStatsResponse proto.InternalMessageInfo
  132. func (m *GetStatsResponse) GetStat() *Stat {
  133. if m != nil {
  134. return m.Stat
  135. }
  136. return nil
  137. }
  138. type QueryStatsRequest struct {
  139. Pattern string `protobuf:"bytes,1,opt,name=pattern,proto3" json:"pattern,omitempty"`
  140. Reset_ bool `protobuf:"varint,2,opt,name=reset,proto3" json:"reset,omitempty"`
  141. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  142. XXX_unrecognized []byte `json:"-"`
  143. XXX_sizecache int32 `json:"-"`
  144. }
  145. func (m *QueryStatsRequest) Reset() { *m = QueryStatsRequest{} }
  146. func (m *QueryStatsRequest) String() string { return proto.CompactTextString(m) }
  147. func (*QueryStatsRequest) ProtoMessage() {}
  148. func (*QueryStatsRequest) Descriptor() ([]byte, []int) {
  149. return fileDescriptor_c902411c4948f26b, []int{3}
  150. }
  151. func (m *QueryStatsRequest) XXX_Unmarshal(b []byte) error {
  152. return xxx_messageInfo_QueryStatsRequest.Unmarshal(m, b)
  153. }
  154. func (m *QueryStatsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  155. return xxx_messageInfo_QueryStatsRequest.Marshal(b, m, deterministic)
  156. }
  157. func (m *QueryStatsRequest) XXX_Merge(src proto.Message) {
  158. xxx_messageInfo_QueryStatsRequest.Merge(m, src)
  159. }
  160. func (m *QueryStatsRequest) XXX_Size() int {
  161. return xxx_messageInfo_QueryStatsRequest.Size(m)
  162. }
  163. func (m *QueryStatsRequest) XXX_DiscardUnknown() {
  164. xxx_messageInfo_QueryStatsRequest.DiscardUnknown(m)
  165. }
  166. var xxx_messageInfo_QueryStatsRequest proto.InternalMessageInfo
  167. func (m *QueryStatsRequest) GetPattern() string {
  168. if m != nil {
  169. return m.Pattern
  170. }
  171. return ""
  172. }
  173. func (m *QueryStatsRequest) GetReset_() bool {
  174. if m != nil {
  175. return m.Reset_
  176. }
  177. return false
  178. }
  179. type QueryStatsResponse struct {
  180. Stat []*Stat `protobuf:"bytes,1,rep,name=stat,proto3" json:"stat,omitempty"`
  181. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  182. XXX_unrecognized []byte `json:"-"`
  183. XXX_sizecache int32 `json:"-"`
  184. }
  185. func (m *QueryStatsResponse) Reset() { *m = QueryStatsResponse{} }
  186. func (m *QueryStatsResponse) String() string { return proto.CompactTextString(m) }
  187. func (*QueryStatsResponse) ProtoMessage() {}
  188. func (*QueryStatsResponse) Descriptor() ([]byte, []int) {
  189. return fileDescriptor_c902411c4948f26b, []int{4}
  190. }
  191. func (m *QueryStatsResponse) XXX_Unmarshal(b []byte) error {
  192. return xxx_messageInfo_QueryStatsResponse.Unmarshal(m, b)
  193. }
  194. func (m *QueryStatsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  195. return xxx_messageInfo_QueryStatsResponse.Marshal(b, m, deterministic)
  196. }
  197. func (m *QueryStatsResponse) XXX_Merge(src proto.Message) {
  198. xxx_messageInfo_QueryStatsResponse.Merge(m, src)
  199. }
  200. func (m *QueryStatsResponse) XXX_Size() int {
  201. return xxx_messageInfo_QueryStatsResponse.Size(m)
  202. }
  203. func (m *QueryStatsResponse) XXX_DiscardUnknown() {
  204. xxx_messageInfo_QueryStatsResponse.DiscardUnknown(m)
  205. }
  206. var xxx_messageInfo_QueryStatsResponse proto.InternalMessageInfo
  207. func (m *QueryStatsResponse) GetStat() []*Stat {
  208. if m != nil {
  209. return m.Stat
  210. }
  211. return nil
  212. }
  213. type Config struct {
  214. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  215. XXX_unrecognized []byte `json:"-"`
  216. XXX_sizecache int32 `json:"-"`
  217. }
  218. func (m *Config) Reset() { *m = Config{} }
  219. func (m *Config) String() string { return proto.CompactTextString(m) }
  220. func (*Config) ProtoMessage() {}
  221. func (*Config) Descriptor() ([]byte, []int) {
  222. return fileDescriptor_c902411c4948f26b, []int{5}
  223. }
  224. func (m *Config) XXX_Unmarshal(b []byte) error {
  225. return xxx_messageInfo_Config.Unmarshal(m, b)
  226. }
  227. func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  228. return xxx_messageInfo_Config.Marshal(b, m, deterministic)
  229. }
  230. func (m *Config) XXX_Merge(src proto.Message) {
  231. xxx_messageInfo_Config.Merge(m, src)
  232. }
  233. func (m *Config) XXX_Size() int {
  234. return xxx_messageInfo_Config.Size(m)
  235. }
  236. func (m *Config) XXX_DiscardUnknown() {
  237. xxx_messageInfo_Config.DiscardUnknown(m)
  238. }
  239. var xxx_messageInfo_Config proto.InternalMessageInfo
  240. func init() {
  241. proto.RegisterType((*GetStatsRequest)(nil), "v2ray.core.app.stats.command.GetStatsRequest")
  242. proto.RegisterType((*Stat)(nil), "v2ray.core.app.stats.command.Stat")
  243. proto.RegisterType((*GetStatsResponse)(nil), "v2ray.core.app.stats.command.GetStatsResponse")
  244. proto.RegisterType((*QueryStatsRequest)(nil), "v2ray.core.app.stats.command.QueryStatsRequest")
  245. proto.RegisterType((*QueryStatsResponse)(nil), "v2ray.core.app.stats.command.QueryStatsResponse")
  246. proto.RegisterType((*Config)(nil), "v2ray.core.app.stats.command.Config")
  247. }
  248. // Reference imports to suppress errors if they are not otherwise used.
  249. var _ context.Context
  250. var _ grpc.ClientConn
  251. // This is a compile-time assertion to ensure that this generated file
  252. // is compatible with the grpc package it is being compiled against.
  253. const _ = grpc.SupportPackageIsVersion4
  254. // StatsServiceClient is the client API for StatsService service.
  255. //
  256. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  257. type StatsServiceClient interface {
  258. GetStats(ctx context.Context, in *GetStatsRequest, opts ...grpc.CallOption) (*GetStatsResponse, error)
  259. QueryStats(ctx context.Context, in *QueryStatsRequest, opts ...grpc.CallOption) (*QueryStatsResponse, error)
  260. }
  261. type statsServiceClient struct {
  262. cc *grpc.ClientConn
  263. }
  264. func NewStatsServiceClient(cc *grpc.ClientConn) StatsServiceClient {
  265. return &statsServiceClient{cc}
  266. }
  267. func (c *statsServiceClient) GetStats(ctx context.Context, in *GetStatsRequest, opts ...grpc.CallOption) (*GetStatsResponse, error) {
  268. out := new(GetStatsResponse)
  269. err := c.cc.Invoke(ctx, "/v2ray.core.app.stats.command.StatsService/GetStats", in, out, opts...)
  270. if err != nil {
  271. return nil, err
  272. }
  273. return out, nil
  274. }
  275. func (c *statsServiceClient) QueryStats(ctx context.Context, in *QueryStatsRequest, opts ...grpc.CallOption) (*QueryStatsResponse, error) {
  276. out := new(QueryStatsResponse)
  277. err := c.cc.Invoke(ctx, "/v2ray.core.app.stats.command.StatsService/QueryStats", in, out, opts...)
  278. if err != nil {
  279. return nil, err
  280. }
  281. return out, nil
  282. }
  283. // StatsServiceServer is the server API for StatsService service.
  284. type StatsServiceServer interface {
  285. GetStats(context.Context, *GetStatsRequest) (*GetStatsResponse, error)
  286. QueryStats(context.Context, *QueryStatsRequest) (*QueryStatsResponse, error)
  287. }
  288. func RegisterStatsServiceServer(s *grpc.Server, srv StatsServiceServer) {
  289. s.RegisterService(&_StatsService_serviceDesc, srv)
  290. }
  291. func _StatsService_GetStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  292. in := new(GetStatsRequest)
  293. if err := dec(in); err != nil {
  294. return nil, err
  295. }
  296. if interceptor == nil {
  297. return srv.(StatsServiceServer).GetStats(ctx, in)
  298. }
  299. info := &grpc.UnaryServerInfo{
  300. Server: srv,
  301. FullMethod: "/v2ray.core.app.stats.command.StatsService/GetStats",
  302. }
  303. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  304. return srv.(StatsServiceServer).GetStats(ctx, req.(*GetStatsRequest))
  305. }
  306. return interceptor(ctx, in, info, handler)
  307. }
  308. func _StatsService_QueryStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  309. in := new(QueryStatsRequest)
  310. if err := dec(in); err != nil {
  311. return nil, err
  312. }
  313. if interceptor == nil {
  314. return srv.(StatsServiceServer).QueryStats(ctx, in)
  315. }
  316. info := &grpc.UnaryServerInfo{
  317. Server: srv,
  318. FullMethod: "/v2ray.core.app.stats.command.StatsService/QueryStats",
  319. }
  320. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  321. return srv.(StatsServiceServer).QueryStats(ctx, req.(*QueryStatsRequest))
  322. }
  323. return interceptor(ctx, in, info, handler)
  324. }
  325. var _StatsService_serviceDesc = grpc.ServiceDesc{
  326. ServiceName: "v2ray.core.app.stats.command.StatsService",
  327. HandlerType: (*StatsServiceServer)(nil),
  328. Methods: []grpc.MethodDesc{
  329. {
  330. MethodName: "GetStats",
  331. Handler: _StatsService_GetStats_Handler,
  332. },
  333. {
  334. MethodName: "QueryStats",
  335. Handler: _StatsService_QueryStats_Handler,
  336. },
  337. },
  338. Streams: []grpc.StreamDesc{},
  339. Metadata: "v2ray.com/core/app/stats/command/command.proto",
  340. }
  341. func init() {
  342. proto.RegisterFile("v2ray.com/core/app/stats/command/command.proto", fileDescriptor_c902411c4948f26b)
  343. }
  344. var fileDescriptor_c902411c4948f26b = []byte{
  345. // 321 bytes of a gzipped FileDescriptorProto
  346. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xb1, 0x4e, 0xc3, 0x30,
  347. 0x10, 0x86, 0x49, 0x5b, 0xda, 0x72, 0x20, 0x01, 0x16, 0x43, 0x55, 0x75, 0x88, 0x3c, 0x75, 0xc1,
  348. 0xa9, 0x82, 0xc4, 0xc2, 0x04, 0x19, 0x90, 0x50, 0x07, 0x70, 0x25, 0x06, 0x36, 0x13, 0x0e, 0x54,
  349. 0x41, 0x62, 0xd7, 0x76, 0x22, 0xe5, 0x95, 0x78, 0x38, 0x9e, 0x01, 0xc5, 0x49, 0x54, 0xa0, 0x6a,
  350. 0x54, 0xa6, 0xdc, 0xc5, 0xff, 0x77, 0xf7, 0xdf, 0xd9, 0xc0, 0xf2, 0x50, 0x8b, 0x82, 0xc5, 0x32,
  351. 0x09, 0x62, 0xa9, 0x31, 0x10, 0x4a, 0x05, 0xc6, 0x0a, 0x6b, 0x82, 0x58, 0x26, 0x89, 0x48, 0x5f,
  352. 0x9a, 0x2f, 0x53, 0x5a, 0x5a, 0x49, 0x26, 0x8d, 0x5e, 0x23, 0x13, 0x4a, 0x31, 0xa7, 0x65, 0xb5,
  353. 0x86, 0x5e, 0xc1, 0xf1, 0x2d, 0xda, 0x45, 0xf9, 0x8f, 0xe3, 0x2a, 0x43, 0x63, 0x09, 0x81, 0x5e,
  354. 0x2a, 0x12, 0x1c, 0x79, 0xbe, 0x37, 0x3d, 0xe0, 0x2e, 0x26, 0x67, 0xb0, 0xaf, 0xd1, 0xa0, 0x1d,
  355. 0x75, 0x7c, 0x6f, 0x3a, 0xe4, 0x55, 0x42, 0x67, 0xd0, 0x2b, 0xc9, 0x6d, 0x44, 0x2e, 0x3e, 0x32,
  356. 0x74, 0x44, 0x97, 0x57, 0x09, 0xbd, 0x83, 0x93, 0x75, 0x3b, 0xa3, 0x64, 0x6a, 0x90, 0x5c, 0x42,
  357. 0xaf, 0xf4, 0xe4, 0xe8, 0xc3, 0x90, 0xb2, 0x36, 0xbf, 0xac, 0x44, 0xb9, 0xd3, 0xd3, 0x08, 0x4e,
  358. 0x1f, 0x32, 0xd4, 0xc5, 0x2f, 0xf3, 0x23, 0x18, 0x28, 0x61, 0x2d, 0xea, 0xb4, 0x76, 0xd3, 0xa4,
  359. 0x5b, 0x46, 0x98, 0x03, 0xf9, 0x59, 0x64, 0xc3, 0x52, 0xf7, 0x5f, 0x96, 0x86, 0xd0, 0x8f, 0x64,
  360. 0xfa, 0xba, 0x7c, 0x0b, 0xbf, 0x3c, 0x38, 0x72, 0x35, 0x17, 0xa8, 0xf3, 0x65, 0x8c, 0xe4, 0x1d,
  361. 0x86, 0xcd, 0xe4, 0xe4, 0xbc, 0xbd, 0xe0, 0x9f, 0x0b, 0x19, 0xb3, 0x5d, 0xe5, 0x95, 0x7b, 0xba,
  362. 0x47, 0x56, 0x00, 0xeb, 0xa9, 0x48, 0xd0, 0xce, 0x6f, 0x2c, 0x71, 0x3c, 0xdb, 0x1d, 0x68, 0x5a,
  363. 0xde, 0xcc, 0xc1, 0x8f, 0x65, 0xd2, 0x0a, 0xde, 0x7b, 0x4f, 0x83, 0x3a, 0xfc, 0xec, 0x4c, 0x1e,
  364. 0x43, 0x2e, 0x0a, 0x16, 0x95, 0xca, 0x6b, 0xa5, 0xdc, 0x16, 0x0d, 0x8b, 0xaa, 0xe3, 0xe7, 0xbe,
  365. 0x7b, 0xbb, 0x17, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xcc, 0x9e, 0xb8, 0xeb, 0xed, 0x02, 0x00,
  366. 0x00,
  367. }