Documentation ¶
Index ¶
Constants ¶
View Source
const (
TaskQueuePrefix = "taskq"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MessageResult ¶
type MessageStatus ¶
type MessageStatus = string
const ( MessageStatus_Unknown MessageStatus = "Status_Unknown" MessageStatus_Pending MessageStatus = "Status_Pending" MessageStatus_Success MessageStatus = "Status_Success" MessageStatus_Doing MessageStatus = "Status_Doing" MessageStatus_Fail MessageStatus = "Status_Fail" )
type Queue ¶
type Queue interface { Add(ctx context.Context, msg *Message) (string, error) FetchOne(ctx context.Context, waitTimeout time.Duration) (*Message, error) Delete(ctx context.Context, msg *Message) error AddResult(ctx context.Context, result *MessageResult, expired time.Duration) (string, error) FetchResult(ctx context.Context, key string) (*MessageResult, error) }
type QueueOptions ¶
type QueueOptions struct {
Name string
}
type ResultCallbackFunc ¶
type ResultCallbackFunc func(ctx context.Context, result *MessageResult)
Click to show internal directories.
Click to hide internal directories.