Documentation
¶
Index ¶
- Constants
- func BumpSnoozed(event *cloudevents.Event)
- func Deserialize(ce cloudevents.Event, target interface{}) error
- func GetBoolExtension(event *cloudevents.Event, key string) (bool, bool)
- func GetIntExtension(event *cloudevents.Event, key string) (int, bool)
- func GetMaxRetries(event *cloudevents.Event) (int, bool)
- func GetNotBefore(event *cloudevents.Event) (time.Time, bool)
- func GetQstashMessageID(event *cloudevents.Event) string
- func GetQueue(event *cloudevents.Event) string
- func GetRetried(event *cloudevents.Event) (int, bool)
- func GetScheduleID(event *cloudevents.Event) string
- func GetSnoozed(event *cloudevents.Event) int
- func GetStringExtension(event *cloudevents.Event, key string) (string, bool)
- func GetTimeExtension(event *cloudevents.Event, key string) (time.Time, bool)
- func IsScheduled(event *cloudevents.Event) bool
- func Serialize(ctx context.Context, args Kinder) (cloudevents.Event, error)
- func SerializeWithExt(ctx context.Context, args Kinder, extKvPairs ...string) (cloudevents.Event, error)
- func SetMaxRetries(event *cloudevents.Event, maxRetries int)
- func SetNotBefore(event *cloudevents.Event, notBefore time.Time)
- func SetQstashMessageID(event *cloudevents.Event, messageID string)
- func SetQueue(event *cloudevents.Event, queue string)
- func SetRetried(event *cloudevents.Event, retried int)
- func SetScheduleID(event *cloudevents.Event, scheduleID string)
- func SetScheduled(event *cloudevents.Event, scheduled bool)
- type Kinder
- type Payloader
Constants ¶
const ( TaskRetriedExtension = "taskretried" TaskMaxRetriesExtension = "taskmaxretries" TaskQueueExtension = "taskqueue" TaskNotBeforeExtension = "tasknotbefore" ScheduledTaskExtension = "scheduledtask" TaskSnoozedExtension = "tasksnoozed" ScheduleIdExtension = "scheduleid" QstashMessageIdExtension = "qstashmessageid" )
Task extension keys
const ApplicationJson = "application/json"
const Source = "uptask"
Variables ¶
This section is empty.
Functions ¶
func BumpSnoozed ¶ added in v0.2.0
func BumpSnoozed(event *cloudevents.Event)
func Deserialize ¶
func Deserialize(ce cloudevents.Event, target interface{}) error
func GetBoolExtension ¶ added in v0.1.0
func GetBoolExtension(event *cloudevents.Event, key string) (bool, bool)
GetBoolExtension safely retrieves a bool extension
func GetIntExtension ¶ added in v0.1.0
func GetIntExtension(event *cloudevents.Event, key string) (int, bool)
GetIntExtension safely retrieves an int extension
func GetMaxRetries ¶ added in v0.1.0
func GetMaxRetries(event *cloudevents.Event) (int, bool)
GetMaxRetries returns the maximum number of retries for this task
func GetNotBefore ¶ added in v0.1.0
func GetNotBefore(event *cloudevents.Event) (time.Time, bool)
GetNotBefore returns the time before which this task should not be processed
func GetQstashMessageID ¶ added in v0.1.0
func GetQstashMessageID(event *cloudevents.Event) string
GetQstashMessageID returns the Qstash message ID for this task
func GetQueue ¶ added in v0.1.0
func GetQueue(event *cloudevents.Event) string
GetQueue returns the queue this task is in
func GetRetried ¶ added in v0.1.0
func GetRetried(event *cloudevents.Event) (int, bool)
GetRetried returns the number of times this task has been retried
func GetScheduleID ¶ added in v0.1.0
func GetScheduleID(event *cloudevents.Event) string
GetScheduleID returns the schedule ID for this task
func GetSnoozed ¶ added in v0.2.0
func GetSnoozed(event *cloudevents.Event) int
func GetStringExtension ¶ added in v0.1.0
func GetStringExtension(event *cloudevents.Event, key string) (string, bool)
GetStringExtension safely retrieves a string extension
func GetTimeExtension ¶ added in v0.1.0
GetTimeExtension safely retrieves a time.Time extension
func IsScheduled ¶ added in v0.1.0
func IsScheduled(event *cloudevents.Event) bool
IsScheduled returns true if the event was scheduled
func SerializeWithExt ¶
func SetMaxRetries ¶ added in v0.1.0
func SetMaxRetries(event *cloudevents.Event, maxRetries int)
SetMaxRetries sets the maximum number of retries for this task
func SetNotBefore ¶ added in v0.1.0
func SetNotBefore(event *cloudevents.Event, notBefore time.Time)
SetNotBefore sets the time before which this task should not be processed
func SetQstashMessageID ¶ added in v0.1.0
func SetQstashMessageID(event *cloudevents.Event, messageID string)
SetQstashMessageID sets the Qstash message ID for this task
func SetQueue ¶ added in v0.1.0
func SetQueue(event *cloudevents.Event, queue string)
SetQueue sets the queue for this task
func SetRetried ¶ added in v0.1.0
func SetRetried(event *cloudevents.Event, retried int)
SetRetried sets the number of times this task has been retried
func SetScheduleID ¶ added in v0.1.0
func SetScheduleID(event *cloudevents.Event, scheduleID string)
SetScheduleID sets the schedule ID for this task
func SetScheduled ¶ added in v0.1.0
func SetScheduled(event *cloudevents.Event, scheduled bool)
SetScheduled sets whether this task was scheduled