taskqueue

package
v0.0.0-...-ed9fe1d Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2018 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Overview

Package taskqueue provides a utility for taskqueue

Index

Constants

View Source
const LoggerKey = "gae.taskqueue"

Variables

Add is a wapper for google.golang.org/appengine/taskqueue.Add

Functions

This section is empty.

Types

type PushQueue

type PushQueue struct {
	Name                  string
	BucketSize            string
	MaxConcurrentRequests string
	Rate                  string
	RetryLimit            string
	AgeLimit              string
	MinBackoffSeconds     string
	MaxBackoffSeconds     string
	MaxDoubling           string
	Target                string
}

PushQueue is a struct to define push queue.

func (*PushQueue) PushTask

func (queue *PushQueue) PushTask(ctx context.Context, urlPath string, form url.Values) error

PushTask to push a task into the queue.

func (*PushQueue) RequestValidator

func (queue *PushQueue) RequestValidator() web.Handler

RequestValidator returns a web.Handler to validate the request targets the task or not. This is useful for handlers throttled via PushTask.

func (*PushQueue) ToYAML

func (queue *PushQueue) ToYAML() string

ToYAML generates the string for the queue

type QueueMode

type QueueMode string

QueueMode is a type alias for queue mode string

const (
	QueueModePuth QueueMode = "push"
	QueueModePull           = "pull"
)

Available constants for QueueMode.

Jump to

Keyboard shortcuts

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