command.pb.go 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  1. package command
  2. import proto "github.com/golang/protobuf/proto"
  3. import fmt "fmt"
  4. import math "math"
  5. import (
  6. "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" json:"name,omitempty"`
  21. // Whether or not to reset the counter to fetching its value.
  22. Reset_ bool `protobuf:"varint,2,opt,name=reset" 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_a956deb495595f76, []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" json:"name,omitempty"`
  63. Value int64 `protobuf:"varint,2,opt,name=value" 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_a956deb495595f76, []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" 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_a956deb495595f76, []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 Config struct {
  137. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  138. XXX_unrecognized []byte `json:"-"`
  139. XXX_sizecache int32 `json:"-"`
  140. }
  141. func (m *Config) Reset() { *m = Config{} }
  142. func (m *Config) String() string { return proto.CompactTextString(m) }
  143. func (*Config) ProtoMessage() {}
  144. func (*Config) Descriptor() ([]byte, []int) {
  145. return fileDescriptor_command_a956deb495595f76, []int{3}
  146. }
  147. func (m *Config) XXX_Unmarshal(b []byte) error {
  148. return xxx_messageInfo_Config.Unmarshal(m, b)
  149. }
  150. func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  151. return xxx_messageInfo_Config.Marshal(b, m, deterministic)
  152. }
  153. func (dst *Config) XXX_Merge(src proto.Message) {
  154. xxx_messageInfo_Config.Merge(dst, src)
  155. }
  156. func (m *Config) XXX_Size() int {
  157. return xxx_messageInfo_Config.Size(m)
  158. }
  159. func (m *Config) XXX_DiscardUnknown() {
  160. xxx_messageInfo_Config.DiscardUnknown(m)
  161. }
  162. var xxx_messageInfo_Config proto.InternalMessageInfo
  163. func init() {
  164. proto.RegisterType((*GetStatsRequest)(nil), "v2ray.core.app.stats.command.GetStatsRequest")
  165. proto.RegisterType((*Stat)(nil), "v2ray.core.app.stats.command.Stat")
  166. proto.RegisterType((*GetStatsResponse)(nil), "v2ray.core.app.stats.command.GetStatsResponse")
  167. proto.RegisterType((*Config)(nil), "v2ray.core.app.stats.command.Config")
  168. }
  169. // Reference imports to suppress errors if they are not otherwise used.
  170. var _ context.Context
  171. var _ grpc.ClientConn
  172. // This is a compile-time assertion to ensure that this generated file
  173. // is compatible with the grpc package it is being compiled against.
  174. const _ = grpc.SupportPackageIsVersion4
  175. // StatsServiceClient is the client API for StatsService service.
  176. //
  177. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  178. type StatsServiceClient interface {
  179. GetStats(ctx context.Context, in *GetStatsRequest, opts ...grpc.CallOption) (*GetStatsResponse, error)
  180. }
  181. type statsServiceClient struct {
  182. cc *grpc.ClientConn
  183. }
  184. func NewStatsServiceClient(cc *grpc.ClientConn) StatsServiceClient {
  185. return &statsServiceClient{cc}
  186. }
  187. func (c *statsServiceClient) GetStats(ctx context.Context, in *GetStatsRequest, opts ...grpc.CallOption) (*GetStatsResponse, error) {
  188. out := new(GetStatsResponse)
  189. err := c.cc.Invoke(ctx, "/v2ray.core.app.stats.command.StatsService/GetStats", in, out, opts...)
  190. if err != nil {
  191. return nil, err
  192. }
  193. return out, nil
  194. }
  195. // StatsServiceServer is the server API for StatsService service.
  196. type StatsServiceServer interface {
  197. GetStats(context.Context, *GetStatsRequest) (*GetStatsResponse, error)
  198. }
  199. func RegisterStatsServiceServer(s *grpc.Server, srv StatsServiceServer) {
  200. s.RegisterService(&_StatsService_serviceDesc, srv)
  201. }
  202. func _StatsService_GetStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  203. in := new(GetStatsRequest)
  204. if err := dec(in); err != nil {
  205. return nil, err
  206. }
  207. if interceptor == nil {
  208. return srv.(StatsServiceServer).GetStats(ctx, in)
  209. }
  210. info := &grpc.UnaryServerInfo{
  211. Server: srv,
  212. FullMethod: "/v2ray.core.app.stats.command.StatsService/GetStats",
  213. }
  214. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  215. return srv.(StatsServiceServer).GetStats(ctx, req.(*GetStatsRequest))
  216. }
  217. return interceptor(ctx, in, info, handler)
  218. }
  219. var _StatsService_serviceDesc = grpc.ServiceDesc{
  220. ServiceName: "v2ray.core.app.stats.command.StatsService",
  221. HandlerType: (*StatsServiceServer)(nil),
  222. Methods: []grpc.MethodDesc{
  223. {
  224. MethodName: "GetStats",
  225. Handler: _StatsService_GetStats_Handler,
  226. },
  227. },
  228. Streams: []grpc.StreamDesc{},
  229. Metadata: "v2ray.com/core/app/stats/command/command.proto",
  230. }
  231. func init() {
  232. proto.RegisterFile("v2ray.com/core/app/stats/command/command.proto", fileDescriptor_command_a956deb495595f76)
  233. }
  234. var fileDescriptor_command_a956deb495595f76 = []byte{
  235. // 267 bytes of a gzipped FileDescriptorProto
  236. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0x3f, 0x4b, 0x03, 0x31,
  237. 0x14, 0xc0, 0xbd, 0x5a, 0xeb, 0xf9, 0x14, 0x94, 0xe0, 0x50, 0xa4, 0xc3, 0x91, 0xa9, 0x8b, 0xef,
  238. 0xe4, 0x04, 0x17, 0x27, 0xbd, 0x41, 0x10, 0x07, 0x49, 0xc1, 0xc1, 0x2d, 0xc6, 0xa7, 0x14, 0xcd,
  239. 0x25, 0x26, 0xe9, 0x41, 0xf1, 0x1b, 0xf9, 0x29, 0x25, 0xb9, 0x1e, 0x82, 0xe0, 0xe1, 0x94, 0xf7,
  240. 0x92, 0xdf, 0xef, 0xfd, 0x21, 0x80, 0x6d, 0xe5, 0xe4, 0x1a, 0x95, 0xd1, 0xa5, 0x32, 0x8e, 0x4a,
  241. 0x69, 0x6d, 0xe9, 0x83, 0x0c, 0xbe, 0x54, 0x46, 0x6b, 0xd9, 0x3c, 0xf7, 0x27, 0x5a, 0x67, 0x82,
  242. 0x61, 0xb3, 0x9e, 0x77, 0x84, 0xd2, 0x5a, 0x4c, 0x2c, 0x6e, 0x18, 0x7e, 0x09, 0x87, 0x37, 0x14,
  243. 0x16, 0xf1, 0x4e, 0xd0, 0xc7, 0x8a, 0x7c, 0x60, 0x0c, 0xc6, 0x8d, 0xd4, 0x34, 0xcd, 0x8a, 0x6c,
  244. 0xbe, 0x27, 0x52, 0xcc, 0x8e, 0x61, 0xc7, 0x91, 0xa7, 0x30, 0x1d, 0x15, 0xd9, 0x3c, 0x17, 0x5d,
  245. 0xc2, 0xcf, 0x60, 0x1c, 0xcd, 0xbf, 0x8c, 0x56, 0xbe, 0xaf, 0x28, 0x19, 0xdb, 0xa2, 0x4b, 0xf8,
  246. 0x2d, 0x1c, 0xfd, 0xb4, 0xf3, 0xd6, 0x34, 0x9e, 0xd8, 0x05, 0x8c, 0xe3, 0x4c, 0xc9, 0xde, 0xaf,
  247. 0x38, 0x0e, 0xcd, 0x8b, 0x51, 0x15, 0x89, 0xe7, 0x39, 0x4c, 0x6a, 0xd3, 0xbc, 0x2c, 0x5f, 0xab,
  248. 0x4f, 0x38, 0x48, 0x25, 0x17, 0xe4, 0xda, 0xa5, 0x22, 0xf6, 0x06, 0x79, 0xdf, 0x85, 0x9d, 0x0e,
  249. 0xd7, 0xfb, 0xb5, 0xfc, 0x09, 0xfe, 0x17, 0xef, 0x86, 0xe7, 0x5b, 0xd7, 0x77, 0x50, 0x28, 0xa3,
  250. 0x07, 0xb5, 0xfb, 0xec, 0x71, 0x77, 0x13, 0x7e, 0x8d, 0x66, 0x0f, 0x95, 0x90, 0x6b, 0xac, 0x23,
  251. 0x79, 0x65, 0x6d, 0xda, 0xc8, 0x63, 0xdd, 0x3d, 0x3f, 0x4d, 0xd2, 0xa7, 0x9d, 0x7f, 0x07, 0x00,
  252. 0x00, 0xff, 0xff, 0x10, 0x3a, 0x8a, 0xf3, 0xe6, 0x01, 0x00, 0x00,
  253. }