ssapi

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_ssapi_proto protoreflect.FileDescriptor

Functions

func RegisterSSServiceServer

func RegisterSSServiceServer(s *grpc.Server, srv SSServiceServer)

func RunClientAPIService

func RunClientAPIService(ctx context.Context, APIAddress string, meter stat.TrafficMeter) error

Types

type ClientAPIService

type ClientAPIService struct {
	SSServiceServer
	// contains filtered or unexported fields
}

func (*ClientAPIService) QueryStats

func (s *ClientAPIService) QueryStats(ctx context.Context, req *StatsRequest) (*StatsReply, error)

type SSServiceClient

type SSServiceClient interface {
	QueryStats(ctx context.Context, in *StatsRequest, opts ...grpc.CallOption) (*StatsReply, error)
}

SSServiceClient is the client API for SSService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewSSServiceClient

func NewSSServiceClient(cc grpc.ClientConnInterface) SSServiceClient

type SSServiceServer

type SSServiceServer interface {
	QueryStats(context.Context, *StatsRequest) (*StatsReply, error)
}

SSServiceServer is the server API for SSService 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 UnimplementedSSServiceServer

type UnimplementedSSServiceServer struct {
}

UnimplementedSSServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedSSServiceServer) QueryStats

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL