Documentation ¶
Index ¶
- Variables
- func GetMulMachineTopN(minkey, maxkey int64, topn int)
- func InitUser(masterAddr string)
- func MasterInit()
- func RegisterGetTopNServer(s *grpc.Server, srv GetTopNServer)
- func RegisterGetWorkerTopNServer(s *grpc.Server, srv GetWorkerTopNServer)
- func StartMaster(masterAddr string, workerAddrs []string)
- func StartWorker(workerAddr string)
- func WorkerInit(workerAddr string)
- type GetTopNClient
- type GetTopNServer
- type GetWorkerTopNClient
- type GetWorkerTopNServer
- type KV
- type TopNReq
- func (*TopNReq) Descriptor() ([]byte, []int)deprecated
- func (x *TopNReq) GetMaxKey() int64
- func (x *TopNReq) GetMinKey() int64
- func (x *TopNReq) GetTopn() int64
- func (*TopNReq) ProtoMessage()
- func (x *TopNReq) ProtoReflect() protoreflect.Message
- func (x *TopNReq) Reset()
- func (x *TopNReq) String() string
- type TopNRsp
- type UnimplementedGetTopNServer
- type UnimplementedGetWorkerTopNServer
Constants ¶
This section is empty.
Variables ¶
var File_rpc_proto protoreflect.FileDescriptor
Functions ¶
func GetMulMachineTopN ¶
GetMulMachineTopN user interface
func RegisterGetTopNServer ¶
func RegisterGetTopNServer(s *grpc.Server, srv GetTopNServer)
func RegisterGetWorkerTopNServer ¶
func RegisterGetWorkerTopNServer(s *grpc.Server, srv GetWorkerTopNServer)
func StartMaster ¶
StartMaster start master instance only once
Types ¶
type GetTopNClient ¶
type GetTopNClient interface { // user interface, return topn by range[minkey,maxkey] in global data GetAllTopN(ctx context.Context, in *TopNReq, opts ...grpc.CallOption) (*TopNRsp, error) }
GetTopNClient is the client API for GetTopN service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewGetTopNClient ¶
func NewGetTopNClient(cc grpc.ClientConnInterface) GetTopNClient
type GetTopNServer ¶
type GetTopNServer interface { // user interface, return topn by range[minkey,maxkey] in global data GetAllTopN(context.Context, *TopNReq) (*TopNRsp, error) }
GetTopNServer is the server API for GetTopN service.
type GetWorkerTopNClient ¶
type GetWorkerTopNClient interface { // master interface, return topn by range[minkey, maxkey] in worker GetWorkerTopN(ctx context.Context, in *TopNReq, opts ...grpc.CallOption) (*TopNRsp, error) }
GetWorkerTopNClient is the client API for GetWorkerTopN service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewGetWorkerTopNClient ¶
func NewGetWorkerTopNClient(cc grpc.ClientConnInterface) GetWorkerTopNClient
type GetWorkerTopNServer ¶
type GetWorkerTopNServer interface { // master interface, return topn by range[minkey, maxkey] in worker GetWorkerTopN(context.Context, *TopNReq) (*TopNRsp, error) }
GetWorkerTopNServer is the server API for GetWorkerTopN service.
type KV ¶
type KV struct { Key int64 `protobuf:"varint,1,opt,name=key,proto3" json:"key,omitempty"` Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*KV) Descriptor
deprecated
func (*KV) ProtoMessage ¶
func (*KV) ProtoMessage()
func (*KV) ProtoReflect ¶
func (x *KV) ProtoReflect() protoreflect.Message
type TopNReq ¶
type TopNReq struct { MinKey int64 `protobuf:"varint,1,opt,name=minKey,proto3" json:"minKey,omitempty"` MaxKey int64 `protobuf:"varint,2,opt,name=maxKey,proto3" json:"maxKey,omitempty"` Topn int64 `protobuf:"varint,3,opt,name=topn,proto3" json:"topn,omitempty"` // contains filtered or unexported fields }
func (*TopNReq) Descriptor
deprecated
func (*TopNReq) ProtoMessage ¶
func (*TopNReq) ProtoMessage()
func (*TopNReq) ProtoReflect ¶
func (x *TopNReq) ProtoReflect() protoreflect.Message
type TopNRsp ¶
type TopNRsp struct { KvList []*KV `protobuf:"bytes,1,rep,name=kvList,proto3" json:"kvList,omitempty"` // contains filtered or unexported fields }
func (*TopNRsp) Descriptor
deprecated
func (*TopNRsp) ProtoMessage ¶
func (*TopNRsp) ProtoMessage()
func (*TopNRsp) ProtoReflect ¶
func (x *TopNRsp) ProtoReflect() protoreflect.Message
type UnimplementedGetTopNServer ¶
type UnimplementedGetTopNServer struct { }
UnimplementedGetTopNServer can be embedded to have forward compatible implementations.
func (*UnimplementedGetTopNServer) GetAllTopN ¶
type UnimplementedGetWorkerTopNServer ¶
type UnimplementedGetWorkerTopNServer struct { }
UnimplementedGetWorkerTopNServer can be embedded to have forward compatible implementations.