Documentation
¶
Index ¶
- Variables
- func RegisterSchedulerServer(s *grpc.Server, srv SchedulerServer)
- type CompleteTaskRequest
- func (*CompleteTaskRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CompleteTaskRequest) GetNow() *timestamp.Timestamp
- func (x *CompleteTaskRequest) GetResult() *any.Any
- func (x *CompleteTaskRequest) GetTaskId() string
- func (x *CompleteTaskRequest) GetTaskName() string
- func (*CompleteTaskRequest) ProtoMessage()
- func (x *CompleteTaskRequest) ProtoReflect() protoreflect.Message
- func (x *CompleteTaskRequest) Reset()
- func (x *CompleteTaskRequest) String() string
- func (m *CompleteTaskRequest) Validate() error
- type CompleteTaskRequestValidationError
- func (e CompleteTaskRequestValidationError) Cause() error
- func (e CompleteTaskRequestValidationError) Error() string
- func (e CompleteTaskRequestValidationError) ErrorName() string
- func (e CompleteTaskRequestValidationError) Field() string
- func (e CompleteTaskRequestValidationError) Key() bool
- func (e CompleteTaskRequestValidationError) Reason() string
- type CompleteTaskResponse
- func (*CompleteTaskResponse) Descriptor() ([]byte, []int)deprecated
- func (*CompleteTaskResponse) ProtoMessage()
- func (x *CompleteTaskResponse) ProtoReflect() protoreflect.Message
- func (x *CompleteTaskResponse) Reset()
- func (x *CompleteTaskResponse) String() string
- func (m *CompleteTaskResponse) Validate() error
- type CompleteTaskResponseValidationError
- func (e CompleteTaskResponseValidationError) Cause() error
- func (e CompleteTaskResponseValidationError) Error() string
- func (e CompleteTaskResponseValidationError) ErrorName() string
- func (e CompleteTaskResponseValidationError) Field() string
- func (e CompleteTaskResponseValidationError) Key() bool
- func (e CompleteTaskResponseValidationError) Reason() string
- type HeartbeatRequest
- func (*HeartbeatRequest) Descriptor() ([]byte, []int)deprecated
- func (x *HeartbeatRequest) GetHeartbeatTime() *timestamp.Timestamp
- func (x *HeartbeatRequest) GetTaskId() string
- func (*HeartbeatRequest) ProtoMessage()
- func (x *HeartbeatRequest) ProtoReflect() protoreflect.Message
- func (x *HeartbeatRequest) Reset()
- func (x *HeartbeatRequest) String() string
- func (m *HeartbeatRequest) Validate() error
- type HeartbeatRequestValidationError
- func (e HeartbeatRequestValidationError) Cause() error
- func (e HeartbeatRequestValidationError) Error() string
- func (e HeartbeatRequestValidationError) ErrorName() string
- func (e HeartbeatRequestValidationError) Field() string
- func (e HeartbeatRequestValidationError) Key() bool
- func (e HeartbeatRequestValidationError) Reason() string
- type HeartbeatResponse
- type HeartbeatResponseValidationError
- func (e HeartbeatResponseValidationError) Cause() error
- func (e HeartbeatResponseValidationError) Error() string
- func (e HeartbeatResponseValidationError) ErrorName() string
- func (e HeartbeatResponseValidationError) Field() string
- func (e HeartbeatResponseValidationError) Key() bool
- func (e HeartbeatResponseValidationError) Reason() string
- type ScheduleRequest
- func (*ScheduleRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ScheduleRequest) GetHeartbeatInterval() *duration.Duration
- func (x *ScheduleRequest) GetHeartbeatTimeout() *duration.Duration
- func (x *ScheduleRequest) GetLastTaskResult() *any.Any
- func (x *ScheduleRequest) GetReport() *common.Target
- func (x *ScheduleRequest) GetScheduleId() string
- func (x *ScheduleRequest) GetTask() *job.Task
- func (*ScheduleRequest) ProtoMessage()
- func (x *ScheduleRequest) ProtoReflect() protoreflect.Message
- func (x *ScheduleRequest) Reset()
- func (x *ScheduleRequest) String() string
- func (m *ScheduleRequest) Validate() error
- type ScheduleRequestValidationError
- func (e ScheduleRequestValidationError) Cause() error
- func (e ScheduleRequestValidationError) Error() string
- func (e ScheduleRequestValidationError) ErrorName() string
- func (e ScheduleRequestValidationError) Field() string
- func (e ScheduleRequestValidationError) Key() bool
- func (e ScheduleRequestValidationError) Reason() string
- type ScheduleResponse
- type ScheduleResponseValidationError
- func (e ScheduleResponseValidationError) Cause() error
- func (e ScheduleResponseValidationError) Error() string
- func (e ScheduleResponseValidationError) ErrorName() string
- func (e ScheduleResponseValidationError) Field() string
- func (e ScheduleResponseValidationError) Key() bool
- func (e ScheduleResponseValidationError) Reason() string
- type SchedulerClient
- type SchedulerServer
- type SetFailTaskRequest
- func (*SetFailTaskRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SetFailTaskRequest) GetNow() *timestamp.Timestamp
- func (x *SetFailTaskRequest) GetReason() string
- func (x *SetFailTaskRequest) GetTaskId() string
- func (*SetFailTaskRequest) ProtoMessage()
- func (x *SetFailTaskRequest) ProtoReflect() protoreflect.Message
- func (x *SetFailTaskRequest) Reset()
- func (x *SetFailTaskRequest) String() string
- func (m *SetFailTaskRequest) Validate() error
- type SetFailTaskRequestValidationError
- func (e SetFailTaskRequestValidationError) Cause() error
- func (e SetFailTaskRequestValidationError) Error() string
- func (e SetFailTaskRequestValidationError) ErrorName() string
- func (e SetFailTaskRequestValidationError) Field() string
- func (e SetFailTaskRequestValidationError) Key() bool
- func (e SetFailTaskRequestValidationError) Reason() string
- type SetFailTaskResponse
- func (*SetFailTaskResponse) Descriptor() ([]byte, []int)deprecated
- func (*SetFailTaskResponse) ProtoMessage()
- func (x *SetFailTaskResponse) ProtoReflect() protoreflect.Message
- func (x *SetFailTaskResponse) Reset()
- func (x *SetFailTaskResponse) String() string
- func (m *SetFailTaskResponse) Validate() error
- type SetFailTaskResponseValidationError
- func (e SetFailTaskResponseValidationError) Cause() error
- func (e SetFailTaskResponseValidationError) Error() string
- func (e SetFailTaskResponseValidationError) ErrorName() string
- func (e SetFailTaskResponseValidationError) Field() string
- func (e SetFailTaskResponseValidationError) Key() bool
- func (e SetFailTaskResponseValidationError) Reason() string
- type UnimplementedSchedulerServer
- func (*UnimplementedSchedulerServer) CompleteTask(context.Context, *CompleteTaskRequest) (*CompleteTaskResponse, error)
- func (*UnimplementedSchedulerServer) Heartbeat(context.Context, *HeartbeatRequest) (*HeartbeatResponse, error)
- func (*UnimplementedSchedulerServer) Schedule(context.Context, *ScheduleRequest) (*ScheduleResponse, error)
- func (*UnimplementedSchedulerServer) SetFailTask(context.Context, *SetFailTaskRequest) (*SetFailTaskResponse, error)
Constants ¶
This section is empty.
Variables ¶
var File_scheduler_scheduler_proto protoreflect.FileDescriptor
Functions ¶
func RegisterSchedulerServer ¶
func RegisterSchedulerServer(s *grpc.Server, srv SchedulerServer)
Types ¶
type CompleteTaskRequest ¶
type CompleteTaskRequest struct { // task_id 任务id TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` // now 完成时间 Now *timestamp.Timestamp `protobuf:"bytes,2,opt,name=now,proto3" json:"now,omitempty"` // result 任务结果 Result *any.Any `protobuf:"bytes,3,opt,name=result,proto3" json:"result,omitempty"` // task_name 任务name TaskName string `protobuf:"bytes,4,opt,name=task_name,json=taskName,proto3" json:"task_name,omitempty"` // contains filtered or unexported fields }
func (*CompleteTaskRequest) Descriptor
deprecated
func (*CompleteTaskRequest) Descriptor() ([]byte, []int)
Deprecated: Use CompleteTaskRequest.ProtoReflect.Descriptor instead.
func (*CompleteTaskRequest) GetNow ¶
func (x *CompleteTaskRequest) GetNow() *timestamp.Timestamp
func (*CompleteTaskRequest) GetResult ¶
func (x *CompleteTaskRequest) GetResult() *any.Any
func (*CompleteTaskRequest) GetTaskId ¶
func (x *CompleteTaskRequest) GetTaskId() string
func (*CompleteTaskRequest) GetTaskName ¶
func (x *CompleteTaskRequest) GetTaskName() string
func (*CompleteTaskRequest) ProtoMessage ¶
func (*CompleteTaskRequest) ProtoMessage()
func (*CompleteTaskRequest) ProtoReflect ¶
func (x *CompleteTaskRequest) ProtoReflect() protoreflect.Message
func (*CompleteTaskRequest) Reset ¶
func (x *CompleteTaskRequest) Reset()
func (*CompleteTaskRequest) String ¶
func (x *CompleteTaskRequest) String() string
func (*CompleteTaskRequest) Validate ¶
func (m *CompleteTaskRequest) Validate() error
Validate checks the field values on CompleteTaskRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type CompleteTaskRequestValidationError ¶
type CompleteTaskRequestValidationError struct {
// contains filtered or unexported fields
}
CompleteTaskRequestValidationError is the validation error returned by CompleteTaskRequest.Validate if the designated constraints aren't met.
func (CompleteTaskRequestValidationError) Cause ¶
func (e CompleteTaskRequestValidationError) Cause() error
Cause function returns cause value.
func (CompleteTaskRequestValidationError) Error ¶
func (e CompleteTaskRequestValidationError) Error() string
Error satisfies the builtin error interface
func (CompleteTaskRequestValidationError) ErrorName ¶
func (e CompleteTaskRequestValidationError) ErrorName() string
ErrorName returns error name.
func (CompleteTaskRequestValidationError) Field ¶
func (e CompleteTaskRequestValidationError) Field() string
Field function returns field value.
func (CompleteTaskRequestValidationError) Key ¶
func (e CompleteTaskRequestValidationError) Key() bool
Key function returns key value.
func (CompleteTaskRequestValidationError) Reason ¶
func (e CompleteTaskRequestValidationError) Reason() string
Reason function returns reason value.
type CompleteTaskResponse ¶
type CompleteTaskResponse struct {
// contains filtered or unexported fields
}
func (*CompleteTaskResponse) Descriptor
deprecated
func (*CompleteTaskResponse) Descriptor() ([]byte, []int)
Deprecated: Use CompleteTaskResponse.ProtoReflect.Descriptor instead.
func (*CompleteTaskResponse) ProtoMessage ¶
func (*CompleteTaskResponse) ProtoMessage()
func (*CompleteTaskResponse) ProtoReflect ¶
func (x *CompleteTaskResponse) ProtoReflect() protoreflect.Message
func (*CompleteTaskResponse) Reset ¶
func (x *CompleteTaskResponse) Reset()
func (*CompleteTaskResponse) String ¶
func (x *CompleteTaskResponse) String() string
func (*CompleteTaskResponse) Validate ¶
func (m *CompleteTaskResponse) Validate() error
Validate checks the field values on CompleteTaskResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type CompleteTaskResponseValidationError ¶
type CompleteTaskResponseValidationError struct {
// contains filtered or unexported fields
}
CompleteTaskResponseValidationError is the validation error returned by CompleteTaskResponse.Validate if the designated constraints aren't met.
func (CompleteTaskResponseValidationError) Cause ¶
func (e CompleteTaskResponseValidationError) Cause() error
Cause function returns cause value.
func (CompleteTaskResponseValidationError) Error ¶
func (e CompleteTaskResponseValidationError) Error() string
Error satisfies the builtin error interface
func (CompleteTaskResponseValidationError) ErrorName ¶
func (e CompleteTaskResponseValidationError) ErrorName() string
ErrorName returns error name.
func (CompleteTaskResponseValidationError) Field ¶
func (e CompleteTaskResponseValidationError) Field() string
Field function returns field value.
func (CompleteTaskResponseValidationError) Key ¶
func (e CompleteTaskResponseValidationError) Key() bool
Key function returns key value.
func (CompleteTaskResponseValidationError) Reason ¶
func (e CompleteTaskResponseValidationError) Reason() string
Reason function returns reason value.
type HeartbeatRequest ¶
type HeartbeatRequest struct { // task_id 任务id TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` // heartbeat_time 心跳时间 HeartbeatTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=heartbeat_time,json=heartbeatTime,proto3" json:"heartbeat_time,omitempty"` // contains filtered or unexported fields }
HeartbeatRequest 心跳请求
func (*HeartbeatRequest) Descriptor
deprecated
func (*HeartbeatRequest) Descriptor() ([]byte, []int)
Deprecated: Use HeartbeatRequest.ProtoReflect.Descriptor instead.
func (*HeartbeatRequest) GetHeartbeatTime ¶
func (x *HeartbeatRequest) GetHeartbeatTime() *timestamp.Timestamp
func (*HeartbeatRequest) GetTaskId ¶
func (x *HeartbeatRequest) GetTaskId() string
func (*HeartbeatRequest) ProtoMessage ¶
func (*HeartbeatRequest) ProtoMessage()
func (*HeartbeatRequest) ProtoReflect ¶
func (x *HeartbeatRequest) ProtoReflect() protoreflect.Message
func (*HeartbeatRequest) Reset ¶
func (x *HeartbeatRequest) Reset()
func (*HeartbeatRequest) String ¶
func (x *HeartbeatRequest) String() string
func (*HeartbeatRequest) Validate ¶
func (m *HeartbeatRequest) Validate() error
Validate checks the field values on HeartbeatRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type HeartbeatRequestValidationError ¶
type HeartbeatRequestValidationError struct {
// contains filtered or unexported fields
}
HeartbeatRequestValidationError is the validation error returned by HeartbeatRequest.Validate if the designated constraints aren't met.
func (HeartbeatRequestValidationError) Cause ¶
func (e HeartbeatRequestValidationError) Cause() error
Cause function returns cause value.
func (HeartbeatRequestValidationError) Error ¶
func (e HeartbeatRequestValidationError) Error() string
Error satisfies the builtin error interface
func (HeartbeatRequestValidationError) ErrorName ¶
func (e HeartbeatRequestValidationError) ErrorName() string
ErrorName returns error name.
func (HeartbeatRequestValidationError) Field ¶
func (e HeartbeatRequestValidationError) Field() string
Field function returns field value.
func (HeartbeatRequestValidationError) Key ¶
func (e HeartbeatRequestValidationError) Key() bool
Key function returns key value.
func (HeartbeatRequestValidationError) Reason ¶
func (e HeartbeatRequestValidationError) Reason() string
Reason function returns reason value.
type HeartbeatResponse ¶
type HeartbeatResponse struct {
// contains filtered or unexported fields
}
HeartbeatResponse 心跳响应
func (*HeartbeatResponse) Descriptor
deprecated
func (*HeartbeatResponse) Descriptor() ([]byte, []int)
Deprecated: Use HeartbeatResponse.ProtoReflect.Descriptor instead.
func (*HeartbeatResponse) ProtoMessage ¶
func (*HeartbeatResponse) ProtoMessage()
func (*HeartbeatResponse) ProtoReflect ¶
func (x *HeartbeatResponse) ProtoReflect() protoreflect.Message
func (*HeartbeatResponse) Reset ¶
func (x *HeartbeatResponse) Reset()
func (*HeartbeatResponse) String ¶
func (x *HeartbeatResponse) String() string
func (*HeartbeatResponse) Validate ¶
func (m *HeartbeatResponse) Validate() error
Validate checks the field values on HeartbeatResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type HeartbeatResponseValidationError ¶
type HeartbeatResponseValidationError struct {
// contains filtered or unexported fields
}
HeartbeatResponseValidationError is the validation error returned by HeartbeatResponse.Validate if the designated constraints aren't met.
func (HeartbeatResponseValidationError) Cause ¶
func (e HeartbeatResponseValidationError) Cause() error
Cause function returns cause value.
func (HeartbeatResponseValidationError) Error ¶
func (e HeartbeatResponseValidationError) Error() string
Error satisfies the builtin error interface
func (HeartbeatResponseValidationError) ErrorName ¶
func (e HeartbeatResponseValidationError) ErrorName() string
ErrorName returns error name.
func (HeartbeatResponseValidationError) Field ¶
func (e HeartbeatResponseValidationError) Field() string
Field function returns field value.
func (HeartbeatResponseValidationError) Key ¶
func (e HeartbeatResponseValidationError) Key() bool
Key function returns key value.
func (HeartbeatResponseValidationError) Reason ¶
func (e HeartbeatResponseValidationError) Reason() string
Reason function returns reason value.
type ScheduleRequest ¶
type ScheduleRequest struct { // schedule_id 调度id,全局唯一。worker需要定时上报该id的状态 ScheduleId string `protobuf:"bytes,1,opt,name=schedule_id,json=scheduleId,proto3" json:"schedule_id,omitempty"` // task 任务内容 Task *job.Task `protobuf:"bytes,2,opt,name=task,proto3" json:"task,omitempty"` // heartbeat_interval 心跳间隔 HeartbeatInterval *duration.Duration `protobuf:"bytes,3,opt,name=heartbeat_interval,json=heartbeatInterval,proto3" json:"heartbeat_interval,omitempty"` // heartbeat_timeout 心跳超时时间 HeartbeatTimeout *duration.Duration `protobuf:"bytes,4,opt,name=heartbeat_timeout,json=heartbeatTimeout,proto3" json:"heartbeat_timeout,omitempty"` // report 心跳或者上报的目标地址 Report *common.Target `protobuf:"bytes,5,opt,name=report,proto3" json:"report,omitempty"` // last_task_result 上一个task的执行结果,如果是第一个task,则该值会为空 LastTaskResult *any.Any `protobuf:"bytes,6,opt,name=last_task_result,json=lastTaskResult,proto3" json:"last_task_result,omitempty"` // contains filtered or unexported fields }
func (*ScheduleRequest) Descriptor
deprecated
func (*ScheduleRequest) Descriptor() ([]byte, []int)
Deprecated: Use ScheduleRequest.ProtoReflect.Descriptor instead.
func (*ScheduleRequest) GetHeartbeatInterval ¶
func (x *ScheduleRequest) GetHeartbeatInterval() *duration.Duration
func (*ScheduleRequest) GetHeartbeatTimeout ¶
func (x *ScheduleRequest) GetHeartbeatTimeout() *duration.Duration
func (*ScheduleRequest) GetLastTaskResult ¶
func (x *ScheduleRequest) GetLastTaskResult() *any.Any
func (*ScheduleRequest) GetReport ¶
func (x *ScheduleRequest) GetReport() *common.Target
func (*ScheduleRequest) GetScheduleId ¶
func (x *ScheduleRequest) GetScheduleId() string
func (*ScheduleRequest) GetTask ¶
func (x *ScheduleRequest) GetTask() *job.Task
func (*ScheduleRequest) ProtoMessage ¶
func (*ScheduleRequest) ProtoMessage()
func (*ScheduleRequest) ProtoReflect ¶
func (x *ScheduleRequest) ProtoReflect() protoreflect.Message
func (*ScheduleRequest) Reset ¶
func (x *ScheduleRequest) Reset()
func (*ScheduleRequest) String ¶
func (x *ScheduleRequest) String() string
func (*ScheduleRequest) Validate ¶
func (m *ScheduleRequest) Validate() error
Validate checks the field values on ScheduleRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type ScheduleRequestValidationError ¶
type ScheduleRequestValidationError struct {
// contains filtered or unexported fields
}
ScheduleRequestValidationError is the validation error returned by ScheduleRequest.Validate if the designated constraints aren't met.
func (ScheduleRequestValidationError) Cause ¶
func (e ScheduleRequestValidationError) Cause() error
Cause function returns cause value.
func (ScheduleRequestValidationError) Error ¶
func (e ScheduleRequestValidationError) Error() string
Error satisfies the builtin error interface
func (ScheduleRequestValidationError) ErrorName ¶
func (e ScheduleRequestValidationError) ErrorName() string
ErrorName returns error name.
func (ScheduleRequestValidationError) Field ¶
func (e ScheduleRequestValidationError) Field() string
Field function returns field value.
func (ScheduleRequestValidationError) Key ¶
func (e ScheduleRequestValidationError) Key() bool
Key function returns key value.
func (ScheduleRequestValidationError) Reason ¶
func (e ScheduleRequestValidationError) Reason() string
Reason function returns reason value.
type ScheduleResponse ¶
type ScheduleResponse struct {
// contains filtered or unexported fields
}
func (*ScheduleResponse) Descriptor
deprecated
func (*ScheduleResponse) Descriptor() ([]byte, []int)
Deprecated: Use ScheduleResponse.ProtoReflect.Descriptor instead.
func (*ScheduleResponse) ProtoMessage ¶
func (*ScheduleResponse) ProtoMessage()
func (*ScheduleResponse) ProtoReflect ¶
func (x *ScheduleResponse) ProtoReflect() protoreflect.Message
func (*ScheduleResponse) Reset ¶
func (x *ScheduleResponse) Reset()
func (*ScheduleResponse) String ¶
func (x *ScheduleResponse) String() string
func (*ScheduleResponse) Validate ¶
func (m *ScheduleResponse) Validate() error
Validate checks the field values on ScheduleResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type ScheduleResponseValidationError ¶
type ScheduleResponseValidationError struct {
// contains filtered or unexported fields
}
ScheduleResponseValidationError is the validation error returned by ScheduleResponse.Validate if the designated constraints aren't met.
func (ScheduleResponseValidationError) Cause ¶
func (e ScheduleResponseValidationError) Cause() error
Cause function returns cause value.
func (ScheduleResponseValidationError) Error ¶
func (e ScheduleResponseValidationError) Error() string
Error satisfies the builtin error interface
func (ScheduleResponseValidationError) ErrorName ¶
func (e ScheduleResponseValidationError) ErrorName() string
ErrorName returns error name.
func (ScheduleResponseValidationError) Field ¶
func (e ScheduleResponseValidationError) Field() string
Field function returns field value.
func (ScheduleResponseValidationError) Key ¶
func (e ScheduleResponseValidationError) Key() bool
Key function returns key value.
func (ScheduleResponseValidationError) Reason ¶
func (e ScheduleResponseValidationError) Reason() string
Reason function returns reason value.
type SchedulerClient ¶
type SchedulerClient interface { // Schedule 执行任务 Schedule(ctx context.Context, in *ScheduleRequest, opts ...grpc.CallOption) (*ScheduleResponse, error) // Heartbeat 心跳 Heartbeat(ctx context.Context, in *HeartbeatRequest, opts ...grpc.CallOption) (*HeartbeatResponse, error) // SetFailTask 任务失败 SetFailTask(ctx context.Context, in *SetFailTaskRequest, opts ...grpc.CallOption) (*SetFailTaskResponse, error) // CompleteTask 完成任务 CompleteTask(ctx context.Context, in *CompleteTaskRequest, opts ...grpc.CallOption) (*CompleteTaskResponse, error) }
SchedulerClient is the client API for Scheduler service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewSchedulerClient ¶
func NewSchedulerClient(cc grpc.ClientConnInterface) SchedulerClient
type SchedulerServer ¶
type SchedulerServer interface { // Schedule 执行任务 Schedule(context.Context, *ScheduleRequest) (*ScheduleResponse, error) // Heartbeat 心跳 Heartbeat(context.Context, *HeartbeatRequest) (*HeartbeatResponse, error) // SetFailTask 任务失败 SetFailTask(context.Context, *SetFailTaskRequest) (*SetFailTaskResponse, error) // CompleteTask 完成任务 CompleteTask(context.Context, *CompleteTaskRequest) (*CompleteTaskResponse, error) }
SchedulerServer is the server API for Scheduler service.
type SetFailTaskRequest ¶
type SetFailTaskRequest struct { // task_id 任务id TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` // now 完成时间 Now *timestamp.Timestamp `protobuf:"bytes,2,opt,name=now,proto3" json:"now,omitempty"` // reason 失败原因 Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"` // contains filtered or unexported fields }
func (*SetFailTaskRequest) Descriptor
deprecated
func (*SetFailTaskRequest) Descriptor() ([]byte, []int)
Deprecated: Use SetFailTaskRequest.ProtoReflect.Descriptor instead.
func (*SetFailTaskRequest) GetNow ¶
func (x *SetFailTaskRequest) GetNow() *timestamp.Timestamp
func (*SetFailTaskRequest) GetReason ¶
func (x *SetFailTaskRequest) GetReason() string
func (*SetFailTaskRequest) GetTaskId ¶
func (x *SetFailTaskRequest) GetTaskId() string
func (*SetFailTaskRequest) ProtoMessage ¶
func (*SetFailTaskRequest) ProtoMessage()
func (*SetFailTaskRequest) ProtoReflect ¶
func (x *SetFailTaskRequest) ProtoReflect() protoreflect.Message
func (*SetFailTaskRequest) Reset ¶
func (x *SetFailTaskRequest) Reset()
func (*SetFailTaskRequest) String ¶
func (x *SetFailTaskRequest) String() string
func (*SetFailTaskRequest) Validate ¶
func (m *SetFailTaskRequest) Validate() error
Validate checks the field values on SetFailTaskRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type SetFailTaskRequestValidationError ¶
type SetFailTaskRequestValidationError struct {
// contains filtered or unexported fields
}
SetFailTaskRequestValidationError is the validation error returned by SetFailTaskRequest.Validate if the designated constraints aren't met.
func (SetFailTaskRequestValidationError) Cause ¶
func (e SetFailTaskRequestValidationError) Cause() error
Cause function returns cause value.
func (SetFailTaskRequestValidationError) Error ¶
func (e SetFailTaskRequestValidationError) Error() string
Error satisfies the builtin error interface
func (SetFailTaskRequestValidationError) ErrorName ¶
func (e SetFailTaskRequestValidationError) ErrorName() string
ErrorName returns error name.
func (SetFailTaskRequestValidationError) Field ¶
func (e SetFailTaskRequestValidationError) Field() string
Field function returns field value.
func (SetFailTaskRequestValidationError) Key ¶
func (e SetFailTaskRequestValidationError) Key() bool
Key function returns key value.
func (SetFailTaskRequestValidationError) Reason ¶
func (e SetFailTaskRequestValidationError) Reason() string
Reason function returns reason value.
type SetFailTaskResponse ¶
type SetFailTaskResponse struct {
// contains filtered or unexported fields
}
func (*SetFailTaskResponse) Descriptor
deprecated
func (*SetFailTaskResponse) Descriptor() ([]byte, []int)
Deprecated: Use SetFailTaskResponse.ProtoReflect.Descriptor instead.
func (*SetFailTaskResponse) ProtoMessage ¶
func (*SetFailTaskResponse) ProtoMessage()
func (*SetFailTaskResponse) ProtoReflect ¶
func (x *SetFailTaskResponse) ProtoReflect() protoreflect.Message
func (*SetFailTaskResponse) Reset ¶
func (x *SetFailTaskResponse) Reset()
func (*SetFailTaskResponse) String ¶
func (x *SetFailTaskResponse) String() string
func (*SetFailTaskResponse) Validate ¶
func (m *SetFailTaskResponse) Validate() error
Validate checks the field values on SetFailTaskResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type SetFailTaskResponseValidationError ¶
type SetFailTaskResponseValidationError struct {
// contains filtered or unexported fields
}
SetFailTaskResponseValidationError is the validation error returned by SetFailTaskResponse.Validate if the designated constraints aren't met.
func (SetFailTaskResponseValidationError) Cause ¶
func (e SetFailTaskResponseValidationError) Cause() error
Cause function returns cause value.
func (SetFailTaskResponseValidationError) Error ¶
func (e SetFailTaskResponseValidationError) Error() string
Error satisfies the builtin error interface
func (SetFailTaskResponseValidationError) ErrorName ¶
func (e SetFailTaskResponseValidationError) ErrorName() string
ErrorName returns error name.
func (SetFailTaskResponseValidationError) Field ¶
func (e SetFailTaskResponseValidationError) Field() string
Field function returns field value.
func (SetFailTaskResponseValidationError) Key ¶
func (e SetFailTaskResponseValidationError) Key() bool
Key function returns key value.
func (SetFailTaskResponseValidationError) Reason ¶
func (e SetFailTaskResponseValidationError) Reason() string
Reason function returns reason value.
type UnimplementedSchedulerServer ¶
type UnimplementedSchedulerServer struct { }
UnimplementedSchedulerServer can be embedded to have forward compatible implementations.
func (*UnimplementedSchedulerServer) CompleteTask ¶
func (*UnimplementedSchedulerServer) CompleteTask(context.Context, *CompleteTaskRequest) (*CompleteTaskResponse, error)
func (*UnimplementedSchedulerServer) Heartbeat ¶
func (*UnimplementedSchedulerServer) Heartbeat(context.Context, *HeartbeatRequest) (*HeartbeatResponse, error)
func (*UnimplementedSchedulerServer) Schedule ¶
func (*UnimplementedSchedulerServer) Schedule(context.Context, *ScheduleRequest) (*ScheduleResponse, error)
func (*UnimplementedSchedulerServer) SetFailTask ¶
func (*UnimplementedSchedulerServer) SetFailTask(context.Context, *SetFailTaskRequest) (*SetFailTaskResponse, error)