command.pb.go 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  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. }
  24. func (m *GetStatsRequest) Reset() { *m = GetStatsRequest{} }
  25. func (m *GetStatsRequest) String() string { return proto.CompactTextString(m) }
  26. func (*GetStatsRequest) ProtoMessage() {}
  27. func (*GetStatsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
  28. func (m *GetStatsRequest) GetName() string {
  29. if m != nil {
  30. return m.Name
  31. }
  32. return ""
  33. }
  34. func (m *GetStatsRequest) GetReset_() bool {
  35. if m != nil {
  36. return m.Reset_
  37. }
  38. return false
  39. }
  40. type Stat struct {
  41. Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
  42. Value int64 `protobuf:"varint,2,opt,name=value" json:"value,omitempty"`
  43. }
  44. func (m *Stat) Reset() { *m = Stat{} }
  45. func (m *Stat) String() string { return proto.CompactTextString(m) }
  46. func (*Stat) ProtoMessage() {}
  47. func (*Stat) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
  48. func (m *Stat) GetName() string {
  49. if m != nil {
  50. return m.Name
  51. }
  52. return ""
  53. }
  54. func (m *Stat) GetValue() int64 {
  55. if m != nil {
  56. return m.Value
  57. }
  58. return 0
  59. }
  60. type GetStatsResponse struct {
  61. Stat *Stat `protobuf:"bytes,1,opt,name=stat" json:"stat,omitempty"`
  62. }
  63. func (m *GetStatsResponse) Reset() { *m = GetStatsResponse{} }
  64. func (m *GetStatsResponse) String() string { return proto.CompactTextString(m) }
  65. func (*GetStatsResponse) ProtoMessage() {}
  66. func (*GetStatsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
  67. func (m *GetStatsResponse) GetStat() *Stat {
  68. if m != nil {
  69. return m.Stat
  70. }
  71. return nil
  72. }
  73. type Config struct {
  74. }
  75. func (m *Config) Reset() { *m = Config{} }
  76. func (m *Config) String() string { return proto.CompactTextString(m) }
  77. func (*Config) ProtoMessage() {}
  78. func (*Config) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
  79. func init() {
  80. proto.RegisterType((*GetStatsRequest)(nil), "v2ray.core.app.stats.command.GetStatsRequest")
  81. proto.RegisterType((*Stat)(nil), "v2ray.core.app.stats.command.Stat")
  82. proto.RegisterType((*GetStatsResponse)(nil), "v2ray.core.app.stats.command.GetStatsResponse")
  83. proto.RegisterType((*Config)(nil), "v2ray.core.app.stats.command.Config")
  84. }
  85. // Reference imports to suppress errors if they are not otherwise used.
  86. var _ context.Context
  87. var _ grpc.ClientConn
  88. // This is a compile-time assertion to ensure that this generated file
  89. // is compatible with the grpc package it is being compiled against.
  90. const _ = grpc.SupportPackageIsVersion4
  91. // Client API for StatsService service
  92. type StatsServiceClient interface {
  93. GetStats(ctx context.Context, in *GetStatsRequest, opts ...grpc.CallOption) (*GetStatsResponse, error)
  94. }
  95. type statsServiceClient struct {
  96. cc *grpc.ClientConn
  97. }
  98. func NewStatsServiceClient(cc *grpc.ClientConn) StatsServiceClient {
  99. return &statsServiceClient{cc}
  100. }
  101. func (c *statsServiceClient) GetStats(ctx context.Context, in *GetStatsRequest, opts ...grpc.CallOption) (*GetStatsResponse, error) {
  102. out := new(GetStatsResponse)
  103. err := grpc.Invoke(ctx, "/v2ray.core.app.stats.command.StatsService/GetStats", in, out, c.cc, opts...)
  104. if err != nil {
  105. return nil, err
  106. }
  107. return out, nil
  108. }
  109. // Server API for StatsService service
  110. type StatsServiceServer interface {
  111. GetStats(context.Context, *GetStatsRequest) (*GetStatsResponse, error)
  112. }
  113. func RegisterStatsServiceServer(s *grpc.Server, srv StatsServiceServer) {
  114. s.RegisterService(&_StatsService_serviceDesc, srv)
  115. }
  116. func _StatsService_GetStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  117. in := new(GetStatsRequest)
  118. if err := dec(in); err != nil {
  119. return nil, err
  120. }
  121. if interceptor == nil {
  122. return srv.(StatsServiceServer).GetStats(ctx, in)
  123. }
  124. info := &grpc.UnaryServerInfo{
  125. Server: srv,
  126. FullMethod: "/v2ray.core.app.stats.command.StatsService/GetStats",
  127. }
  128. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  129. return srv.(StatsServiceServer).GetStats(ctx, req.(*GetStatsRequest))
  130. }
  131. return interceptor(ctx, in, info, handler)
  132. }
  133. var _StatsService_serviceDesc = grpc.ServiceDesc{
  134. ServiceName: "v2ray.core.app.stats.command.StatsService",
  135. HandlerType: (*StatsServiceServer)(nil),
  136. Methods: []grpc.MethodDesc{
  137. {
  138. MethodName: "GetStats",
  139. Handler: _StatsService_GetStats_Handler,
  140. },
  141. },
  142. Streams: []grpc.StreamDesc{},
  143. Metadata: "v2ray.com/core/app/stats/command/command.proto",
  144. }
  145. func init() { proto.RegisterFile("v2ray.com/core/app/stats/command/command.proto", fileDescriptor0) }
  146. var fileDescriptor0 = []byte{
  147. // 267 bytes of a gzipped FileDescriptorProto
  148.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f,
  159. 0x38, 0x0e, 0xcd, 0x8b, 0x51, 0x15, 0x89, 0xe7, 0x39, 0x4c, 0x6a, 0xd3, 0xbc, 0x2c, 0x5f, 0xab,
  160. 0x4f, 0x38, 0x48, 0x25, 0x17, 0xe4, 0xda, 0xa5, 0x22, 0xf6, 0x06, 0x79, 0xdf, 0x85, 0x9d, 0x0e,
  161. 0xd7, 0xfb, 0xb5, 0xfc, 0x09, 0xfe, 0x17, 0xef, 0x86, 0xe7, 0x5b, 0xd7, 0x77, 0x50, 0x28, 0xa3,
  162. 0x07, 0xb5, 0xfb, 0xec, 0x71, 0x77, 0x13, 0x7e, 0x8d, 0x66, 0x0f, 0x95, 0x90, 0x6b, 0xac, 0x23,
  163. 0x79, 0x65, 0x6d, 0xda, 0xc8, 0x63, 0xdd, 0x3d, 0x3f, 0x4d, 0xd2, 0xa7, 0x9d, 0x7f, 0x07, 0x00,
  164. 0x00, 0xff, 0xff, 0x10, 0x3a, 0x8a, 0xf3, 0xe6, 0x01, 0x00, 0x00,
  165. }