Documentation ¶
Index ¶
- func RegisterTrojanServiceServer(s *grpc.Server, srv TrojanServiceServer)
- func RunClientAPIService(ctx context.Context, config *conf.GlobalConfig, meter stat.TrafficMeter) error
- type ClientAPIService
- type StatsReply
- func (*StatsReply) Descriptor() ([]byte, []int)
- func (m *StatsReply) GetDownload() uint64
- func (m *StatsReply) GetUpload() uint64
- func (*StatsReply) ProtoMessage()
- func (m *StatsReply) Reset()
- func (m *StatsReply) String() string
- func (m *StatsReply) XXX_DiscardUnknown()
- func (m *StatsReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StatsReply) XXX_Merge(src proto.Message)
- func (m *StatsReply) XXX_Size() int
- func (m *StatsReply) XXX_Unmarshal(b []byte) error
- type StatsRequest
- func (*StatsRequest) Descriptor() ([]byte, []int)
- func (m *StatsRequest) GetPassword() string
- func (*StatsRequest) ProtoMessage()
- func (m *StatsRequest) Reset()
- func (m *StatsRequest) String() string
- func (m *StatsRequest) XXX_DiscardUnknown()
- func (m *StatsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StatsRequest) XXX_Merge(src proto.Message)
- func (m *StatsRequest) XXX_Size() int
- func (m *StatsRequest) XXX_Unmarshal(b []byte) error
- type TrojanServiceClient
- type TrojanServiceServer
- type UnimplementedTrojanServiceServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterTrojanServiceServer ¶
func RegisterTrojanServiceServer(s *grpc.Server, srv TrojanServiceServer)
func RunClientAPIService ¶
func RunClientAPIService(ctx context.Context, config *conf.GlobalConfig, meter stat.TrafficMeter) error
Types ¶
type ClientAPIService ¶
type ClientAPIService struct { TrojanServiceServer // contains filtered or unexported fields }
func (*ClientAPIService) QueryStats ¶
func (s *ClientAPIService) QueryStats(ctx context.Context, req *StatsRequest) (*StatsReply, error)
type StatsReply ¶
type StatsReply struct { Upload uint64 `protobuf:"varint,1,opt,name=upload,proto3" json:"upload,omitempty"` Download uint64 `protobuf:"varint,2,opt,name=download,proto3" json:"download,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*StatsReply) Descriptor ¶
func (*StatsReply) Descriptor() ([]byte, []int)
func (*StatsReply) GetDownload ¶
func (m *StatsReply) GetDownload() uint64
func (*StatsReply) GetUpload ¶
func (m *StatsReply) GetUpload() uint64
func (*StatsReply) ProtoMessage ¶
func (*StatsReply) ProtoMessage()
func (*StatsReply) Reset ¶
func (m *StatsReply) Reset()
func (*StatsReply) String ¶
func (m *StatsReply) String() string
func (*StatsReply) XXX_DiscardUnknown ¶
func (m *StatsReply) XXX_DiscardUnknown()
func (*StatsReply) XXX_Marshal ¶
func (m *StatsReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StatsReply) XXX_Merge ¶
func (m *StatsReply) XXX_Merge(src proto.Message)
func (*StatsReply) XXX_Size ¶
func (m *StatsReply) XXX_Size() int
func (*StatsReply) XXX_Unmarshal ¶
func (m *StatsReply) XXX_Unmarshal(b []byte) error
type StatsRequest ¶
type StatsRequest struct { Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*StatsRequest) Descriptor ¶
func (*StatsRequest) Descriptor() ([]byte, []int)
func (*StatsRequest) GetPassword ¶
func (m *StatsRequest) GetPassword() string
func (*StatsRequest) ProtoMessage ¶
func (*StatsRequest) ProtoMessage()
func (*StatsRequest) Reset ¶
func (m *StatsRequest) Reset()
func (*StatsRequest) String ¶
func (m *StatsRequest) String() string
func (*StatsRequest) XXX_DiscardUnknown ¶
func (m *StatsRequest) XXX_DiscardUnknown()
func (*StatsRequest) XXX_Marshal ¶
func (m *StatsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StatsRequest) XXX_Merge ¶
func (m *StatsRequest) XXX_Merge(src proto.Message)
func (*StatsRequest) XXX_Size ¶
func (m *StatsRequest) XXX_Size() int
func (*StatsRequest) XXX_Unmarshal ¶
func (m *StatsRequest) XXX_Unmarshal(b []byte) error
type TrojanServiceClient ¶
type TrojanServiceClient interface {
QueryStats(ctx context.Context, in *StatsRequest, opts ...grpc.CallOption) (*StatsReply, error)
}
TrojanServiceClient is the client API for TrojanService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewTrojanServiceClient ¶
func NewTrojanServiceClient(cc grpc.ClientConnInterface) TrojanServiceClient
type TrojanServiceServer ¶
type TrojanServiceServer interface {
QueryStats(context.Context, *StatsRequest) (*StatsReply, error)
}
TrojanServiceServer is the server API for TrojanService service.
type UnimplementedTrojanServiceServer ¶
type UnimplementedTrojanServiceServer struct { }
UnimplementedTrojanServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedTrojanServiceServer) QueryStats ¶
func (*UnimplementedTrojanServiceServer) QueryStats(ctx context.Context, req *StatsRequest) (*StatsReply, error)
Click to show internal directories.
Click to hide internal directories.