Documentation ¶
Index ¶
Constants ¶
View Source
const ( // AppEngineTaskName Header Key AppEngineTaskName = "X-AppEngine-TaskName" // AppEngineQueueName Header Key AppEngineQueueName = "X-AppEngine-QueueName" // AppEngineTaskRetryCount Header Key AppEngineTaskRetryCount = "X-AppEngine-TaskRetryCount" // AppEngineTaskExecutionCount Header Key AppEngineTaskExecutionCount = "X-AppEngine-TaskExecutionCount" // AppEngineTaskETA Header Key AppEngineTaskETA = "X-AppEngine-TaskETA" // AppEngineTaskPreviousResponse Header Key AppEngineTaskPreviousResponse = "X-AppEngine-TaskPreviousResponse" // AppEngineTaskRetryReason Header Key AppEngineTaskRetryReason = "X-AppEngine-TaskRetryReason" // AppEngineFailFast Header Key AppEngineFailFast = "X-AppEngine-FailFast" )
Variables ¶
View Source
var ErrNotFoundHeader = errors.New("not found cloudtasks header")
ErrNotFoundHeader is Cloud Tasks の Headerがない時に利用されます。
Functions ¶
This section is empty.
Types ¶
type Header ¶
type Header struct { // QueueName is The name of the queue. // Always there QueueName string // TaskName is The "short" name of the task, or, if no name was specified at creation, a unique system-generated id. // This is the 'my-task-id' value in the complete task name, ie, task_name = projects/my-project-id/locations/my-location/queues/my-queue-id/tasks/my-task-id. // Always there TaskName string // TaskRetryCount is The number of times this task has been retried. // For the first attempt, this value is 0. // This number includes attempts where the task failed due to a lack of available instances and never reached the execution phase. // Always there TaskRetryCount int64 // TaskExecutionCount is The total number of times that the task has received a response from the handler. // Since Cloud Tasks deletes the task once a successful response has been received, all previous handler responses were failures. // This number does not include failures due to a lack of available instances. // Always there TaskExecutionCount int64 // TaskEAT is The schedule time of the task // Always there TaskETA time.Time // TaskPreviousResponse is The HTTP response code from the previous retry. // optional TaskPreviousResponse string // TaskRetryReason is The reason for retrying the task. // optional TaskRetryReason string // FailFast is Indicates that a task fails immediately if an existing instance is not available. // optional FailFast bool }
Header is App Engine task handlers plz see https://cloud.google.com/tasks/docs/creating-appengine-handlers
type JsonPostTask ¶
JsonPostTask is JsonをBodyに入れるTask
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is App Engine Task Service
func NewService ¶
NewService is return Service
func (*Service) CreateGetTask ¶
CreateGetTask is Get Request 用の Task を作る
func (*Service) CreateJsonPostTask ¶
func (s *Service) CreateJsonPostTask(ctx context.Context, queue *Queue, task *JsonPostTask) (string, error)
CreateJsonPostTask is BodyにJsonを入れるTaskを作る
Click to show internal directories.
Click to hide internal directories.