Top 4.8% dependent repos on proxy.golang.org
proxy.golang.org : github.com/imjasonh/delay
Package delay provides a way to execute code outside the scope of a user request by using the Cloud Tasks API. To declare a function that may be executed later, call Func in a top-level assignment context, passing it a function whose first argument is of type context.Context. It is also possible to use a function literal. To call a function, invoke its Call method. To call a function after a delay, invoke its Delay method. A function may be called any number of times. If the function has any return arguments, and the last one is of type error, the function may return a non-nil error to signal that the function failed and should be retried. Other return values are ignored. The arguments to functions may be of any type that is encodable by the gob package. If an argument is of interface{} type, it is the client's responsibility to register with the gob package whatever concrete type may be passed for that argument; see http://golang.org/pkg/gob/#Register for details. Any errors during initialization or execution of a function will be logged to the application logs. Error logs that occur during initialization will be associated with the request that invoked the Call method. The state of a function invocation that has not yet successfully executed is preserved by combining the file name in which it is declared with the string key that was passed to the Func function. Updating an app with pending function invocations should safe as long as the relevant functions have the (filename, key) combination preserved. The filename is parsed according to these rules: The delay package uses the Cloud Tasks API to create tasks that call the reserved application path "/internal/queue/go/delay".
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/imjasonh/delay
Keywords:
async
, cloud-run
, cloud-tasks
, golang
License: Apache-2.0
Latest release: over 4 years ago
First release: over 4 years ago
Namespace: github.com/imjasonh
Dependent packages: 1
Dependent repositories: 1
Stars: 3 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: about 2 months ago