Documentation ¶
Index ¶
- Variables
- func RegisterSnellServiceServer(s *grpc.Server, srv SnellServiceServer)
- func RunClientAPIService(ctx context.Context, config *conf.GlobalConfig, meter stat.TrafficMeter) error
- type ClientAPIService
- type SnellServiceClient
- type SnellServiceServer
- type StatsReply
- func (*StatsReply) Descriptor() ([]byte, []int)deprecated
- func (x *StatsReply) GetDownloadSpeed() uint64
- func (x *StatsReply) GetDownloadTraffic() uint64
- func (x *StatsReply) GetUploadSpeed() uint64
- func (x *StatsReply) GetUploadTraffic() uint64
- func (*StatsReply) ProtoMessage()
- func (x *StatsReply) ProtoReflect() protoreflect.Message
- func (x *StatsReply) Reset()
- func (x *StatsReply) String() string
- type StatsRequest
- type UnimplementedSnellServiceServer
Constants ¶
This section is empty.
Variables ¶
View Source
var File_snellapi_proto protoreflect.FileDescriptor
Functions ¶
func RegisterSnellServiceServer ¶
func RegisterSnellServiceServer(s *grpc.Server, srv SnellServiceServer)
func RunClientAPIService ¶
func RunClientAPIService(ctx context.Context, config *conf.GlobalConfig, meter stat.TrafficMeter) error
Types ¶
type ClientAPIService ¶
type ClientAPIService struct { SnellServiceServer // contains filtered or unexported fields }
func (*ClientAPIService) QueryStats ¶
func (s *ClientAPIService) QueryStats(ctx context.Context, req *StatsRequest) (*StatsReply, error)
type SnellServiceClient ¶
type SnellServiceClient interface {
QueryStats(ctx context.Context, in *StatsRequest, opts ...grpc.CallOption) (*StatsReply, error)
}
SnellServiceClient is the client API for SnellService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewSnellServiceClient ¶
func NewSnellServiceClient(cc grpc.ClientConnInterface) SnellServiceClient
type SnellServiceServer ¶
type SnellServiceServer interface {
QueryStats(context.Context, *StatsRequest) (*StatsReply, error)
}
SnellServiceServer is the server API for SnellService service.
type StatsReply ¶
type StatsReply struct { UploadTraffic uint64 `protobuf:"varint,1,opt,name=upload_traffic,json=uploadTraffic,proto3" json:"upload_traffic,omitempty"` DownloadTraffic uint64 `protobuf:"varint,2,opt,name=download_traffic,json=downloadTraffic,proto3" json:"download_traffic,omitempty"` UploadSpeed uint64 `protobuf:"varint,3,opt,name=upload_speed,json=uploadSpeed,proto3" json:"upload_speed,omitempty"` DownloadSpeed uint64 `protobuf:"varint,4,opt,name=download_speed,json=downloadSpeed,proto3" json:"download_speed,omitempty"` // contains filtered or unexported fields }
func (*StatsReply) Descriptor
deprecated
func (*StatsReply) Descriptor() ([]byte, []int)
Deprecated: Use StatsReply.ProtoReflect.Descriptor instead.
func (*StatsReply) GetDownloadSpeed ¶
func (x *StatsReply) GetDownloadSpeed() uint64
func (*StatsReply) GetDownloadTraffic ¶
func (x *StatsReply) GetDownloadTraffic() uint64
func (*StatsReply) GetUploadSpeed ¶
func (x *StatsReply) GetUploadSpeed() uint64
func (*StatsReply) GetUploadTraffic ¶
func (x *StatsReply) GetUploadTraffic() uint64
func (*StatsReply) ProtoMessage ¶
func (*StatsReply) ProtoMessage()
func (*StatsReply) ProtoReflect ¶
func (x *StatsReply) ProtoReflect() protoreflect.Message
func (*StatsReply) Reset ¶
func (x *StatsReply) Reset()
func (*StatsReply) String ¶
func (x *StatsReply) String() string
type StatsRequest ¶
type StatsRequest struct { Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"` //reserved for server api // contains filtered or unexported fields }
func (*StatsRequest) Descriptor
deprecated
func (*StatsRequest) Descriptor() ([]byte, []int)
Deprecated: Use StatsRequest.ProtoReflect.Descriptor instead.
func (*StatsRequest) GetPassword ¶
func (x *StatsRequest) GetPassword() string
func (*StatsRequest) ProtoMessage ¶
func (*StatsRequest) ProtoMessage()
func (*StatsRequest) ProtoReflect ¶
func (x *StatsRequest) ProtoReflect() protoreflect.Message
func (*StatsRequest) Reset ¶
func (x *StatsRequest) Reset()
func (*StatsRequest) String ¶
func (x *StatsRequest) String() string
type UnimplementedSnellServiceServer ¶
type UnimplementedSnellServiceServer struct { }
UnimplementedSnellServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedSnellServiceServer) QueryStats ¶
func (*UnimplementedSnellServiceServer) QueryStats(context.Context, *StatsRequest) (*StatsReply, error)
Click to show internal directories.
Click to hide internal directories.