Documentation
¶
Index ¶
- func RegisterHeartbeatServer(s *grpc.Server, srv HeartbeatServer)
- func RegisterTaskServer(s *grpc.Server, srv TaskServer)
- type Empty
- func (*Empty) Descriptor() ([]byte, []int)
- func (*Empty) ProtoMessage()
- func (m *Empty) Reset()
- func (m *Empty) String() string
- func (m *Empty) XXX_DiscardUnknown()
- func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Empty) XXX_Merge(src proto.Message)
- func (m *Empty) XXX_Size() int
- func (m *Empty) XXX_Unmarshal(b []byte) error
- type HeartbeatClient
- type HeartbeatReq
- func (*HeartbeatReq) Descriptor() ([]byte, []int)
- func (m *HeartbeatReq) GetPort() int32
- func (m *HeartbeatReq) GetRunningTask() []string
- func (*HeartbeatReq) ProtoMessage()
- func (m *HeartbeatReq) Reset()
- func (m *HeartbeatReq) String() string
- func (m *HeartbeatReq) XXX_DiscardUnknown()
- func (m *HeartbeatReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HeartbeatReq) XXX_Merge(src proto.Message)
- func (m *HeartbeatReq) XXX_Size() int
- func (m *HeartbeatReq) XXX_Unmarshal(b []byte) error
- type HeartbeatServer
- type RegistryReq
- func (*RegistryReq) Descriptor() ([]byte, []int)
- func (m *RegistryReq) GetHostgroup() string
- func (m *RegistryReq) GetHostname() string
- func (m *RegistryReq) GetIp() string
- func (m *RegistryReq) GetPort() int32
- func (m *RegistryReq) GetRemark() string
- func (m *RegistryReq) GetVersion() string
- func (m *RegistryReq) GetWeight() int32
- func (*RegistryReq) ProtoMessage()
- func (m *RegistryReq) Reset()
- func (m *RegistryReq) String() string
- func (m *RegistryReq) XXX_DiscardUnknown()
- func (m *RegistryReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RegistryReq) XXX_Merge(src proto.Message)
- func (m *RegistryReq) XXX_Size() int
- func (m *RegistryReq) XXX_Unmarshal(b []byte) error
- type TaskClient
- type TaskReq
- func (*TaskReq) Descriptor() ([]byte, []int)
- func (m *TaskReq) GetTaskData() []byte
- func (m *TaskReq) GetTaskId() string
- func (m *TaskReq) GetTaskType() int32
- func (*TaskReq) ProtoMessage()
- func (m *TaskReq) Reset()
- func (m *TaskReq) String() string
- func (m *TaskReq) XXX_DiscardUnknown()
- func (m *TaskReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TaskReq) XXX_Merge(src proto.Message)
- func (m *TaskReq) XXX_Size() int
- func (m *TaskReq) XXX_Unmarshal(b []byte) error
- type TaskResp
- func (*TaskResp) Descriptor() ([]byte, []int)
- func (m *TaskResp) GetResp() []byte
- func (*TaskResp) ProtoMessage()
- func (m *TaskResp) Reset()
- func (m *TaskResp) String() string
- func (m *TaskResp) XXX_DiscardUnknown()
- func (m *TaskResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TaskResp) XXX_Merge(src proto.Message)
- func (m *TaskResp) XXX_Size() int
- func (m *TaskResp) XXX_Unmarshal(b []byte) error
- type TaskRespOld
- func (*TaskRespOld) Descriptor() ([]byte, []int)
- func (m *TaskRespOld) GetCode() int32
- func (m *TaskRespOld) GetErrMsg() []byte
- func (m *TaskRespOld) GetRespData() []byte
- func (*TaskRespOld) ProtoMessage()
- func (m *TaskRespOld) Reset()
- func (m *TaskRespOld) String() string
- func (m *TaskRespOld) XXX_DiscardUnknown()
- func (m *TaskRespOld) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TaskRespOld) XXX_Merge(src proto.Message)
- func (m *TaskRespOld) XXX_Size() int
- func (m *TaskRespOld) XXX_Unmarshal(b []byte) error
- type TaskServer
- type Task_RunTaskClient
- type Task_RunTaskServer
- type UnimplementedHeartbeatServer
- type UnimplementedTaskServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterHeartbeatServer ¶
func RegisterHeartbeatServer(s *grpc.Server, srv HeartbeatServer)
func RegisterTaskServer ¶
func RegisterTaskServer(s *grpc.Server, srv TaskServer)
Types ¶
type Empty ¶
type Empty struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*Empty) Descriptor ¶
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) XXX_DiscardUnknown ¶
func (m *Empty) XXX_DiscardUnknown()
func (*Empty) XXX_Marshal ¶
func (*Empty) XXX_Unmarshal ¶
type HeartbeatClient ¶
type HeartbeatClient interface {
// registry host
RegistryHost(ctx context.Context, in *RegistryReq, opts ...grpc.CallOption) (*Empty, error)
// SendHb send to server req to itself alive
SendHb(ctx context.Context, in *HeartbeatReq, opts ...grpc.CallOption) (*Empty, error)
}
HeartbeatClient is the client API for Heartbeat service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewHeartbeatClient ¶
func NewHeartbeatClient(cc *grpc.ClientConn) HeartbeatClient
type HeartbeatReq ¶
type HeartbeatReq struct {
// string ip = 1;
Port int32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
RunningTask []string `protobuf:"bytes,3,rep,name=running_task,json=runningTask,proto3" json:"running_task,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*HeartbeatReq) Descriptor ¶
func (*HeartbeatReq) Descriptor() ([]byte, []int)
func (*HeartbeatReq) GetPort ¶
func (m *HeartbeatReq) GetPort() int32
func (*HeartbeatReq) GetRunningTask ¶
func (m *HeartbeatReq) GetRunningTask() []string
func (*HeartbeatReq) ProtoMessage ¶
func (*HeartbeatReq) ProtoMessage()
func (*HeartbeatReq) Reset ¶
func (m *HeartbeatReq) Reset()
func (*HeartbeatReq) String ¶
func (m *HeartbeatReq) String() string
func (*HeartbeatReq) XXX_DiscardUnknown ¶
func (m *HeartbeatReq) XXX_DiscardUnknown()
func (*HeartbeatReq) XXX_Marshal ¶
func (m *HeartbeatReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*HeartbeatReq) XXX_Merge ¶
func (m *HeartbeatReq) XXX_Merge(src proto.Message)
func (*HeartbeatReq) XXX_Size ¶
func (m *HeartbeatReq) XXX_Size() int
func (*HeartbeatReq) XXX_Unmarshal ¶
func (m *HeartbeatReq) XXX_Unmarshal(b []byte) error
type HeartbeatServer ¶
type HeartbeatServer interface {
// registry host
RegistryHost(context.Context, *RegistryReq) (*Empty, error)
// SendHb send to server req to itself alive
SendHb(context.Context, *HeartbeatReq) (*Empty, error)
}
HeartbeatServer is the server API for Heartbeat service.
type RegistryReq ¶
type RegistryReq struct {
Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"`
Port int32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
Weight int32 `protobuf:"varint,3,opt,name=weight,proto3" json:"weight,omitempty"`
Hostname string `protobuf:"bytes,4,opt,name=hostname,proto3" json:"hostname,omitempty"`
Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"`
Hostgroup string `protobuf:"bytes,6,opt,name=hostgroup,proto3" json:"hostgroup,omitempty"`
Remark string `protobuf:"bytes,7,opt,name=remark,proto3" json:"remark,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*RegistryReq) Descriptor ¶
func (*RegistryReq) Descriptor() ([]byte, []int)
func (*RegistryReq) GetHostgroup ¶
func (m *RegistryReq) GetHostgroup() string
func (*RegistryReq) GetHostname ¶
func (m *RegistryReq) GetHostname() string
func (*RegistryReq) GetIp ¶
func (m *RegistryReq) GetIp() string
func (*RegistryReq) GetPort ¶
func (m *RegistryReq) GetPort() int32
func (*RegistryReq) GetRemark ¶
func (m *RegistryReq) GetRemark() string
func (*RegistryReq) GetVersion ¶
func (m *RegistryReq) GetVersion() string
func (*RegistryReq) GetWeight ¶
func (m *RegistryReq) GetWeight() int32
func (*RegistryReq) ProtoMessage ¶
func (*RegistryReq) ProtoMessage()
func (*RegistryReq) Reset ¶
func (m *RegistryReq) Reset()
func (*RegistryReq) String ¶
func (m *RegistryReq) String() string
func (*RegistryReq) XXX_DiscardUnknown ¶
func (m *RegistryReq) XXX_DiscardUnknown()
func (*RegistryReq) XXX_Marshal ¶
func (m *RegistryReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RegistryReq) XXX_Merge ¶
func (m *RegistryReq) XXX_Merge(src proto.Message)
func (*RegistryReq) XXX_Size ¶
func (m *RegistryReq) XXX_Size() int
func (*RegistryReq) XXX_Unmarshal ¶
func (m *RegistryReq) XXX_Unmarshal(b []byte) error
type TaskClient ¶
type TaskClient interface {
// run task return stream bytes
RunTask(ctx context.Context, in *TaskReq, opts ...grpc.CallOption) (Task_RunTaskClient, error)
}
TaskClient is the client API for Task service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewTaskClient ¶
func NewTaskClient(cc *grpc.ClientConn) TaskClient
type TaskReq ¶
type TaskReq struct {
TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
TaskType int32 `protobuf:"varint,2,opt,name=task_type,json=taskType,proto3" json:"task_type,omitempty"`
TaskData []byte `protobuf:"bytes,3,opt,name=task_data,json=taskData,proto3" json:"task_data,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
task req
func (*TaskReq) Descriptor ¶
func (*TaskReq) GetTaskData ¶
func (*TaskReq) GetTaskType ¶
func (*TaskReq) ProtoMessage ¶
func (*TaskReq) ProtoMessage()
func (*TaskReq) XXX_DiscardUnknown ¶
func (m *TaskReq) XXX_DiscardUnknown()
func (*TaskReq) XXX_Marshal ¶
func (*TaskReq) XXX_Unmarshal ¶
type TaskResp ¶
type TaskResp struct {
Resp []byte `protobuf:"bytes,3,opt,name=resp,proto3" json:"resp,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
task reso stream
func (*TaskResp) Descriptor ¶
func (*TaskResp) ProtoMessage ¶
func (*TaskResp) ProtoMessage()
func (*TaskResp) XXX_DiscardUnknown ¶
func (m *TaskResp) XXX_DiscardUnknown()
func (*TaskResp) XXX_Marshal ¶
func (*TaskResp) XXX_Unmarshal ¶
type TaskRespOld ¶
type TaskRespOld struct {
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
ErrMsg []byte `protobuf:"bytes,2,opt,name=err_msg,json=errMsg,proto3" json:"err_msg,omitempty"`
RespData []byte `protobuf:"bytes,3,opt,name=resp_data,json=respData,proto3" json:"resp_data,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*TaskRespOld) Descriptor ¶
func (*TaskRespOld) Descriptor() ([]byte, []int)
func (*TaskRespOld) GetCode ¶
func (m *TaskRespOld) GetCode() int32
func (*TaskRespOld) GetErrMsg ¶
func (m *TaskRespOld) GetErrMsg() []byte
func (*TaskRespOld) GetRespData ¶
func (m *TaskRespOld) GetRespData() []byte
func (*TaskRespOld) ProtoMessage ¶
func (*TaskRespOld) ProtoMessage()
func (*TaskRespOld) Reset ¶
func (m *TaskRespOld) Reset()
func (*TaskRespOld) String ¶
func (m *TaskRespOld) String() string
func (*TaskRespOld) XXX_DiscardUnknown ¶
func (m *TaskRespOld) XXX_DiscardUnknown()
func (*TaskRespOld) XXX_Marshal ¶
func (m *TaskRespOld) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TaskRespOld) XXX_Merge ¶
func (m *TaskRespOld) XXX_Merge(src proto.Message)
func (*TaskRespOld) XXX_Size ¶
func (m *TaskRespOld) XXX_Size() int
func (*TaskRespOld) XXX_Unmarshal ¶
func (m *TaskRespOld) XXX_Unmarshal(b []byte) error
type TaskServer ¶
type TaskServer interface {
// run task return stream bytes
RunTask(*TaskReq, Task_RunTaskServer) error
}
TaskServer is the server API for Task service.
type Task_RunTaskClient ¶
type Task_RunTaskClient interface {
Recv() (*TaskResp, error)
grpc.ClientStream
}
type Task_RunTaskServer ¶
type Task_RunTaskServer interface {
Send(*TaskResp) error
grpc.ServerStream
}
type UnimplementedHeartbeatServer ¶
type UnimplementedHeartbeatServer struct {
}
UnimplementedHeartbeatServer can be embedded to have forward compatible implementations.
func (*UnimplementedHeartbeatServer) RegistryHost ¶
func (*UnimplementedHeartbeatServer) RegistryHost(ctx context.Context, req *RegistryReq) (*Empty, error)
func (*UnimplementedHeartbeatServer) SendHb ¶
func (*UnimplementedHeartbeatServer) SendHb(ctx context.Context, req *HeartbeatReq) (*Empty, error)
type UnimplementedTaskServer ¶
type UnimplementedTaskServer struct {
}
UnimplementedTaskServer can be embedded to have forward compatible implementations.
func (*UnimplementedTaskServer) RunTask ¶
func (*UnimplementedTaskServer) RunTask(req *TaskReq, srv Task_RunTaskServer) error