Documentation
¶
Index ¶
- Variables
- func RegisterServiceServer(s *grpc.Server, srv ServiceServer)
- type MessageType
- type NodeReply
- func (*NodeReply) Descriptor() ([]byte, []int)
- func (m *NodeReply) GetMsg() MessageType
- func (*NodeReply) ProtoMessage()
- func (m *NodeReply) Reset()
- func (m *NodeReply) String() string
- func (m *NodeReply) XXX_DiscardUnknown()
- func (m *NodeReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *NodeReply) XXX_Merge(src proto.Message)
- func (m *NodeReply) XXX_Size() int
- func (m *NodeReply) XXX_Unmarshal(b []byte) error
- type NodeRequest
- func (*NodeRequest) Descriptor() ([]byte, []int)
- func (m *NodeRequest) GetMsg() MessageType
- func (*NodeRequest) ProtoMessage()
- func (m *NodeRequest) Reset()
- func (m *NodeRequest) String() string
- func (m *NodeRequest) XXX_DiscardUnknown()
- func (m *NodeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *NodeRequest) XXX_Merge(src proto.Message)
- func (m *NodeRequest) XXX_Size() int
- func (m *NodeRequest) XXX_Unmarshal(b []byte) error
- type ServiceClient
- type ServiceServer
- type Work
- func (*Work) Descriptor() ([]byte, []int)
- func (m *Work) GetID() string
- func (m *Work) GetPosterPath() string
- func (m *Work) GetSamplePath() []string
- func (m *Work) GetStatus() WorkStatus
- func (m *Work) GetThumbPath() string
- func (m *Work) GetVideoInfo() string
- func (m *Work) GetVideoPath() []string
- func (*Work) ProtoMessage()
- func (m *Work) Reset()
- func (m *Work) String() string
- func (m *Work) XXX_DiscardUnknown()
- func (m *Work) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Work) XXX_Merge(src proto.Message)
- func (m *Work) XXX_Size() int
- func (m *Work) XXX_Unmarshal(b []byte) error
- type WorkMode
- type WorkReply
- func (*WorkReply) Descriptor() ([]byte, []int)
- func (m *WorkReply) GetError() string
- func (m *WorkReply) GetMsg() MessageType
- func (m *WorkReply) GetTotal() int32
- func (m *WorkReply) GetWorks() []*Work
- func (*WorkReply) ProtoMessage()
- func (m *WorkReply) Reset()
- func (m *WorkReply) String() string
- func (m *WorkReply) XXX_DiscardUnknown()
- func (m *WorkReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *WorkReply) XXX_Merge(src proto.Message)
- func (m *WorkReply) XXX_Size() int
- func (m *WorkReply) XXX_Unmarshal(b []byte) error
- type WorkRequest
- func (*WorkRequest) Descriptor() ([]byte, []int)
- func (m *WorkRequest) GetMsg() MessageType
- func (m *WorkRequest) GetWork() *Work
- func (m *WorkRequest) GetWorkMode() WorkMode
- func (*WorkRequest) ProtoMessage()
- func (m *WorkRequest) Reset()
- func (m *WorkRequest) String() string
- func (m *WorkRequest) XXX_DiscardUnknown()
- func (m *WorkRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *WorkRequest) XXX_Merge(src proto.Message)
- func (m *WorkRequest) XXX_Size() int
- func (m *WorkRequest) XXX_Unmarshal(b []byte) error
- type WorkStatus
Constants ¶
This section is empty.
Variables ¶
var MessageType_name = map[int32]string{
0: "Add",
1: "AsyncAdd",
2: "Status",
3: "List",
4: "Delete",
}
MessageType_name ...
var MessageType_value = map[string]int32{
"Add": 0,
"AsyncAdd": 1,
"Status": 2,
"List": 3,
"Delete": 4,
}
MessageType_value ...
var WorkMode_name = map[int32]string{
0: "LocalMode",
1: "RemoteMode",
2: "DownloadMode",
}
WorkMode_name ...
var WorkMode_value = map[string]int32{
"LocalMode": 0,
"RemoteMode": 1,
"DownloadMode": 2,
}
WorkMode_value ...
var WorkStatus_name = map[int32]string{
0: "WorkAbnormal",
1: "WorkWaiting",
2: "WorkRunning",
3: "WorkStopped",
4: "WorkFinish",
}
WorkStatus_name ...
var WorkStatus_value = map[string]int32{
"WorkAbnormal": 0,
"WorkWaiting": 1,
"WorkRunning": 2,
"WorkStopped": 3,
"WorkFinish": 4,
}
WorkStatus_value ...
Functions ¶
func RegisterServiceServer ¶
func RegisterServiceServer(s *grpc.Server, srv ServiceServer)
RegisterServiceServer ...
Types ¶
type MessageType ¶
type MessageType int32
MessageType ...
const ( MessageType_Add MessageType = 0 MessageType_AsyncAdd MessageType = 1 MessageType_Status MessageType = 2 MessageType_List MessageType = 3 MessageType_Delete MessageType = 4 )
MessageType_Add ...
func (MessageType) EnumDescriptor ¶
func (MessageType) EnumDescriptor() ([]byte, []int)
EnumDescriptor ...
type NodeReply ¶
type NodeReply struct { Msg MessageType `protobuf:"varint,1,opt,name=msg,proto3,enum=pb.MessageType" json:"msg,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
NodeReply ...
func (*NodeReply) XXX_DiscardUnknown ¶
func (m *NodeReply) XXX_DiscardUnknown()
XXX_DiscardUnknown ...
func (*NodeReply) XXX_Marshal ¶
XXX_Marshal ...
func (*NodeReply) XXX_Unmarshal ¶
XXX_Unmarshal ...
type NodeRequest ¶
type NodeRequest struct { Msg MessageType `protobuf:"varint,1,opt,name=msg,proto3,enum=pb.MessageType" json:"msg,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
NodeRequest ...
func (*NodeRequest) XXX_DiscardUnknown ¶
func (m *NodeRequest) XXX_DiscardUnknown()
XXX_DiscardUnknown ...
func (*NodeRequest) XXX_Marshal ¶
func (m *NodeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
XXX_Marshal ...
func (*NodeRequest) XXX_Unmarshal ¶
func (m *NodeRequest) XXX_Unmarshal(b []byte) error
XXX_Unmarshal ...
type ServiceClient ¶
type ServiceClient interface { Work(ctx context.Context, in *WorkRequest, opts ...grpc.CallOption) (*WorkReply, error) // rpc AsyncAddWork (WorkRequest) returns (WorkReply) { // } // rpc WorkStatus (WorkRequest) returns (WorkReply) { // } Node(ctx context.Context, in *NodeRequest, opts ...grpc.CallOption) (*NodeReply, error) }
ServiceClient is the client API for Service service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewServiceClient ¶
func NewServiceClient(cc *grpc.ClientConn) ServiceClient
NewServiceClient ...
type ServiceServer ¶
type ServiceServer interface { Work(context.Context, *WorkRequest) (*WorkReply, error) // rpc AsyncAddWork (WorkRequest) returns (WorkReply) { // } // rpc WorkStatus (WorkRequest) returns (WorkReply) { // } Node(context.Context, *NodeRequest) (*NodeReply, error) }
ServiceServer is the server API for Service service.
type Work ¶
type Work struct { Status WorkStatus `protobuf:"varint,1,opt,name=status,proto3,enum=pb.WorkStatus" json:"status,omitempty"` ID string `protobuf:"bytes,2,opt,name=ID,proto3" json:"ID,omitempty"` VideoPath []string `protobuf:"bytes,3,rep,name=video_path,json=videoPath,proto3" json:"video_path,omitempty"` PosterPath string `protobuf:"bytes,4,opt,name=poster_path,json=posterPath,proto3" json:"poster_path,omitempty"` ThumbPath string `protobuf:"bytes,5,opt,name=thumb_path,json=thumbPath,proto3" json:"thumb_path,omitempty"` SamplePath []string `protobuf:"bytes,6,rep,name=sample_path,json=samplePath,proto3" json:"sample_path,omitempty"` VideoInfo string `protobuf:"bytes,7,opt,name=video_info,json=videoInfo,proto3" json:"video_info,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Work ...
func (*Work) XXX_Marshal ¶
XXX_Marshal ...
type WorkMode ¶
type WorkMode int32
WorkMode ...
const ( WorkMode_LocalMode WorkMode = 0 WorkMode_RemoteMode WorkMode = 1 WorkMode_DownloadMode WorkMode = 2 )
WorkMode_LocalMode ...
func (WorkMode) EnumDescriptor ¶
EnumDescriptor ...
type WorkReply ¶
type WorkReply struct { Msg MessageType `protobuf:"varint,1,opt,name=msg,proto3,enum=pb.MessageType" json:"msg,omitempty"` Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` Works []*Work `protobuf:"bytes,3,rep,name=works,proto3" json:"works,omitempty"` Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
WorkReply ...
func (*WorkReply) XXX_DiscardUnknown ¶
func (m *WorkReply) XXX_DiscardUnknown()
XXX_DiscardUnknown ...
func (*WorkReply) XXX_Marshal ¶
XXX_Marshal ...
func (*WorkReply) XXX_Unmarshal ¶
XXX_Unmarshal ...
type WorkRequest ¶
type WorkRequest struct { Msg MessageType `protobuf:"varint,1,opt,name=msg,proto3,enum=pb.MessageType" json:"msg,omitempty"` WorkMode WorkMode `protobuf:"varint,2,opt,name=work_mode,json=workMode,proto3,enum=pb.WorkMode" json:"work_mode,omitempty"` // string ID = 3; Work *Work `protobuf:"bytes,4,opt,name=work,proto3" json:"work,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
WorkRequest ...
func (*WorkRequest) XXX_DiscardUnknown ¶
func (m *WorkRequest) XXX_DiscardUnknown()
XXX_DiscardUnknown ...
func (*WorkRequest) XXX_Marshal ¶
func (m *WorkRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
XXX_Marshal ...
func (*WorkRequest) XXX_Unmarshal ¶
func (m *WorkRequest) XXX_Unmarshal(b []byte) error
XXX_Unmarshal ...
type WorkStatus ¶
type WorkStatus int32
WorkStatus ...
const ( WorkStatus_WorkAbnormal WorkStatus = 0 WorkStatus_WorkWaiting WorkStatus = 1 WorkStatus_WorkRunning WorkStatus = 2 WorkStatus_WorkStopped WorkStatus = 3 WorkStatus_WorkFinish WorkStatus = 4 )
WorkStatus_WorkAbnormal ...
func (WorkStatus) EnumDescriptor ¶
func (WorkStatus) EnumDescriptor() ([]byte, []int)
EnumDescriptor ...