Documentation
¶
Overview ¶
Package tasks provides the ability to schedule cloud tasks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Task ¶
type Task struct {
URL string // Required https url
Method string // Required: GET/POST/PUT/DELETE/PATCH/OPTIONS
Headers map[string]string // Optional http headers
Body []byte // Optional http body
Time time.Time // When the task should run
ServiceAccountEmail string // If empty, its derived from the ALIS_OS_PROJECT env (if set).
}
func (*Task) MustSchedule ¶
MustSchedule does the same as Schedule, but panics on an error.
func (*Task) Schedule ¶
Schedule the given task.
Queue can be the queue ID, in which case ALIS_REGION and ALIS_OS_PROJECT envs are used to determine the full queue name. Otherwise, queue must be in the format projects/{project}/locations/{location}/queues/{queue}.
Source Files
¶
- tasks.go
Click to show internal directories.
Click to hide internal directories.