Documentation
¶
Index ¶
- Constants
- Variables
- type Task
- func (*Task) Descriptor() ([]byte, []int)deprecated
- func (x *Task) GetMaxRetry() int32
- func (x *Task) GetPayloadType() Task_PayloadType
- func (x *Task) GetRetention() int32
- func (x *Task) GetTimeout() int32
- func (x *Task) GetTypename() string
- func (x *Task) GetUnique() int32
- func (*Task) ProtoMessage()
- func (x *Task) ProtoReflect() protoreflect.Message
- func (x *Task) Reset()
- func (x *Task) String() string
- type Task_PayloadType
- func (Task_PayloadType) Descriptor() protoreflect.EnumDescriptor
- func (x Task_PayloadType) Enum() *Task_PayloadType
- func (Task_PayloadType) EnumDescriptor() ([]byte, []int)deprecated
- func (x Task_PayloadType) Number() protoreflect.EnumNumber
- func (x Task_PayloadType) String() string
- func (Task_PayloadType) Type() protoreflect.EnumType
- func (x *Task_PayloadType) UnmarshalJSON(b []byte) errordeprecated
Constants ¶
View Source
const (
Default_Task_PayloadType = Task_Protobuf
)
Default values for Task fields.
Variables ¶
View Source
var ( Task_PayloadType_name = map[int32]string{ 0: "Protobuf", 1: "JSON", } Task_PayloadType_value = map[string]int32{ "Protobuf": 0, "JSON": 1, } )
Enum value maps for Task_PayloadType.
View Source
var (
// optional asynq.Task task = 567890;
E_Task = &file_asynq_asynq_proto_extTypes[0]
)
Extension fields to descriptorpb.MethodOptions.
View Source
var File_asynq_asynq_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Task ¶
type Task struct { // typename indicates the type of task to be performed. Typename *string `protobuf:"bytes,1,req,name=typename" json:"typename,omitempty"` // specify how long a task may run. // If the timeout elapses before the Handler returns, then the task // will be retried. // // Zero duration means no limit. // // If there's a conflicting Deadline option, whichever comes earliest // will be used. Timeout *int32 `protobuf:"varint,2,opt,name=timeout" json:"timeout,omitempty"` // specify the max number of times // the task will be retried. // // Negative retry count is treated as zero retry. MaxRetry *int32 `protobuf:"varint,3,opt,name=max_retry,json=maxRetry" json:"max_retry,omitempty"` // specify the duration of retention period for the task. // If this option is provided, the task will be stored as a completed task after successful processing. // A completed task will be deleted after the specified duration elapses. Retention *int32 `protobuf:"varint,4,opt,name=retention" json:"retention,omitempty"` // unique option to enqueue a task only if the given task is unique. // Task enqueued with this option is guaranteed to be unique within the given ttl. // Once the task gets processed successfully or once the TTL has expired, another task with the same uniqueness may be enqueued. // ErrDuplicateTask error is returned when enqueueing a duplicate task. // TTL duration must be greater than or equal to 1 second. // // Uniqueness of a task is based on the following properties: // - Task Type // - Task Payload // - Queue Name Unique *int32 `protobuf:"varint,5,opt,name=unique" json:"unique,omitempty"` PayloadType *Task_PayloadType `protobuf:"varint,6,opt,name=payload_type,json=payloadType,enum=asynq.Task_PayloadType,def=0" json:"payload_type,omitempty"` // contains filtered or unexported fields }
func (*Task) Descriptor
deprecated
func (*Task) GetMaxRetry ¶
func (*Task) GetPayloadType ¶
func (x *Task) GetPayloadType() Task_PayloadType
func (*Task) GetRetention ¶
func (*Task) GetTimeout ¶
func (*Task) GetTypename ¶
func (*Task) ProtoMessage ¶
func (*Task) ProtoMessage()
func (*Task) ProtoReflect ¶
func (x *Task) ProtoReflect() protoreflect.Message
type Task_PayloadType ¶
type Task_PayloadType int32
const ( Task_Protobuf Task_PayloadType = 0 Task_JSON Task_PayloadType = 1 )
func (Task_PayloadType) Descriptor ¶
func (Task_PayloadType) Descriptor() protoreflect.EnumDescriptor
func (Task_PayloadType) Enum ¶
func (x Task_PayloadType) Enum() *Task_PayloadType
func (Task_PayloadType) EnumDescriptor
deprecated
func (Task_PayloadType) EnumDescriptor() ([]byte, []int)
Deprecated: Use Task_PayloadType.Descriptor instead.
func (Task_PayloadType) Number ¶
func (x Task_PayloadType) Number() protoreflect.EnumNumber
func (Task_PayloadType) String ¶
func (x Task_PayloadType) String() string
func (Task_PayloadType) Type ¶
func (Task_PayloadType) Type() protoreflect.EnumType
func (*Task_PayloadType) UnmarshalJSON
deprecated
func (x *Task_PayloadType) UnmarshalJSON(b []byte) error
Deprecated: Do not use.
Click to show internal directories.
Click to hide internal directories.