Documentation
¶
Index ¶
- Constants
- Variables
- func DecodeProgress(in *PushProgressRequest) []progress.Progress
- 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
- func (*Fragment) Descriptor() ([]byte, []int)
- func (m *Fragment) GetData() []byte
- func (*Fragment) ProtoMessage()
- func (m *Fragment) Reset()
- func (m *Fragment) String() string
- func (m *Fragment) XXX_DiscardUnknown()
- func (m *Fragment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Fragment) XXX_Merge(src proto.Message)
- func (m *Fragment) XXX_Size() int
- func (m *Fragment) XXX_Unmarshal(b []byte) error
- type MasterClient
- type MasterServer
- type Master_GetClickModelClient
- type Master_GetClickModelServer
- type Master_GetRankingModelClient
- type Master_GetRankingModelServer
- type Meta
- func (*Meta) Descriptor() ([]byte, []int)
- func (m *Meta) GetClickModelVersion() int64
- func (m *Meta) GetConfig() string
- func (m *Meta) GetMe() string
- func (m *Meta) GetRankingModelVersion() int64
- func (m *Meta) GetServers() []string
- func (m *Meta) GetWorkers() []string
- func (*Meta) ProtoMessage()
- func (m *Meta) Reset()
- func (m *Meta) String() string
- func (m *Meta) XXX_DiscardUnknown()
- func (m *Meta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Meta) XXX_Merge(src proto.Message)
- func (m *Meta) XXX_Size() int
- func (m *Meta) XXX_Unmarshal(b []byte) error
- type NodeInfo
- func (*NodeInfo) Descriptor() ([]byte, []int)
- func (m *NodeInfo) GetBinaryVersion() string
- func (m *NodeInfo) GetHttpPort() int64
- func (m *NodeInfo) GetNodeName() string
- func (m *NodeInfo) GetNodeType() NodeType
- func (*NodeInfo) ProtoMessage()
- func (m *NodeInfo) Reset()
- func (m *NodeInfo) String() string
- func (m *NodeInfo) XXX_DiscardUnknown()
- func (m *NodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *NodeInfo) XXX_Merge(src proto.Message)
- func (m *NodeInfo) XXX_Size() int
- func (m *NodeInfo) XXX_Unmarshal(b []byte) error
- type NodeType
- type Progress
- func (*Progress) Descriptor() ([]byte, []int)
- func (m *Progress) GetCount() int64
- func (m *Progress) GetError() string
- func (m *Progress) GetFinishTime() int64
- func (m *Progress) GetName() string
- func (m *Progress) GetStartTime() int64
- func (m *Progress) GetStatus() string
- func (m *Progress) GetTotal() int64
- func (m *Progress) GetTracer() string
- func (*Progress) ProtoMessage()
- func (m *Progress) Reset()
- func (m *Progress) String() string
- func (m *Progress) XXX_DiscardUnknown()
- func (m *Progress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Progress) XXX_Merge(src proto.Message)
- func (m *Progress) XXX_Size() int
- func (m *Progress) XXX_Unmarshal(b []byte) error
- type PushProgressRequest
- func (*PushProgressRequest) Descriptor() ([]byte, []int)
- func (m *PushProgressRequest) GetProgress() []*Progress
- func (*PushProgressRequest) ProtoMessage()
- func (m *PushProgressRequest) Reset()
- func (m *PushProgressRequest) String() string
- func (m *PushProgressRequest) XXX_DiscardUnknown()
- func (m *PushProgressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PushProgressRequest) XXX_Merge(src proto.Message)
- func (m *PushProgressRequest) XXX_Size() int
- func (m *PushProgressRequest) XXX_Unmarshal(b []byte) error
- type PushProgressResponse
- func (*PushProgressResponse) Descriptor() ([]byte, []int)
- func (*PushProgressResponse) ProtoMessage()
- func (m *PushProgressResponse) Reset()
- func (m *PushProgressResponse) String() string
- func (m *PushProgressResponse) XXX_DiscardUnknown()
- func (m *PushProgressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PushProgressResponse) XXX_Merge(src proto.Message)
- func (m *PushProgressResponse) XXX_Size() int
- func (m *PushProgressResponse) XXX_Unmarshal(b []byte) error
- 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) PushProgress(context.Context, *PushProgressRequest) (*PushProgressResponse, error)
- type UnsafeMasterServer
- type VersionInfo
- func (*VersionInfo) Descriptor() ([]byte, []int)
- func (m *VersionInfo) GetVersion() int64
- func (*VersionInfo) ProtoMessage()
- func (m *VersionInfo) Reset()
- func (m *VersionInfo) String() string
- func (m *VersionInfo) XXX_DiscardUnknown()
- func (m *VersionInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *VersionInfo) XXX_Merge(src proto.Message)
- func (m *VersionInfo) XXX_Size() int
- func (m *VersionInfo) XXX_Unmarshal(b []byte) error
Constants ¶
const ( Master_GetMeta_FullMethodName = "/protocol.Master/GetMeta" Master_GetRankingModel_FullMethodName = "/protocol.Master/GetRankingModel" Master_GetClickModel_FullMethodName = "/protocol.Master/GetClickModel" Master_PushProgress_FullMethodName = "/protocol.Master/PushProgress" )
Variables ¶
var Master_ServiceDesc = grpc.ServiceDesc{ ServiceName: "protocol.Master", HandlerType: (*MasterServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetMeta", Handler: _Master_GetMeta_Handler, }, { MethodName: "PushProgress", Handler: _Master_PushProgress_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)
var NodeType_name = map[int32]string{
0: "ServerNode",
1: "WorkerNode",
2: "ClientNode",
}
var NodeType_value = map[string]int32{
"ServerNode": 0,
"WorkerNode": 1,
"ClientNode": 2,
}
Functions ¶
func DecodeProgress ¶
func DecodeProgress(in *PushProgressRequest) []progress.Progress
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*Fragment) Descriptor ¶
func (*Fragment) ProtoMessage ¶
func (*Fragment) ProtoMessage()
func (*Fragment) XXX_DiscardUnknown ¶
func (m *Fragment) XXX_DiscardUnknown()
func (*Fragment) XXX_Marshal ¶
func (*Fragment) XXX_Unmarshal ¶
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)
PushProgress(ctx context.Context, in *PushProgressRequest, opts ...grpc.CallOption) (*PushProgressResponse, 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
PushProgress(context.Context, *PushProgressRequest) (*PushProgressResponse, 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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*Meta) Descriptor ¶
func (*Meta) GetClickModelVersion ¶
func (*Meta) GetRankingModelVersion ¶
func (*Meta) GetServers ¶
func (*Meta) GetWorkers ¶
func (*Meta) ProtoMessage ¶
func (*Meta) ProtoMessage()
func (*Meta) XXX_DiscardUnknown ¶
func (m *Meta) XXX_DiscardUnknown()
func (*Meta) XXX_Unmarshal ¶
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*NodeInfo) Descriptor ¶
func (*NodeInfo) GetBinaryVersion ¶
func (*NodeInfo) GetHttpPort ¶
func (*NodeInfo) GetNodeName ¶
func (*NodeInfo) GetNodeType ¶
func (*NodeInfo) ProtoMessage ¶
func (*NodeInfo) ProtoMessage()
func (*NodeInfo) XXX_DiscardUnknown ¶
func (m *NodeInfo) XXX_DiscardUnknown()
func (*NodeInfo) XXX_Marshal ¶
func (*NodeInfo) XXX_Unmarshal ¶
type Progress ¶
type Progress struct {
Tracer string `protobuf:"bytes,1,opt,name=tracer,proto3" json:"tracer,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"`
Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"`
Count int64 `protobuf:"varint,5,opt,name=count,proto3" json:"count,omitempty"`
Total int64 `protobuf:"varint,6,opt,name=total,proto3" json:"total,omitempty"`
StartTime int64 `protobuf:"varint,7,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
FinishTime int64 `protobuf:"varint,8,opt,name=finish_time,json=finishTime,proto3" json:"finish_time,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*Progress) Descriptor ¶
func (*Progress) GetFinishTime ¶
func (*Progress) GetStartTime ¶
func (*Progress) ProtoMessage ¶
func (*Progress) ProtoMessage()
func (*Progress) XXX_DiscardUnknown ¶
func (m *Progress) XXX_DiscardUnknown()
func (*Progress) XXX_Marshal ¶
func (*Progress) XXX_Unmarshal ¶
type PushProgressRequest ¶
type PushProgressRequest struct {
Progress []*Progress `protobuf:"bytes,1,rep,name=progress,proto3" json:"progress,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func EncodeProgress ¶
func EncodeProgress(progressList []progress.Progress) *PushProgressRequest
func (*PushProgressRequest) Descriptor ¶
func (*PushProgressRequest) Descriptor() ([]byte, []int)
func (*PushProgressRequest) GetProgress ¶
func (m *PushProgressRequest) GetProgress() []*Progress
func (*PushProgressRequest) ProtoMessage ¶
func (*PushProgressRequest) ProtoMessage()
func (*PushProgressRequest) Reset ¶
func (m *PushProgressRequest) Reset()
func (*PushProgressRequest) String ¶
func (m *PushProgressRequest) String() string
func (*PushProgressRequest) XXX_DiscardUnknown ¶
func (m *PushProgressRequest) XXX_DiscardUnknown()
func (*PushProgressRequest) XXX_Marshal ¶
func (m *PushProgressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PushProgressRequest) XXX_Merge ¶
func (m *PushProgressRequest) XXX_Merge(src proto.Message)
func (*PushProgressRequest) XXX_Size ¶
func (m *PushProgressRequest) XXX_Size() int
func (*PushProgressRequest) XXX_Unmarshal ¶
func (m *PushProgressRequest) XXX_Unmarshal(b []byte) error
type PushProgressResponse ¶
type PushProgressResponse struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*PushProgressResponse) Descriptor ¶
func (*PushProgressResponse) Descriptor() ([]byte, []int)
func (*PushProgressResponse) ProtoMessage ¶
func (*PushProgressResponse) ProtoMessage()
func (*PushProgressResponse) Reset ¶
func (m *PushProgressResponse) Reset()
func (*PushProgressResponse) String ¶
func (m *PushProgressResponse) String() string
func (*PushProgressResponse) XXX_DiscardUnknown ¶
func (m *PushProgressResponse) XXX_DiscardUnknown()
func (*PushProgressResponse) XXX_Marshal ¶
func (m *PushProgressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PushProgressResponse) XXX_Merge ¶
func (m *PushProgressResponse) XXX_Merge(src proto.Message)
func (*PushProgressResponse) XXX_Size ¶
func (m *PushProgressResponse) XXX_Size() int
func (*PushProgressResponse) XXX_Unmarshal ¶
func (m *PushProgressResponse) XXX_Unmarshal(b []byte) error
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) GetRankingModel ¶
func (UnimplementedMasterServer) GetRankingModel(*VersionInfo, Master_GetRankingModelServer) error
func (UnimplementedMasterServer) PushProgress ¶
func (UnimplementedMasterServer) PushProgress(context.Context, *PushProgressRequest) (*PushProgressResponse, 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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*VersionInfo) Descriptor ¶
func (*VersionInfo) Descriptor() ([]byte, []int)
func (*VersionInfo) GetVersion ¶
func (m *VersionInfo) GetVersion() int64
func (*VersionInfo) ProtoMessage ¶
func (*VersionInfo) ProtoMessage()
func (*VersionInfo) Reset ¶
func (m *VersionInfo) Reset()
func (*VersionInfo) String ¶
func (m *VersionInfo) String() string
func (*VersionInfo) XXX_DiscardUnknown ¶
func (m *VersionInfo) XXX_DiscardUnknown()
func (*VersionInfo) XXX_Marshal ¶
func (m *VersionInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*VersionInfo) XXX_Merge ¶
func (m *VersionInfo) XXX_Merge(src proto.Message)
func (*VersionInfo) XXX_Size ¶
func (m *VersionInfo) XXX_Size() int
func (*VersionInfo) XXX_Unmarshal ¶
func (m *VersionInfo) XXX_Unmarshal(b []byte) error