proto

package
v0.0.0-...-d1ea2b1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_asynq_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type SchedulerEnqueueEvent

type SchedulerEnqueueEvent struct {

	// ID of the task that was enqueued.
	TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
	// Time the task was enqueued.
	EnqueueTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=enqueue_time,json=enqueueTime,proto3" json:"enqueue_time,omitempty"`
	// contains filtered or unexported fields
}

SchedulerEnqueueEvent holds information about an enqueue event by a scheduler.

func (*SchedulerEnqueueEvent) Descriptor deprecated

func (*SchedulerEnqueueEvent) Descriptor() ([]byte, []int)

Deprecated: Use SchedulerEnqueueEvent.ProtoReflect.Descriptor instead.

func (*SchedulerEnqueueEvent) GetEnqueueTime

func (x *SchedulerEnqueueEvent) GetEnqueueTime() *timestamppb.Timestamp

func (*SchedulerEnqueueEvent) GetTaskId

func (x *SchedulerEnqueueEvent) GetTaskId() string

func (*SchedulerEnqueueEvent) ProtoMessage

func (*SchedulerEnqueueEvent) ProtoMessage()

func (*SchedulerEnqueueEvent) ProtoReflect

func (x *SchedulerEnqueueEvent) ProtoReflect() protoreflect.Message

func (*SchedulerEnqueueEvent) Reset

func (x *SchedulerEnqueueEvent) Reset()

func (*SchedulerEnqueueEvent) String

func (x *SchedulerEnqueueEvent) String() string

type SchedulerEntry

type SchedulerEntry struct {

	// Identifier of the scheduler entry.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Periodic schedule spec of the entry.
	Spec string `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"`
	// Task type of the periodic task.
	TaskType string `protobuf:"bytes,3,opt,name=task_type,json=taskType,proto3" json:"task_type,omitempty"`
	// Task payload of the periodic task.
	TaskPayload []byte `protobuf:"bytes,4,opt,name=task_payload,json=taskPayload,proto3" json:"task_payload,omitempty"`
	// Options used to enqueue the periodic task.
	EnqueueOptions []string `protobuf:"bytes,5,rep,name=enqueue_options,json=enqueueOptions,proto3" json:"enqueue_options,omitempty"`
	// Next time the task will be enqueued.
	NextEnqueueTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=next_enqueue_time,json=nextEnqueueTime,proto3" json:"next_enqueue_time,omitempty"`
	// Last time the task was enqueued.
	// Zero time if task was never enqueued.
	PrevEnqueueTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=prev_enqueue_time,json=prevEnqueueTime,proto3" json:"prev_enqueue_time,omitempty"`
	// contains filtered or unexported fields
}

SchedulerEntry holds information about a periodic task registered with a scheduler.

func (*SchedulerEntry) Descriptor deprecated

func (*SchedulerEntry) Descriptor() ([]byte, []int)

Deprecated: Use SchedulerEntry.ProtoReflect.Descriptor instead.

func (*SchedulerEntry) GetEnqueueOptions

func (x *SchedulerEntry) GetEnqueueOptions() []string

func (*SchedulerEntry) GetId

func (x *SchedulerEntry) GetId() string

func (*SchedulerEntry) GetNextEnqueueTime

func (x *SchedulerEntry) GetNextEnqueueTime() *timestamppb.Timestamp

func (*SchedulerEntry) GetPrevEnqueueTime

func (x *SchedulerEntry) GetPrevEnqueueTime() *timestamppb.Timestamp

func (*SchedulerEntry) GetSpec

func (x *SchedulerEntry) GetSpec() string

func (*SchedulerEntry) GetTaskPayload

func (x *SchedulerEntry) GetTaskPayload() []byte

func (*SchedulerEntry) GetTaskType

func (x *SchedulerEntry) GetTaskType() string

func (*SchedulerEntry) ProtoMessage

func (*SchedulerEntry) ProtoMessage()

func (*SchedulerEntry) ProtoReflect

func (x *SchedulerEntry) ProtoReflect() protoreflect.Message

func (*SchedulerEntry) Reset

func (x *SchedulerEntry) Reset()

func (*SchedulerEntry) String

func (x *SchedulerEntry) String() string

type ServerInfo

