RequestHeaders returns the special task-queue HTTP request headers for the current
task queue handler. Returns an error if called from outside a delay.Func.
Function
typeFunctionstruct{// contains filtered or unexported fields}
Function represents a function that may have a delayed invocation.
Func declares a new function that can be called in a deferred fashion.
The second argument i must be a function with the first argument of
type context.Context.
To make the key globally unique, the SDK code will combine "key" with
the filename of the file in which myFunc is defined
(e.g., /some/path/myfile.go). This is convenient, but can lead to
failed deferred tasks if you refactor your code, or change from
GOPATH to go.mod, and then re-deploy with in-flight deferred tasks.
This function Func must be called in a global scope to properly
register the function with the framework.
MustRegister declares a new function that can be called in a deferred fashion.
The second argument i must be a function with the first argument of
type context.Context.
MustRegister requires the key to be globally unique.
This function MustRegister must be called in a global scope to properly
register the function with the framework.
See the package notes above for more details.
Task creates a Task that will invoke the function.
Its parameters may be tweaked before adding it to a queue.
Users should not modify the Path or Payload fields of the returned Task.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eThis page details the \u003ccode\u003edelay\u003c/code\u003e package within the App Engine standard environment for Go, with the latest version being 2.0.6.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eFunction\u003c/code\u003e type represents a function that can be executed at a later time, and its methods \u003ccode\u003eCall\u003c/code\u003e and \u003ccode\u003eTask\u003c/code\u003e provide ways to invoke or schedule the deferred function, respectively.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eMustRegister\u003c/code\u003e is the preferred function for declaring a new function for deferred execution, requiring a globally unique key, and it also requires the key to be globally unique.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eFunc\u003c/code\u003e is a deprecated method used to declare a new function that can be called later, but \u003ccode\u003eMustRegister\u003c/code\u003e should be used instead.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eRequestHeaders\u003c/code\u003e returns special task-queue HTTP request headers for the current task queue handler, only when it is called within a \u003ccode\u003edelay.Func\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Package google.golang.org/appengine/v2/delay (v2.0.6)\n\n**Note:** To get more information about this package, such as access to older versions, view [this package on pkg.go.dev](https://pkg.go.dev/google.golang.org/appengine/v2/delay). \n\nFunctions\n---------\n\n### func RequestHeaders\n\n func RequestHeaders(c https://pkg.go.dev/context.https://pkg.go.dev/context#Context) (*https://pkg.go.dev/google.golang.org/appengine/v2/taskqueue.https://pkg.go.dev/google.golang.org/appengine/v2/taskqueue#RequestHeaders, https://pkg.go.dev/builtin#error)\n\nRequestHeaders returns the special task-queue HTTP request headers for the current\ntask queue handler. Returns an error if called from outside a delay.Func. \n\nFunction\n--------\n\n type Function struct {\n \t// contains filtered or unexported fields\n }\n\nFunction represents a function that may have a delayed invocation. \n\n### func Func\n(deprecated)\n\n func Func(key https://pkg.go.dev/builtin#string, i interface{}) *#google_golang_org_appengine_v2_delay_Function\n\nFunc declares a new function that can be called in a deferred fashion.\nThe second argument i must be a function with the first argument of\ntype context.Context.\nTo make the key globally unique, the SDK code will combine \"key\" with\nthe filename of the file in which myFunc is defined\n(e.g., /some/path/myfile.go). This is convenient, but can lead to\nfailed deferred tasks if you refactor your code, or change from\nGOPATH to go.mod, and then re-deploy with in-flight deferred tasks.\n\nThis function Func must be called in a global scope to properly\nregister the function with the framework.\n\nDeprecated: Use MustRegister instead. \n\n### func MustRegister\n\n func MustRegister(key https://pkg.go.dev/builtin#string, i interface{}) *#google_golang_org_appengine_v2_delay_Function\n\nMustRegister declares a new function that can be called in a deferred fashion.\nThe second argument i must be a function with the first argument of\ntype context.Context.\nMustRegister requires the key to be globally unique.\n\nThis function MustRegister must be called in a global scope to properly\nregister the function with the framework.\nSee the package notes above for more details. \n\n### func (\\*Function) Call\n\n func (f *#google_golang_org_appengine_v2_delay_Function) Call(c https://pkg.go.dev/context.https://pkg.go.dev/context#Context, args ...interface{}) https://pkg.go.dev/builtin#error\n\nCall invokes a delayed function. \n\n err := f.Call(c, ...)\n\nis equivalent to \n\n t, _ := f.Task(...)\n _, err := taskqueue.Add(c, t, \"\")\n\n### func (\\*Function) Task\n\n func (f *#google_golang_org_appengine_v2_delay_Function) Task(args ...interface{}) (*https://pkg.go.dev/google.golang.org/appengine/v2/taskqueue.https://pkg.go.dev/google.golang.org/appengine/v2/taskqueue#Task, https://pkg.go.dev/builtin#error)\n\nTask creates a Task that will invoke the function.\nIts parameters may be tweaked before adding it to a queue.\nUsers should not modify the Path or Payload fields of the returned Task."]]