Documentation ¶
Index ¶
- Variables
- func RegisterMasterServer(s grpc.ServiceRegistrar, srv MasterServer)
- func UnmarshalClickModel(receiver Master_GetClickModelClient) (click.FactorizationMachine, error)
- func UnmarshalRankingModel(receiver Master_GetRankingModelClient) (ranking.MatrixFactorization, error)
- type Fragment
- type MasterClient
- type MasterServer
- type Master_GetClickModelClient
- type Master_GetClickModelServer
- type Master_GetRankingModelClient
- type Master_GetRankingModelServer
- type Meta
- func (*Meta) Descriptor() ([]byte, []int)deprecated
- func (x *Meta) GetClickModelVersion() int64
- func (x *Meta) GetConfig() string
- func (x *Meta) GetMe() string
- func (x *Meta) GetRankingModelVersion() int64
- func (x *Meta) GetServers() []string
- func (x *Meta) GetWorkers() []string
- func (*Meta) ProtoMessage()
- func (x *Meta) ProtoReflect() protoreflect.Message
- func (x *Meta) Reset()
- func (x *Meta) String() string
- type NodeInfo
- func (*NodeInfo) Descriptor() ([]byte, []int)deprecated
- func (x *NodeInfo) GetBinaryVersion() string
- func (x *NodeInfo) GetHttpPort() int64
- func (x *NodeInfo) GetNodeName() string
- func (x *NodeInfo) GetNodeType() NodeType
- func (*NodeInfo) ProtoMessage()
- func (x *NodeInfo) ProtoReflect() protoreflect.Message
- func (x *NodeInfo) Reset()
- func (x *NodeInfo) String() string
- type NodeType
- type PushTaskInfoRequest
- func (*PushTaskInfoRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PushTaskInfoRequest) GetDone() int64
- func (x *PushTaskInfoRequest) GetError() string
- func (x *PushTaskInfoRequest) GetFinishTime() int64
- func (x *PushTaskInfoRequest) GetName() string
- func (x *PushTaskInfoRequest) GetStartTime() int64
- func (x *PushTaskInfoRequest) GetStatus() string
- func (x *PushTaskInfoRequest) GetTotal() int64
- func (*PushTaskInfoRequest) ProtoMessage()
- func (x *PushTaskInfoRequest) ProtoReflect() protoreflect.Message
- func (x *PushTaskInfoRequest) Reset()
- func (x *PushTaskInfoRequest) String() string
- type PushTaskInfoResponse
- type UnimplementedMasterServer
- func (UnimplementedMasterServer) GetClickModel(*VersionInfo, Master_GetClickModelServer) error
- func (UnimplementedMasterServer) GetMeta(context.Context, *NodeInfo) (*Meta, error)
- func (UnimplementedMasterServer) GetRankingModel(*VersionInfo, Master_GetRankingModelServer) error
- func (UnimplementedMasterServer) PushTaskInfo(context.Context, *PushTaskInfoRequest) (*PushTaskInfoResponse, error)
- type UnsafeMasterServer
- type VersionInfo
Constants ¶
This section is empty.
Variables ¶
var ( NodeType_name = map[int32]string{ 0: "ServerNode", 1: "WorkerNode", 2: "ClientNode", } NodeType_value = map[string]int32{ "ServerNode": 0, "WorkerNode": 1, "ClientNode": 2, } )
Enum value maps for NodeType.
var File_protocol_proto protoreflect.FileDescriptor
var Master_ServiceDesc = grpc.ServiceDesc{ ServiceName: "protocol.Master", HandlerType: (*MasterServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetMeta", Handler: _Master_GetMeta_Handler, }, { MethodName: "PushTaskInfo", Handler: _Master_PushTaskInfo_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "GetRankingModel", Handler: _Master_GetRankingModel_Handler, ServerStreams: true, }, { StreamName: "GetClickModel", Handler: _Master_GetClickModel_Handler, ServerStreams: true, }, }, Metadata: "protocol.proto", }
Master_ServiceDesc is the grpc.ServiceDesc for Master service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterMasterServer ¶
func RegisterMasterServer(s grpc.ServiceRegistrar, srv MasterServer)
func UnmarshalClickModel ¶
func UnmarshalClickModel(receiver Master_GetClickModelClient) (click.FactorizationMachine, error)
UnmarshalClickModel unmarshal click model from gRPC.
func UnmarshalRankingModel ¶
func UnmarshalRankingModel(receiver Master_GetRankingModelClient) (ranking.MatrixFactorization, error)
UnmarshalRankingModel unmarshal ranking model from gRPC.
Types ¶
type Fragment ¶
type Fragment struct { Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*Fragment) ProtoReflect ¶
func (x *Fragment) ProtoReflect() protoreflect.Message
type MasterClient ¶
type MasterClient interface { // meta distribute GetMeta(ctx context.Context, in *NodeInfo, opts ...grpc.CallOption) (*Meta, error) // data distribute GetRankingModel(ctx context.Context, in *VersionInfo, opts ...grpc.CallOption) (Master_GetRankingModelClient, error) GetClickModel(ctx context.Context, in *VersionInfo, opts ...grpc.CallOption) (Master_GetClickModelClient, error) // task management PushTaskInfo(ctx context.Context, in *PushTaskInfoRequest, opts ...grpc.CallOption) (*PushTaskInfoResponse, error) }
MasterClient is the client API for Master service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewMasterClient ¶
func NewMasterClient(cc grpc.ClientConnInterface) MasterClient
type MasterServer ¶
type MasterServer interface { // meta distribute GetMeta(context.Context, *NodeInfo) (*Meta, error) // data distribute GetRankingModel(*VersionInfo, Master_GetRankingModelServer) error GetClickModel(*VersionInfo, Master_GetClickModelServer) error // task management PushTaskInfo(context.Context, *PushTaskInfoRequest) (*PushTaskInfoResponse, error) // contains filtered or unexported methods }
MasterServer is the server API for Master service. All implementations must embed UnimplementedMasterServer for forward compatibility
type Master_GetClickModelClient ¶
type Master_GetClickModelClient interface { Recv() (*Fragment, error) grpc.ClientStream }
type Master_GetClickModelServer ¶
type Master_GetClickModelServer interface { Send(*Fragment) error grpc.ServerStream }
type Master_GetRankingModelClient ¶
type Master_GetRankingModelClient interface { Recv() (*Fragment, error) grpc.ClientStream }
type Master_GetRankingModelServer ¶
type Master_GetRankingModelServer interface { Send(*Fragment) error grpc.ServerStream }
type Meta ¶
type Meta struct { Config string `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` RankingModelVersion int64 `protobuf:"varint,3,opt,name=ranking_model_version,json=rankingModelVersion,proto3" json:"ranking_model_version,omitempty"` ClickModelVersion int64 `protobuf:"varint,4,opt,name=click_model_version,json=clickModelVersion,proto3" json:"click_model_version,omitempty"` Me string `protobuf:"bytes,5,opt,name=me,proto3" json:"me,omitempty"` Servers []string `protobuf:"bytes,6,rep,name=servers,proto3" json:"servers,omitempty"` Workers []string `protobuf:"bytes,7,rep,name=workers,proto3" json:"workers,omitempty"` // contains filtered or unexported fields }
func (*Meta) ProtoReflect ¶
func (x *Meta) ProtoReflect() protoreflect.Message
type NodeInfo ¶
type NodeInfo struct { NodeType NodeType `protobuf:"varint,1,opt,name=node_type,json=nodeType,proto3,enum=protocol.NodeType" json:"node_type,omitempty"` NodeName string `protobuf:"bytes,2,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"` HttpPort int64 `protobuf:"varint,3,opt,name=http_port,json=httpPort,proto3" json:"http_port,omitempty"` BinaryVersion string `protobuf:"bytes,4,opt,name=binary_version,json=binaryVersion,proto3" json:"binary_version,omitempty"` // contains filtered or unexported fields }
func (*NodeInfo) ProtoReflect ¶
func (x *NodeInfo) ProtoReflect() protoreflect.Message
type NodeType ¶
type NodeType int32
func (NodeType) Descriptor ¶
func (NodeType) Descriptor() protoreflect.EnumDescriptor
func (NodeType) Number ¶
func (x NodeType) Number() protoreflect.EnumNumber
func (NodeType) Type ¶
func (NodeType) Type() protoreflect.EnumType
type PushTaskInfoRequest ¶
type PushTaskInfoRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` Done int64 `protobuf:"varint,3,opt,name=done,proto3" json:"done,omitempty"` Total int64 `protobuf:"varint,4,opt,name=total,proto3" json:"total,omitempty"` StartTime int64 `protobuf:"varint,5,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` FinishTime int64 `protobuf:"varint,6,opt,name=finish_time,json=finishTime,proto3" json:"finish_time,omitempty"` Error string `protobuf:"bytes,7,opt,name=error,proto3" json:"error,omitempty"` // contains filtered or unexported fields }
func (*PushTaskInfoRequest) Descriptor
deprecated
func (*PushTaskInfoRequest) Descriptor() ([]byte, []int)
Deprecated: Use PushTaskInfoRequest.ProtoReflect.Descriptor instead.
func (*PushTaskInfoRequest) GetDone ¶
func (x *PushTaskInfoRequest) GetDone() int64
func (*PushTaskInfoRequest) GetError ¶
func (x *PushTaskInfoRequest) GetError() string
func (*PushTaskInfoRequest) GetFinishTime ¶
func (x *PushTaskInfoRequest) GetFinishTime() int64
func (*PushTaskInfoRequest) GetName ¶
func (x *PushTaskInfoRequest) GetName() string
func (*PushTaskInfoRequest) GetStartTime ¶
func (x *PushTaskInfoRequest) GetStartTime() int64
func (*PushTaskInfoRequest) GetStatus ¶
func (x *PushTaskInfoRequest) GetStatus() string
func (*PushTaskInfoRequest) GetTotal ¶
func (x *PushTaskInfoRequest) GetTotal() int64
func (*PushTaskInfoRequest) ProtoMessage ¶
func (*PushTaskInfoRequest) ProtoMessage()
func (*PushTaskInfoRequest) ProtoReflect ¶
func (x *PushTaskInfoRequest) ProtoReflect() protoreflect.Message
func (*PushTaskInfoRequest) Reset ¶
func (x *PushTaskInfoRequest) Reset()
func (*PushTaskInfoRequest) String ¶
func (x *PushTaskInfoRequest) String() string
type PushTaskInfoResponse ¶
type PushTaskInfoResponse struct {
// contains filtered or unexported fields
}
func (*PushTaskInfoResponse) Descriptor
deprecated
func (*PushTaskInfoResponse) Descriptor() ([]byte, []int)
Deprecated: Use PushTaskInfoResponse.ProtoReflect.Descriptor instead.
func (*PushTaskInfoResponse) ProtoMessage ¶
func (*PushTaskInfoResponse) ProtoMessage()
func (*PushTaskInfoResponse) ProtoReflect ¶
func (x *PushTaskInfoResponse) ProtoReflect() protoreflect.Message
func (*PushTaskInfoResponse) Reset ¶
func (x *PushTaskInfoResponse) Reset()
func (*PushTaskInfoResponse) String ¶
func (x *PushTaskInfoResponse) String() string
type UnimplementedMasterServer ¶
type UnimplementedMasterServer struct { }
UnimplementedMasterServer must be embedded to have forward compatible implementations.
func (UnimplementedMasterServer) GetClickModel ¶
func (UnimplementedMasterServer) GetClickModel(*VersionInfo, Master_GetClickModelServer) error
func (UnimplementedMasterServer) GetMeta ¶
func (UnimplementedMasterServer) GetRankingModel ¶
func (UnimplementedMasterServer) GetRankingModel(*VersionInfo, Master_GetRankingModelServer) error
func (UnimplementedMasterServer) PushTaskInfo ¶
func (UnimplementedMasterServer) PushTaskInfo(context.Context, *PushTaskInfoRequest) (*PushTaskInfoResponse, error)
type UnsafeMasterServer ¶
type UnsafeMasterServer interface {
// contains filtered or unexported methods
}
UnsafeMasterServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MasterServer will result in compilation errors.
type VersionInfo ¶
type VersionInfo struct { Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` // contains filtered or unexported fields }
func (*VersionInfo) Descriptor
deprecated
func (*VersionInfo) Descriptor() ([]byte, []int)
Deprecated: Use VersionInfo.ProtoReflect.Descriptor instead.
func (*VersionInfo) GetVersion ¶
func (x *VersionInfo) GetVersion() int64
func (*VersionInfo) ProtoMessage ¶
func (*VersionInfo) ProtoMessage()
func (*VersionInfo) ProtoReflect ¶
func (x *VersionInfo) ProtoReflect() protoreflect.Message
func (*VersionInfo) Reset ¶
func (x *VersionInfo) Reset()
func (*VersionInfo) String ¶
func (x *VersionInfo) String() string