Documentation
¶
Overview ¶
Package taskqueue provides access to the TaskQueue API.
See https://developers.google.com/appengine/docs/python/taskqueue/rest
Usage example:
import "google.golang.org/api/taskqueue/v1beta1" ... taskqueueService, err := taskqueue.New(oauthHttpClient)
Index ¶
- Constants
- type Service
- type Task
- type TaskQueue
- type TaskQueueAcl
- type TaskQueueStats
- type TaskqueuesGetCall
- type TaskqueuesService
- type Tasks
- type Tasks2
- type TasksDeleteCall
- type TasksGetCall
- type TasksLeaseCall
- type TasksListCall
- type TasksService
- func (r *TasksService) Delete(project string, taskqueue string, task string) *TasksDeleteCall
- func (r *TasksService) Get(project string, taskqueue string, task string) *TasksGetCall
- func (r *TasksService) Lease(project string, taskqueue string, numTasks int64, leaseSecs int64) *TasksLeaseCall
- func (r *TasksService) List(project string, taskqueue string) *TasksListCall
Constants ¶
const ( // Manage your Tasks and Taskqueues TaskqueueScope = "https://www.googleapis.com/auth/taskqueue" // Consume Tasks from your Taskqueues TaskqueueConsumerScope = "https://www.googleapis.com/auth/taskqueue.consumer" )
OAuth2 scopes used by this API.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
BasePath string // API endpoint base URL
UserAgent string // optional additional User-Agent fragment
Taskqueues *TaskqueuesService
Tasks *TasksService
// contains filtered or unexported fields
}
type Task ¶
type Task struct {
// EnqueueTimestamp: Time (in seconds since the epoch) at which the task
// was enqueued.
EnqueueTimestamp int64 `json:"enqueueTimestamp,omitempty,string"`
// Id: Name of the task.
Id string `json:"id,omitempty"`
// Kind: The kind of object returned, in this case set to task.
Kind string `json:"kind,omitempty"`
// LeaseTimestamp: Time (in seconds since the epoch) at which the task
// lease will expire. This value is 0 if the task isnt currently leased
// out to a worker.
LeaseTimestamp int64 `json:"leaseTimestamp,omitempty,string"`
// PayloadBase64: A bag of bytes which is the task payload. The payload
// on the JSON side is always Base64 encoded.
PayloadBase64 string `json:"payloadBase64,omitempty"`
// QueueName: Name of the queue that the task is in.
QueueName string `json:"queueName,omitempty"`
}
type TaskQueue ¶
type TaskQueue struct {
// Acl: ACLs that are applicable to this TaskQueue object.
Acl *TaskQueueAcl `json:"acl,omitempty"`
// Id: Name of the taskqueue.
Id string `json:"id,omitempty"`
// Kind: The kind of REST object returned, in this case taskqueue.
Kind string `json:"kind,omitempty"`
// MaxLeases: The number of times we should lease out tasks before
// giving up on them. If unset we lease them out forever until a worker
// deletes the task.
MaxLeases int64 `json:"maxLeases,omitempty"`
// Stats: Statistics for the TaskQueue object in question.
Stats *TaskQueueStats `json:"stats,omitempty"`
}
type TaskQueueAcl ¶
type TaskQueueAcl struct {
// AdminEmails: Email addresses of users who are "admins" of the
// TaskQueue. This means they can control the queue, eg set ACLs for the
// queue.
AdminEmails []string `json:"adminEmails,omitempty"`
// ConsumerEmails: Email addresses of users who can "consume" tasks from
// the TaskQueue. This means they can Dequeue and Delete tasks from the
// queue.
ConsumerEmails []string `json:"consumerEmails,omitempty"`
// ProducerEmails: Email addresses of users who can "produce" tasks into
// the TaskQueue. This means they can Insert tasks into the queue.
ProducerEmails []string `json:"producerEmails,omitempty"`
}
type TaskQueueStats ¶
type TaskQueueStats struct {
// LeasedLastHour: Number of tasks leased in the last hour.
LeasedLastHour int64 `json:"leasedLastHour,omitempty,string"`
// LeasedLastMinute: Number of tasks leased in the last minute.
LeasedLastMinute int64 `json:"leasedLastMinute,omitempty,string"`
// OldestTask: The timestamp (in seconds since the epoch) of the oldest
// unfinished task.
OldestTask int64 `json:"oldestTask,omitempty,string"`
// TotalTasks: Number of tasks in the queue.
TotalTasks int64 `json:"totalTasks,omitempty"`
}
type TaskqueuesGetCall ¶
type TaskqueuesGetCall struct {
// contains filtered or unexported fields
}
func (*TaskqueuesGetCall) Do ¶
func (c *TaskqueuesGetCall) Do() (*TaskQueue, error)
func (*TaskqueuesGetCall) Fields ¶
func (c *TaskqueuesGetCall) Fields(s ...googleapi.Field) *TaskqueuesGetCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*TaskqueuesGetCall) GetStats ¶
func (c *TaskqueuesGetCall) GetStats(getStats bool) *TaskqueuesGetCall
GetStats sets the optional parameter "getStats": Whether to get stats.
type TaskqueuesService ¶
type TaskqueuesService struct {
// contains filtered or unexported fields
}
func NewTaskqueuesService ¶
func NewTaskqueuesService(s *Service) *TaskqueuesService
func (*TaskqueuesService) Get ¶
func (r *TaskqueuesService) Get(project string, taskqueue string) *TaskqueuesGetCall
Get: Get detailed information about a TaskQueue.
type TasksDeleteCall ¶
type TasksDeleteCall struct {
// contains filtered or unexported fields
}
func (*TasksDeleteCall) Do ¶
func (c *TasksDeleteCall) Do() error
func (*TasksDeleteCall) Fields ¶
func (c *TasksDeleteCall) Fields(s ...googleapi.Field) *TasksDeleteCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type TasksGetCall ¶
type TasksGetCall struct {
// contains filtered or unexported fields
}
func (*TasksGetCall) Do ¶
func (c *TasksGetCall) Do() (*Task, error)
func (*TasksGetCall) Fields ¶
func (c *TasksGetCall) Fields(s ...googleapi.Field) *TasksGetCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type TasksLeaseCall ¶
type TasksLeaseCall struct {
// contains filtered or unexported fields
}
func (*TasksLeaseCall) Do ¶
func (c *TasksLeaseCall) Do() (*Tasks, error)
func (*TasksLeaseCall) Fields ¶
func (c *TasksLeaseCall) Fields(s ...googleapi.Field) *TasksLeaseCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type TasksListCall ¶
type TasksListCall struct {
// contains filtered or unexported fields
}
func (*TasksListCall) Do ¶
func (c *TasksListCall) Do() (*Tasks2, error)
func (*TasksListCall) Fields ¶
func (c *TasksListCall) Fields(s ...googleapi.Field) *TasksListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type TasksService ¶
type TasksService struct {
// contains filtered or unexported fields
}
func NewTasksService ¶
func NewTasksService(s *Service) *TasksService
func (*TasksService) Delete ¶
func (r *TasksService) Delete(project string, taskqueue string, task string) *TasksDeleteCall
Delete: Delete a task from a TaskQueue.
func (*TasksService) Get ¶
func (r *TasksService) Get(project string, taskqueue string, task string) *TasksGetCall
Get: Get a particular task from a TaskQueue.
func (*TasksService) Lease ¶
func (r *TasksService) Lease(project string, taskqueue string, numTasks int64, leaseSecs int64) *TasksLeaseCall
Lease: Lease 1 or more tasks from a TaskQueue.
func (*TasksService) List ¶
func (r *TasksService) List(project string, taskqueue string) *TasksListCall
List: List Tasks in a TaskQueue