Documentation ¶
Index ¶
- Variables
- func RegisterTimerServer(s *grpc.Server, srv TimerServer)
- type InquireJobRequest
- func (*InquireJobRequest) Descriptor() ([]byte, []int)deprecated
- func (x *InquireJobRequest) GetAppId() string
- func (x *InquireJobRequest) GetJobId() string
- func (*InquireJobRequest) ProtoMessage()
- func (x *InquireJobRequest) ProtoReflect() protoreflect.Message
- func (x *InquireJobRequest) Reset()
- func (x *InquireJobRequest) String() string
- func (m *InquireJobRequest) Validate() error
- type InquireJobRequestValidationError
- func (e InquireJobRequestValidationError) Cause() error
- func (e InquireJobRequestValidationError) Error() string
- func (e InquireJobRequestValidationError) ErrorName() string
- func (e InquireJobRequestValidationError) Field() string
- func (e InquireJobRequestValidationError) Key() bool
- func (e InquireJobRequestValidationError) Reason() string
- type InquireJobResponse
- func (*InquireJobResponse) Descriptor() ([]byte, []int)deprecated
- func (x *InquireJobResponse) GetId() string
- func (x *InquireJobResponse) GetJob() *Job
- func (x *InquireJobResponse) GetStatus() Status
- func (*InquireJobResponse) ProtoMessage()
- func (x *InquireJobResponse) ProtoReflect() protoreflect.Message
- func (x *InquireJobResponse) Reset()
- func (x *InquireJobResponse) String() string
- func (m *InquireJobResponse) Validate() error
- type InquireJobResponseValidationError
- func (e InquireJobResponseValidationError) Cause() error
- func (e InquireJobResponseValidationError) Error() string
- func (e InquireJobResponseValidationError) ErrorName() string
- func (e InquireJobResponseValidationError) Field() string
- func (e InquireJobResponseValidationError) Key() bool
- func (e InquireJobResponseValidationError) Reason() string
- type InquireTaskRequest
- func (*InquireTaskRequest) Descriptor() ([]byte, []int)deprecated
- func (x *InquireTaskRequest) GetAppId() string
- func (x *InquireTaskRequest) GetTaskId() string
- func (*InquireTaskRequest) ProtoMessage()
- func (x *InquireTaskRequest) ProtoReflect() protoreflect.Message
- func (x *InquireTaskRequest) Reset()
- func (x *InquireTaskRequest) String() string
- func (m *InquireTaskRequest) Validate() error
- type InquireTaskRequestValidationError
- func (e InquireTaskRequestValidationError) Cause() error
- func (e InquireTaskRequestValidationError) Error() string
- func (e InquireTaskRequestValidationError) ErrorName() string
- func (e InquireTaskRequestValidationError) Field() string
- func (e InquireTaskRequestValidationError) Key() bool
- func (e InquireTaskRequestValidationError) Reason() string
- type InquireTaskResponse
- func (*InquireTaskResponse) Descriptor() ([]byte, []int)deprecated
- func (x *InquireTaskResponse) GetId() string
- func (x *InquireTaskResponse) GetStatus() Status
- func (x *InquireTaskResponse) GetTask() *Task
- func (*InquireTaskResponse) ProtoMessage()
- func (x *InquireTaskResponse) ProtoReflect() protoreflect.Message
- func (x *InquireTaskResponse) Reset()
- func (x *InquireTaskResponse) String() string
- func (m *InquireTaskResponse) Validate() error
- type InquireTaskResponseValidationError
- func (e InquireTaskResponseValidationError) Cause() error
- func (e InquireTaskResponseValidationError) Error() string
- func (e InquireTaskResponseValidationError) ErrorName() string
- func (e InquireTaskResponseValidationError) Field() string
- func (e InquireTaskResponseValidationError) Key() bool
- func (e InquireTaskResponseValidationError) Reason() string
- type Job
- func (*Job) Descriptor() ([]byte, []int)deprecated
- func (x *Job) GetExpire() *common.Expire
- func (x *Job) GetJobId() string
- func (x *Job) GetTaskStrategy() Job_TaskStrategy
- func (x *Job) GetTasks() []*Task
- func (*Job) ProtoMessage()
- func (x *Job) ProtoReflect() protoreflect.Message
- func (x *Job) Reset()
- func (x *Job) String() string
- func (m *Job) Validate() error
- type JobValidationError
- type Job_TaskStrategy
- func (Job_TaskStrategy) Descriptor() protoreflect.EnumDescriptor
- func (x Job_TaskStrategy) Enum() *Job_TaskStrategy
- func (Job_TaskStrategy) EnumDescriptor() ([]byte, []int)deprecated
- func (x Job_TaskStrategy) Number() protoreflect.EnumNumber
- func (x Job_TaskStrategy) String() string
- func (Job_TaskStrategy) Type() protoreflect.EnumType
- type PutTimerJobRequest
- func (*PutTimerJobRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PutTimerJobRequest) GetAppId() string
- func (x *PutTimerJobRequest) GetCallback() *common.Target
- func (x *PutTimerJobRequest) GetJob() *Job
- func (*PutTimerJobRequest) ProtoMessage()
- func (x *PutTimerJobRequest) ProtoReflect() protoreflect.Message
- func (x *PutTimerJobRequest) Reset()
- func (x *PutTimerJobRequest) String() string
- func (m *PutTimerJobRequest) Validate() error
- type PutTimerJobRequestValidationError
- func (e PutTimerJobRequestValidationError) Cause() error
- func (e PutTimerJobRequestValidationError) Error() string
- func (e PutTimerJobRequestValidationError) ErrorName() string
- func (e PutTimerJobRequestValidationError) Field() string
- func (e PutTimerJobRequestValidationError) Key() bool
- func (e PutTimerJobRequestValidationError) Reason() string
- type PutTimerJobResponse
- func (*PutTimerJobResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PutTimerJobResponse) GetId() string
- func (x *PutTimerJobResponse) GetStatus() Status
- func (*PutTimerJobResponse) ProtoMessage()
- func (x *PutTimerJobResponse) ProtoReflect() protoreflect.Message
- func (x *PutTimerJobResponse) Reset()
- func (x *PutTimerJobResponse) String() string
- func (m *PutTimerJobResponse) Validate() error
- type PutTimerJobResponseValidationError
- func (e PutTimerJobResponseValidationError) Cause() error
- func (e PutTimerJobResponseValidationError) Error() string
- func (e PutTimerJobResponseValidationError) ErrorName() string
- func (e PutTimerJobResponseValidationError) Field() string
- func (e PutTimerJobResponseValidationError) Key() bool
- func (e PutTimerJobResponseValidationError) Reason() string
- type Status
- type Task
- func (*Task) Descriptor() ([]byte, []int)deprecated
- func (x *Task) GetId() string
- func (x *Task) GetJobId() string
- func (x *Task) GetLastTaskResult() *any.Any
- func (x *Task) GetReason() string
- func (x *Task) GetResult() *any.Any
- func (x *Task) GetTarget() *common.Target
- func (x *Task) GetTaskContent() *any.Any
- func (x *Task) GetTaskId() string
- func (x *Task) GetTaskName() string
- func (*Task) ProtoMessage()
- func (x *Task) ProtoReflect() protoreflect.Message
- func (x *Task) Reset()
- func (x *Task) String() string
- func (m *Task) Validate() error
- type TaskValidationError
- type TimerClient
- type TimerServer
- type UnimplementedTimerServer
- func (*UnimplementedTimerServer) InquireJob(context.Context, *InquireJobRequest) (*InquireJobResponse, error)
- func (*UnimplementedTimerServer) InquireTask(context.Context, *InquireJobRequest) (*InquireJobResponse, error)
- func (*UnimplementedTimerServer) PutTimerJob(context.Context, *PutTimerJobRequest) (*PutTimerJobResponse, error)
Constants ¶
This section is empty.
Variables ¶
var ( Status_name = map[int32]string{ 0: "UNKNOWN", 1: "PENDING", 2: "RUNNING", 3: "COMPLETE", 4: "FAILED", } Status_value = map[string]int32{ "UNKNOWN": 0, "PENDING": 1, "RUNNING": 2, "COMPLETE": 3, "FAILED": 4, } )
Enum value maps for Status.
var ( Job_TaskStrategy_name = map[int32]string{ 0: "SERIAL", 1: "PARALLEL", } Job_TaskStrategy_value = map[string]int32{ "SERIAL": 0, "PARALLEL": 1, } )
Enum value maps for Job_TaskStrategy.
var File_job_job_proto protoreflect.FileDescriptor
Functions ¶
func RegisterTimerServer ¶
func RegisterTimerServer(s *grpc.Server, srv TimerServer)
Types ¶
type InquireJobRequest ¶
type InquireJobRequest struct { // app_id 应用id AppId string `protobuf:"bytes,1,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` // job_id job id JobId string `protobuf:"bytes,2,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` // contains filtered or unexported fields }
InquireJobRequest 检查job状态请求
func (*InquireJobRequest) Descriptor
deprecated
func (*InquireJobRequest) Descriptor() ([]byte, []int)
Deprecated: Use InquireJobRequest.ProtoReflect.Descriptor instead.
func (*InquireJobRequest) GetAppId ¶
func (x *InquireJobRequest) GetAppId() string
func (*InquireJobRequest) GetJobId ¶
func (x *InquireJobRequest) GetJobId() string
func (*InquireJobRequest) ProtoMessage ¶
func (*InquireJobRequest) ProtoMessage()
func (*InquireJobRequest) ProtoReflect ¶
func (x *InquireJobRequest) ProtoReflect() protoreflect.Message
func (*InquireJobRequest) Reset ¶
func (x *InquireJobRequest) Reset()
func (*InquireJobRequest) String ¶
func (x *InquireJobRequest) String() string
func (*InquireJobRequest) Validate ¶
func (m *InquireJobRequest) Validate() error
Validate checks the field values on InquireJobRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type InquireJobRequestValidationError ¶
type InquireJobRequestValidationError struct {
// contains filtered or unexported fields
}
InquireJobRequestValidationError is the validation error returned by InquireJobRequest.Validate if the designated constraints aren't met.
func (InquireJobRequestValidationError) Cause ¶
func (e InquireJobRequestValidationError) Cause() error
Cause function returns cause value.
func (InquireJobRequestValidationError) Error ¶
func (e InquireJobRequestValidationError) Error() string
Error satisfies the builtin error interface
func (InquireJobRequestValidationError) ErrorName ¶
func (e InquireJobRequestValidationError) ErrorName() string
ErrorName returns error name.
func (InquireJobRequestValidationError) Field ¶
func (e InquireJobRequestValidationError) Field() string
Field function returns field value.
func (InquireJobRequestValidationError) Key ¶
func (e InquireJobRequestValidationError) Key() bool
Key function returns key value.
func (InquireJobRequestValidationError) Reason ¶
func (e InquireJobRequestValidationError) Reason() string
Reason function returns reason value.
type InquireJobResponse ¶
type InquireJobResponse struct { // id 定时器内部id Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // job 工作内容 Job *Job `protobuf:"bytes,2,opt,name=job,proto3" json:"job,omitempty"` // status job状态 Status Status `protobuf:"varint,3,opt,name=status,proto3,enum=job.Status" json:"status,omitempty"` // contains filtered or unexported fields }
InquireJobResponse 检查job状态响应
func (*InquireJobResponse) Descriptor
deprecated
func (*InquireJobResponse) Descriptor() ([]byte, []int)
Deprecated: Use InquireJobResponse.ProtoReflect.Descriptor instead.
func (*InquireJobResponse) GetId ¶
func (x *InquireJobResponse) GetId() string
func (*InquireJobResponse) GetJob ¶
func (x *InquireJobResponse) GetJob() *Job
func (*InquireJobResponse) GetStatus ¶
func (x *InquireJobResponse) GetStatus() Status
func (*InquireJobResponse) ProtoMessage ¶
func (*InquireJobResponse) ProtoMessage()
func (*InquireJobResponse) ProtoReflect ¶
func (x *InquireJobResponse) ProtoReflect() protoreflect.Message
func (*InquireJobResponse) Reset ¶
func (x *InquireJobResponse) Reset()
func (*InquireJobResponse) String ¶
func (x *InquireJobResponse) String() string
func (*InquireJobResponse) Validate ¶
func (m *InquireJobResponse) Validate() error
Validate checks the field values on InquireJobResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type InquireJobResponseValidationError ¶
type InquireJobResponseValidationError struct {
// contains filtered or unexported fields
}
InquireJobResponseValidationError is the validation error returned by InquireJobResponse.Validate if the designated constraints aren't met.
func (InquireJobResponseValidationError) Cause ¶
func (e InquireJobResponseValidationError) Cause() error
Cause function returns cause value.
func (InquireJobResponseValidationError) Error ¶
func (e InquireJobResponseValidationError) Error() string
Error satisfies the builtin error interface
func (InquireJobResponseValidationError) ErrorName ¶
func (e InquireJobResponseValidationError) ErrorName() string
ErrorName returns error name.
func (InquireJobResponseValidationError) Field ¶
func (e InquireJobResponseValidationError) Field() string
Field function returns field value.
func (InquireJobResponseValidationError) Key ¶
func (e InquireJobResponseValidationError) Key() bool
Key function returns key value.
func (InquireJobResponseValidationError) Reason ¶
func (e InquireJobResponseValidationError) Reason() string
Reason function returns reason value.
type InquireTaskRequest ¶
type InquireTaskRequest struct { // app_id 应用id AppId string `protobuf:"bytes,1,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` // job_id job id TaskId string `protobuf:"bytes,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` // contains filtered or unexported fields }
InquireTaskRequest 查询task请求
func (*InquireTaskRequest) Descriptor
deprecated
func (*InquireTaskRequest) Descriptor() ([]byte, []int)
Deprecated: Use InquireTaskRequest.ProtoReflect.Descriptor instead.
func (*InquireTaskRequest) GetAppId ¶
func (x *InquireTaskRequest) GetAppId() string
func (*InquireTaskRequest) GetTaskId ¶
func (x *InquireTaskRequest) GetTaskId() string
func (*InquireTaskRequest) ProtoMessage ¶
func (*InquireTaskRequest) ProtoMessage()
func (*InquireTaskRequest) ProtoReflect ¶
func (x *InquireTaskRequest) ProtoReflect() protoreflect.Message
func (*InquireTaskRequest) Reset ¶
func (x *InquireTaskRequest) Reset()
func (*InquireTaskRequest) String ¶
func (x *InquireTaskRequest) String() string
func (*InquireTaskRequest) Validate ¶
func (m *InquireTaskRequest) Validate() error
Validate checks the field values on InquireTaskRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type InquireTaskRequestValidationError ¶
type InquireTaskRequestValidationError struct {
// contains filtered or unexported fields
}
InquireTaskRequestValidationError is the validation error returned by InquireTaskRequest.Validate if the designated constraints aren't met.
func (InquireTaskRequestValidationError) Cause ¶
func (e InquireTaskRequestValidationError) Cause() error
Cause function returns cause value.
func (InquireTaskRequestValidationError) Error ¶
func (e InquireTaskRequestValidationError) Error() string
Error satisfies the builtin error interface
func (InquireTaskRequestValidationError) ErrorName ¶
func (e InquireTaskRequestValidationError) ErrorName() string
ErrorName returns error name.
func (InquireTaskRequestValidationError) Field ¶
func (e InquireTaskRequestValidationError) Field() string
Field function returns field value.
func (InquireTaskRequestValidationError) Key ¶
func (e InquireTaskRequestValidationError) Key() bool
Key function returns key value.
func (InquireTaskRequestValidationError) Reason ¶
func (e InquireTaskRequestValidationError) Reason() string
Reason function returns reason value.
type InquireTaskResponse ¶
type InquireTaskResponse struct { // id 定时器内部id Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // task 任务内容 Task *Task `protobuf:"bytes,2,opt,name=task,proto3" json:"task,omitempty"` // status task状态 Status Status `protobuf:"varint,3,opt,name=status,proto3,enum=job.Status" json:"status,omitempty"` // contains filtered or unexported fields }
InquireTaskResponse 查询task响应
func (*InquireTaskResponse) Descriptor
deprecated
func (*InquireTaskResponse) Descriptor() ([]byte, []int)
Deprecated: Use InquireTaskResponse.ProtoReflect.Descriptor instead.
func (*InquireTaskResponse) GetId ¶
func (x *InquireTaskResponse) GetId() string
func (*InquireTaskResponse) GetStatus ¶
func (x *InquireTaskResponse) GetStatus() Status
func (*InquireTaskResponse) GetTask ¶
func (x *InquireTaskResponse) GetTask() *Task
func (*InquireTaskResponse) ProtoMessage ¶
func (*InquireTaskResponse) ProtoMessage()
func (*InquireTaskResponse) ProtoReflect ¶
func (x *InquireTaskResponse) ProtoReflect() protoreflect.Message
func (*InquireTaskResponse) Reset ¶
func (x *InquireTaskResponse) Reset()
func (*InquireTaskResponse) String ¶
func (x *InquireTaskResponse) String() string
func (*InquireTaskResponse) Validate ¶
func (m *InquireTaskResponse) Validate() error
Validate checks the field values on InquireTaskResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type InquireTaskResponseValidationError ¶
type InquireTaskResponseValidationError struct {
// contains filtered or unexported fields
}
InquireTaskResponseValidationError is the validation error returned by InquireTaskResponse.Validate if the designated constraints aren't met.
func (InquireTaskResponseValidationError) Cause ¶
func (e InquireTaskResponseValidationError) Cause() error
Cause function returns cause value.
func (InquireTaskResponseValidationError) Error ¶
func (e InquireTaskResponseValidationError) Error() string
Error satisfies the builtin error interface
func (InquireTaskResponseValidationError) ErrorName ¶
func (e InquireTaskResponseValidationError) ErrorName() string
ErrorName returns error name.
func (InquireTaskResponseValidationError) Field ¶
func (e InquireTaskResponseValidationError) Field() string
Field function returns field value.
func (InquireTaskResponseValidationError) Key ¶
func (e InquireTaskResponseValidationError) Key() bool
Key function returns key value.
func (InquireTaskResponseValidationError) Reason ¶
func (e InquireTaskResponseValidationError) Reason() string
Reason function returns reason value.
type Job ¶
type Job struct { // job_id 任务id,在同个app_id下需要保证任务id的唯一性 JobId string `protobuf:"bytes,2,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` // expire 执行时间 Expire *common.Expire `protobuf:"bytes,3,opt,name=expire,proto3" json:"expire,omitempty"` // tasks 需要执行的任务 Tasks []*Task `protobuf:"bytes,4,rep,name=tasks,proto3" json:"tasks,omitempty"` // task_strategy 当tasks超过1个时,指定执行策略 TaskStrategy Job_TaskStrategy `protobuf:"varint,5,opt,name=task_strategy,json=taskStrategy,proto3,enum=job.Job_TaskStrategy" json:"task_strategy,omitempty"` // contains filtered or unexported fields }
func (*Job) Descriptor
deprecated
func (*Job) GetTaskStrategy ¶
func (x *Job) GetTaskStrategy() Job_TaskStrategy
func (*Job) ProtoMessage ¶
func (*Job) ProtoMessage()
func (*Job) ProtoReflect ¶
func (x *Job) ProtoReflect() protoreflect.Message
type JobValidationError ¶
type JobValidationError struct {
// contains filtered or unexported fields
}
JobValidationError is the validation error returned by Job.Validate if the designated constraints aren't met.
func (JobValidationError) Cause ¶
func (e JobValidationError) Cause() error
Cause function returns cause value.
func (JobValidationError) Error ¶
func (e JobValidationError) Error() string
Error satisfies the builtin error interface
func (JobValidationError) ErrorName ¶
func (e JobValidationError) ErrorName() string
ErrorName returns error name.
func (JobValidationError) Field ¶
func (e JobValidationError) Field() string
Field function returns field value.
func (JobValidationError) Key ¶
func (e JobValidationError) Key() bool
Key function returns key value.
func (JobValidationError) Reason ¶
func (e JobValidationError) Reason() string
Reason function returns reason value.
type Job_TaskStrategy ¶
type Job_TaskStrategy int32
TaskStrategy 任务执行策略
const ( // SERIAL 串行执行 Job_SERIAL Job_TaskStrategy = 0 // PARALLEL 并行执行 Job_PARALLEL Job_TaskStrategy = 1 )
func (Job_TaskStrategy) Descriptor ¶
func (Job_TaskStrategy) Descriptor() protoreflect.EnumDescriptor
func (Job_TaskStrategy) Enum ¶
func (x Job_TaskStrategy) Enum() *Job_TaskStrategy
func (Job_TaskStrategy) EnumDescriptor
deprecated
func (Job_TaskStrategy) EnumDescriptor() ([]byte, []int)
Deprecated: Use Job_TaskStrategy.Descriptor instead.
func (Job_TaskStrategy) Number ¶
func (x Job_TaskStrategy) Number() protoreflect.EnumNumber
func (Job_TaskStrategy) String ¶
func (x Job_TaskStrategy) String() string
func (Job_TaskStrategy) Type ¶
func (Job_TaskStrategy) Type() protoreflect.EnumType
type PutTimerJobRequest ¶
type PutTimerJobRequest struct { // app_id 应用id AppId string `protobuf:"bytes,1,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` // job 任务内容 Job *Job `protobuf:"bytes,2,opt,name=job,proto3" json:"job,omitempty"` // callback 回调 Callback *common.Target `protobuf:"bytes,3,opt,name=callback,proto3" json:"callback,omitempty"` // contains filtered or unexported fields }
PutTimerJobRequest 设置计时任务请求
func (*PutTimerJobRequest) Descriptor
deprecated
func (*PutTimerJobRequest) Descriptor() ([]byte, []int)
Deprecated: Use PutTimerJobRequest.ProtoReflect.Descriptor instead.
func (*PutTimerJobRequest) GetAppId ¶
func (x *PutTimerJobRequest) GetAppId() string
func (*PutTimerJobRequest) GetCallback ¶
func (x *PutTimerJobRequest) GetCallback() *common.Target
func (*PutTimerJobRequest) GetJob ¶
func (x *PutTimerJobRequest) GetJob() *Job
func (*PutTimerJobRequest) ProtoMessage ¶
func (*PutTimerJobRequest) ProtoMessage()
func (*PutTimerJobRequest) ProtoReflect ¶
func (x *PutTimerJobRequest) ProtoReflect() protoreflect.Message
func (*PutTimerJobRequest) Reset ¶
func (x *PutTimerJobRequest) Reset()
func (*PutTimerJobRequest) String ¶
func (x *PutTimerJobRequest) String() string
func (*PutTimerJobRequest) Validate ¶
func (m *PutTimerJobRequest) Validate() error
Validate checks the field values on PutTimerJobRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type PutTimerJobRequestValidationError ¶
type PutTimerJobRequestValidationError struct {
// contains filtered or unexported fields
}
PutTimerJobRequestValidationError is the validation error returned by PutTimerJobRequest.Validate if the designated constraints aren't met.
func (PutTimerJobRequestValidationError) Cause ¶
func (e PutTimerJobRequestValidationError) Cause() error
Cause function returns cause value.
func (PutTimerJobRequestValidationError) Error ¶
func (e PutTimerJobRequestValidationError) Error() string
Error satisfies the builtin error interface
func (PutTimerJobRequestValidationError) ErrorName ¶
func (e PutTimerJobRequestValidationError) ErrorName() string
ErrorName returns error name.
func (PutTimerJobRequestValidationError) Field ¶
func (e PutTimerJobRequestValidationError) Field() string
Field function returns field value.
func (PutTimerJobRequestValidationError) Key ¶
func (e PutTimerJobRequestValidationError) Key() bool
Key function returns key value.
func (PutTimerJobRequestValidationError) Reason ¶
func (e PutTimerJobRequestValidationError) Reason() string
Reason function returns reason value.
type PutTimerJobResponse ¶
type PutTimerJobResponse struct { // id 计时器内部唯一id Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // status 任务状态 Status Status `protobuf:"varint,2,opt,name=status,proto3,enum=job.Status" json:"status,omitempty"` // contains filtered or unexported fields }
PutTimerJobResponse 设置计时任务响应
func (*PutTimerJobResponse) Descriptor
deprecated
func (*PutTimerJobResponse) Descriptor() ([]byte, []int)
Deprecated: Use PutTimerJobResponse.ProtoReflect.Descriptor instead.
func (*PutTimerJobResponse) GetId ¶
func (x *PutTimerJobResponse) GetId() string
func (*PutTimerJobResponse) GetStatus ¶
func (x *PutTimerJobResponse) GetStatus() Status
func (*PutTimerJobResponse) ProtoMessage ¶
func (*PutTimerJobResponse) ProtoMessage()
func (*PutTimerJobResponse) ProtoReflect ¶
func (x *PutTimerJobResponse) ProtoReflect() protoreflect.Message
func (*PutTimerJobResponse) Reset ¶
func (x *PutTimerJobResponse) Reset()
func (*PutTimerJobResponse) String ¶
func (x *PutTimerJobResponse) String() string
func (*PutTimerJobResponse) Validate ¶
func (m *PutTimerJobResponse) Validate() error
Validate checks the field values on PutTimerJobResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type PutTimerJobResponseValidationError ¶
type PutTimerJobResponseValidationError struct {
// contains filtered or unexported fields
}
PutTimerJobResponseValidationError is the validation error returned by PutTimerJobResponse.Validate if the designated constraints aren't met.
func (PutTimerJobResponseValidationError) Cause ¶
func (e PutTimerJobResponseValidationError) Cause() error
Cause function returns cause value.
func (PutTimerJobResponseValidationError) Error ¶
func (e PutTimerJobResponseValidationError) Error() string
Error satisfies the builtin error interface
func (PutTimerJobResponseValidationError) ErrorName ¶
func (e PutTimerJobResponseValidationError) ErrorName() string
ErrorName returns error name.
func (PutTimerJobResponseValidationError) Field ¶
func (e PutTimerJobResponseValidationError) Field() string
Field function returns field value.
func (PutTimerJobResponseValidationError) Key ¶
func (e PutTimerJobResponseValidationError) Key() bool
Key function returns key value.
func (PutTimerJobResponseValidationError) Reason ¶
func (e PutTimerJobResponseValidationError) Reason() string
Reason function returns reason value.
type Status ¶
type Status int32
Status 运行状态
func (Status) Descriptor ¶
func (Status) Descriptor() protoreflect.EnumDescriptor
func (Status) EnumDescriptor
deprecated
func (Status) Number ¶
func (x Status) Number() protoreflect.EnumNumber
func (Status) Type ¶
func (Status) Type() protoreflect.EnumType
type Task ¶
type Task struct { // task_id TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` // target 任务触发时的worker地址 Target *common.Target `protobuf:"bytes,11,opt,name=target,proto3" json:"target,omitempty"` // task_content 任务内容 TaskContent *any.Any `protobuf:"bytes,2,opt,name=task_content,json=taskContent,proto3" json:"task_content,omitempty"` // last_task_result 上一个任务的执行结果(如果是串行执行,且task不是第一个时有值) LastTaskResult *any.Any `protobuf:"bytes,8,opt,name=last_task_result,json=lastTaskResult,proto3" json:"last_task_result,omitempty"` // result 执行结果 Result *any.Any `protobuf:"bytes,3,opt,name=result,proto3" json:"result,omitempty"` // reason 错误详情。如果status=FAILED,则需要回传错误信息 Reason string `protobuf:"bytes,4,opt,name=reason,proto3" json:"reason,omitempty"` // job_id 任务id,在同个app_id下需要保证任务id的唯一性 JobId string `protobuf:"bytes,5,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` // id 内部调度需要使用这个id,在PutJob的时候不要带该ID,因为job_server在接收到请求时会生成一个ID Id string `protobuf:"bytes,6,opt,name=id,proto3" json:"id,omitempty"` // task_name 任务name TaskName string `protobuf:"bytes,7,opt,name=task_name,json=taskName,proto3" json:"task_name,omitempty"` // contains filtered or unexported fields }
Task 任务
func (*Task) Descriptor
deprecated
func (*Task) GetLastTaskResult ¶
func (*Task) GetTaskContent ¶
func (*Task) GetTaskName ¶
func (*Task) ProtoMessage ¶
func (*Task) ProtoMessage()
func (*Task) ProtoReflect ¶
func (x *Task) ProtoReflect() protoreflect.Message
type TaskValidationError ¶
type TaskValidationError struct {
// contains filtered or unexported fields
}
TaskValidationError is the validation error returned by Task.Validate if the designated constraints aren't met.
func (TaskValidationError) Cause ¶
func (e TaskValidationError) Cause() error
Cause function returns cause value.
func (TaskValidationError) Error ¶
func (e TaskValidationError) Error() string
Error satisfies the builtin error interface
func (TaskValidationError) ErrorName ¶
func (e TaskValidationError) ErrorName() string
ErrorName returns error name.
func (TaskValidationError) Field ¶
func (e TaskValidationError) Field() string
Field function returns field value.
func (TaskValidationError) Key ¶
func (e TaskValidationError) Key() bool
Key function returns key value.
func (TaskValidationError) Reason ¶
func (e TaskValidationError) Reason() string
Reason function returns reason value.
type TimerClient ¶
type TimerClient interface { // PutTimerJob 设置计时任务 PutTimerJob(ctx context.Context, in *PutTimerJobRequest, opts ...grpc.CallOption) (*PutTimerJobResponse, error) // InquireJob 检查job状态 InquireJob(ctx context.Context, in *InquireJobRequest, opts ...grpc.CallOption) (*InquireJobResponse, error) // InquireTask 检查task状态 InquireTask(ctx context.Context, in *InquireJobRequest, opts ...grpc.CallOption) (*InquireJobResponse, error) }
TimerClient is the client API for Timer service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewTimerClient ¶
func NewTimerClient(cc grpc.ClientConnInterface) TimerClient
type TimerServer ¶
type TimerServer interface { // PutTimerJob 设置计时任务 PutTimerJob(context.Context, *PutTimerJobRequest) (*PutTimerJobResponse, error) // InquireJob 检查job状态 InquireJob(context.Context, *InquireJobRequest) (*InquireJobResponse, error) // InquireTask 检查task状态 InquireTask(context.Context, *InquireJobRequest) (*InquireJobResponse, error) }
TimerServer is the server API for Timer service.
type UnimplementedTimerServer ¶
type UnimplementedTimerServer struct { }
UnimplementedTimerServer can be embedded to have forward compatible implementations.
func (*UnimplementedTimerServer) InquireJob ¶
func (*UnimplementedTimerServer) InquireJob(context.Context, *InquireJobRequest) (*InquireJobResponse, error)
func (*UnimplementedTimerServer) InquireTask ¶
func (*UnimplementedTimerServer) InquireTask(context.Context, *InquireJobRequest) (*InquireJobResponse, error)
func (*UnimplementedTimerServer) PutTimerJob ¶
func (*UnimplementedTimerServer) PutTimerJob(context.Context, *PutTimerJobRequest) (*PutTimerJobResponse, error)