type ServerInfo struct {

	// Host machine the server is running on.
	Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
	// PID of the server process.
	Pid int32 `protobuf:"varint,2,opt,name=pid,proto3" json:"pid,omitempty"`
	// Unique identifier for this server.
	ServerId string `protobuf:"bytes,3,opt,name=server_id,json=serverId,proto3" json:"server_id,omitempty"`
	// Maximum number of concurrency this server will use.
	Concurrency int32 `protobuf:"varint,4,opt,name=concurrency,proto3" json:"concurrency,omitempty"`
	// List of queue names with their priorities.
	// The server will consume tasks from the queues and prioritize
	// queues with higher priority numbers.
	Queues map[string]int32 `` /* 154-byte string literal not displayed */
	// If set, the server will always consume tasks from a queue with higher
	// priority.
	StrictPriority bool `protobuf:"varint,6,opt,name=strict_priority,json=strictPriority,proto3" json:"strict_priority,omitempty"`
	// Status indicates the status of the server.
	Status string `protobuf:"bytes,7,opt,name=status,proto3" json:"status,omitempty"`
	// Time this server was started.
	StartTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
	// Number of workers currently processing tasks.
	ActiveWorkerCount int32 `protobuf:"varint,9,opt,name=active_worker_count,json=activeWorkerCount,proto3" json:"active_worker_count,omitempty"`
	// contains filtered or unexported fields
}

ServerInfo holds information about a running server.

func (*ServerInfo) Descriptor deprecated

func (*ServerInfo) Descriptor() ([]byte, []int)

Deprecated: Use ServerInfo.ProtoReflect.Descriptor instead.

func (*ServerInfo) GetActiveWorkerCount

func (x *ServerInfo) GetActiveWorkerCount() int32

func (*ServerInfo) GetConcurrency

func (x *ServerInfo) GetConcurrency() int32

func (*ServerInfo) GetHost

func (x *ServerInfo) GetHost() string

func (*ServerInfo) GetPid

func (x *ServerInfo) GetPid() int32

func (*ServerInfo) GetQueues

func (x *ServerInfo) GetQueues() map[string]int32

func (*ServerInfo) GetServerId

func (x *ServerInfo) GetServerId() string

func (*ServerInfo) GetStartTime

func (x *ServerInfo) GetStartTime() *timestamppb.Timestamp

func (*ServerInfo) GetStatus

func (x *ServerInfo) GetStatus() string

func (*ServerInfo) GetStrictPriority

func (x *ServerInfo) GetStrictPriority() bool

func (*ServerInfo) ProtoMessage

func (*ServerInfo) ProtoMessage()

func (*ServerInfo) ProtoReflect

func (x *ServerInfo) ProtoReflect() protoreflect.Message

func (*ServerInfo) Reset

func (x *ServerInfo) Reset()

func (*ServerInfo) String

func (x *ServerInfo) String() string

type TaskMessage

type TaskMessage struct {

	// Type indicates the kind of the task to be performed.
	Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	// Payload holds data needed to process the task.
	Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
	// Unique identifier for the task.
	Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
	// Name of the queue to which this task belongs.
	Queue string `protobuf:"bytes,4,opt,name=queue,proto3" json:"queue,omitempty"`
	// Max number of retries for this task.
	Retry int32 `protobuf:"varint,5,opt,name=retry,proto3" json:"retry,omitempty"`
	// Number of times this task has been retried so far.
	Retried int32 `protobuf:"varint,6,opt,name=retried,proto3" json:"retried,omitempty"`
	// Error message from the last failure.
	ErrorMsg string `protobuf:"bytes,7,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg,omitempty"`
	// Time of last failure in Unix time,
	// the number of seconds elapsed since January 1, 1970 UTC.
	// Use zero to indicate no last failure.
	LastFailedAt int64 `protobuf:"varint,11,opt,name=last_failed_at,json=lastFailedAt,proto3" json:"last_failed_at,omitempty"`
	// Timeout specifies timeout in seconds.
	// Use zero to indicate no timeout.
	Timeout int64 `protobuf:"varint,8,opt,name=timeout,proto3" json:"timeout,omitempty"`
	// Deadline specifies the deadline for the task in Unix time,
	// the number of seconds elapsed since January 1, 1970 UTC.
	// Use zero to indicate no deadline.
	Deadline int64 `protobuf:"varint,9,opt,name=deadline,proto3" json:"deadline,omitempty"`
	// UniqueKey holds the redis key used for uniqueness lock for this task.
	// Empty string indicates that no uniqueness lock was used.
	UniqueKey string `protobuf:"bytes,10,opt,name=unique_key,json=uniqueKey,proto3" json:"unique_key,omitempty"`
	// GroupKey is a name of the group used for task aggregation.
	// This field is optional and empty value means no aggregation for the task.
	GroupKey string `protobuf:"bytes,14,opt,name=group_key,json=groupKey,proto3" json:"group_key,omitempty"`
	// Retention period specified in a number of seconds.
	// The task will be stored in redis as a completed task until the TTL
	// expires.
	Retention int64 `protobuf:"varint,12,opt,name=retention,proto3" json:"retention,omitempty"`
	// Time when the task completed in success in Unix time,
	// the number of seconds elapsed since January 1, 1970 UTC.
	// This field is populated if result_ttl > 0 upon completion.
	CompletedAt int64 `protobuf:"varint,13,opt,name=completed_at,json=completedAt,proto3" json:"completed_at,omitempty"`
	// contains filtered or unexported fields
}

