Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RequestHeaders ¶
func RequestHeaders(c context.Context) (*taskqueue.RequestHeaders, error)
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.
Types ¶
type Function ¶
type Function struct {
// contains filtered or unexported fields
}
Function represents a function that may have a delayed invocation.
func Func
deprecated
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.
Deprecated: Use MustRegister instead.
func MustRegister ¶
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.