command.pb.go 15 KB

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