TaskMessage is the internal representation of a task with additional metadata fields. Next ID: 15

func (*TaskMessage) Descriptor deprecated

func (*TaskMessage) Descriptor() ([]byte, []int)

Deprecated: Use TaskMessage.ProtoReflect.Descriptor instead.

func (*TaskMessage) GetCompletedAt

func (x *TaskMessage) GetCompletedAt() int64

func (*TaskMessage) GetDeadline

func (x *TaskMessage) GetDeadline() int64

func (*TaskMessage) GetErrorMsg

func (x *TaskMessage) GetErrorMsg() string

func (*TaskMessage) GetGroupKey

func (x *TaskMessage) GetGroupKey() string

func (*TaskMessage) GetId

func (x *TaskMessage) GetId() string

func (*TaskMessage) GetLastFailedAt

func (x *TaskMessage) GetLastFailedAt() int64

func (*TaskMessage) GetPayload

func (x *TaskMessage) GetPayload() []byte

func (*TaskMessage) GetQueue

func (x *TaskMessage) GetQueue() string

func (*TaskMessage) GetRetention

func (x *TaskMessage) GetRetention() int64

func (*TaskMessage) GetRetried

func (x *TaskMessage) GetRetried() int32

func (*TaskMessage) GetRetry

func (x *TaskMessage) GetRetry() int32

func (*TaskMessage) GetTimeout

func (x *TaskMessage) GetTimeout() int64

func (*TaskMessage) GetType

func (x *TaskMessage) GetType() string

func (*TaskMessage) GetUniqueKey

func (x *TaskMessage) GetUniqueKey() string

func (*TaskMessage) ProtoMessage

func (*TaskMessage) ProtoMessage()

func (*TaskMessage) ProtoReflect

func (x *TaskMessage) ProtoReflect() protoreflect.Message

func (*TaskMessage) Reset

func (x *TaskMessage) Reset()

func (*TaskMessage) String

func (x *TaskMessage) String() string

type WorkerInfo

type WorkerInfo struct {

	// Host matchine this worker is running on.
	Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
	// PID of the process in which this worker is running.
	Pid int32 `protobuf:"varint,2,opt,name=pid,proto3" json:"pid,omitempty"`
	// ID of the server in which this worker is running.
	ServerId string `protobuf:"bytes,3,opt,name=server_id,json=serverId,proto3" json:"server_id,omitempty"`
	// ID of the task this worker is processing.
	TaskId string `protobuf:"bytes,4,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
	// Type of the task this worker is processing.
	TaskType string `protobuf:"bytes,5,opt,name=task_type,json=taskType,proto3" json:"task_type,omitempty"`
	// Payload of the task this worker is processing.
	TaskPayload []byte `protobuf:"bytes,6,opt,name=task_payload,json=taskPayload,proto3" json:"task_payload,omitempty"`
	// Name of the queue the task the worker is processing belongs.
	Queue string `protobuf:"bytes,7,opt,name=queue,proto3" json:"queue,omitempty"`
	// Time this worker started processing the task.
	StartTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
	// Deadline by which the worker needs to complete processing
	// the task. If worker exceeds the deadline, the task will fail.
	Deadline *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=deadline,proto3" json:"deadline,omitempty"`
	// contains filtered or unexported fields
}

WorkerInfo holds information about a running worker.

func (*WorkerInfo) Descriptor deprecated

func (*WorkerInfo) Descriptor() ([]byte, []int)

Deprecated: Use WorkerInfo.ProtoReflect.Descriptor instead.

func (*WorkerInfo) GetDeadline

func (x *WorkerInfo) GetDeadline() *timestamppb.Timestamp

func (*WorkerInfo) GetHost

func (x *WorkerInfo) GetHost() string

func (*WorkerInfo) GetPid

func (x *WorkerInfo) GetPid() int32

func (*WorkerInfo) GetQueue

func (x *WorkerInfo) GetQueue() string

func (*WorkerInfo) GetServerId

func (x *WorkerInfo) GetServerId() string

func (*WorkerInfo) GetStartTime

func (x *WorkerInfo) GetStartTime() *timestamppb.Timestamp

func (*WorkerInfo) GetTaskId

func (x *WorkerInfo) GetTaskId() string

func (*WorkerInfo) GetTaskPayload

func (x *WorkerInfo) GetTaskPayload() []byte

func (*WorkerInfo) GetTaskType

func (x *WorkerInfo) GetTaskType() string

func (*WorkerInfo) ProtoMessage

func (*WorkerInfo) ProtoMessage()

func (*WorkerInfo) ProtoReflect

func (x *WorkerInfo) ProtoReflect() protoreflect.Message

func (*WorkerInfo) Reset

func (x *WorkerInfo) Reset()

func (*WorkerInfo) String

func (x *WorkerInfo) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL