mirror of
https://github.com/miniflux/v2.git
synced 2025-07-02 16:38:37 +00:00
Update vendor dependencies
This commit is contained in:
parent
34a3fe426b
commit
459bb4531f
747 changed files with 89857 additions and 39711 deletions
45
vendor/google.golang.org/appengine/taskqueue/taskqueue.go
generated
vendored
45
vendor/google.golang.org/appengine/taskqueue/taskqueue.go
generated
vendored
|
@ -21,6 +21,7 @@ import (
|
|||
"fmt"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
|
@ -147,6 +148,48 @@ func NewPOSTTask(path string, params url.Values) *Task {
|
|||
}
|
||||
}
|
||||
|
||||
// RequestHeaders are the special HTTP request headers available to push task
|
||||
// HTTP request handlers. These headers are set internally by App Engine.
|
||||
// See https://cloud.google.com/appengine/docs/standard/go/taskqueue/push/creating-handlers#reading_request_headers
|
||||
// for a description of the fields.
|
||||
type RequestHeaders struct {
|
||||
QueueName string
|
||||
TaskName string
|
||||
TaskRetryCount int64
|
||||
TaskExecutionCount int64
|
||||
TaskETA time.Time
|
||||
|
||||
TaskPreviousResponse int
|
||||
TaskRetryReason string
|
||||
FailFast bool
|
||||
}
|
||||
|
||||
// ParseRequestHeaders parses the special HTTP request headers available to push
|
||||
// task request handlers. This function silently ignores values of the wrong
|
||||
// format.
|
||||
func ParseRequestHeaders(h http.Header) *RequestHeaders {
|
||||
ret := &RequestHeaders{
|
||||
QueueName: h.Get("X-AppEngine-QueueName"),
|
||||
TaskName: h.Get("X-AppEngine-TaskName"),
|
||||
}
|
||||
|
||||
ret.TaskRetryCount, _ = strconv.ParseInt(h.Get("X-AppEngine-TaskRetryCount"), 10, 64)
|
||||
ret.TaskExecutionCount, _ = strconv.ParseInt(h.Get("X-AppEngine-TaskExecutionCount"), 10, 64)
|
||||
|
||||
etaSecs, _ := strconv.ParseInt(h.Get("X-AppEngine-TaskETA"), 10, 64)
|
||||
if etaSecs != 0 {
|
||||
ret.TaskETA = time.Unix(etaSecs, 0)
|
||||
}
|
||||
|
||||
ret.TaskPreviousResponse, _ = strconv.Atoi(h.Get("X-AppEngine-TaskPreviousResponse"))
|
||||
ret.TaskRetryReason = h.Get("X-AppEngine-TaskRetryReason")
|
||||
if h.Get("X-AppEngine-FailFast") != "" {
|
||||
ret.FailFast = true
|
||||
}
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
var (
|
||||
currentNamespace = http.CanonicalHeaderKey("X-AppEngine-Current-Namespace")
|
||||
defaultNamespace = http.CanonicalHeaderKey("X-AppEngine-Default-Namespace")
|
||||
|
@ -321,6 +364,8 @@ func Delete(c context.Context, task *Task, queueName string) error {
|
|||
|
||||
// DeleteMulti deletes multiple tasks from a named queue.
|
||||
// If a given task could not be deleted, an appengine.MultiError is returned.
|
||||
// Each task is deleted independently; one may fail to delete while the others
|
||||
// are sucessfully deleted.
|
||||
func DeleteMulti(c context.Context, tasks []*Task, queueName string) error {
|
||||
taskNames := make([][]byte, len(tasks))
|
||||
for i, t := range tasks {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue