Documentation
¶
Index ¶
- type QueueOptions
- type Task
- type TaskManager
- func (tm *TaskManager) Close() error
- func (tm *TaskManager) CreateQueue(name string) error
- func (tm *TaskManager) DeleteQueue(name string) error
- func (tm *TaskManager) GetQueue(name string) (*taskspb.Queue, error)
- func (tm *TaskManager) ListQueues() ([]*taskspb.Queue, error)
- func (tm *TaskManager) PauseQueue(name string) error
- func (tm *TaskManager) PurgeQueue(name string) error
- func (tm *TaskManager) ResumeQueue(name string) error
- func (tm *TaskManager) Run(queue, path string, options ...TaskOption) error
- func (tm *TaskManager) UpdateQueue(name string, opts *QueueOptions) error
- type TaskManagerOptions
- type TaskOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type QueueOptions ¶
type TaskManager ¶
type TaskManager struct { Client *cloudtasks.Client // contains filtered or unexported fields }
func NewTaskManager ¶
func NewTaskManager(options *TaskManagerOptions) (*TaskManager, error)
func (*TaskManager) Close ¶
func (tm *TaskManager) Close() error
func (*TaskManager) CreateQueue ¶
func (tm *TaskManager) CreateQueue(name string) error
func (*TaskManager) DeleteQueue ¶
func (tm *TaskManager) DeleteQueue(name string) error
func (*TaskManager) ListQueues ¶
func (tm *TaskManager) ListQueues() ([]*taskspb.Queue, error)
func (*TaskManager) PauseQueue ¶
func (tm *TaskManager) PauseQueue(name string) error
func (*TaskManager) PurgeQueue ¶
func (tm *TaskManager) PurgeQueue(name string) error
func (*TaskManager) ResumeQueue ¶
func (tm *TaskManager) ResumeQueue(name string) error
func (*TaskManager) Run ¶
func (tm *TaskManager) Run(queue, path string, options ...TaskOption) error
func (*TaskManager) UpdateQueue ¶
func (tm *TaskManager) UpdateQueue(name string, opts *QueueOptions) error
type TaskManagerOptions ¶
type TaskManagerOptions struct { Project string Location string AuthKey string BaseUrl string QueueOpts *QueueOptions }
type TaskOption ¶
type TaskOption func(*Task)
func WithDelay ¶
func WithDelay(delay time.Duration) TaskOption
func WithMethod ¶
func WithMethod(method string) TaskOption
func WithPayload ¶
func WithPayload(payload []byte) TaskOption
Click to show internal directories.
Click to hide internal directories.