Documentation
¶
Index ¶
- Constants
- func Count(ctx context.Context, name, label string, value int) error
- func CreateSimpleTask(ctx context.Context, handler, payload string) (*taskspb.Task, error)
- func CreateTask(ctx context.Context, handler string, payload interface{}) (*taskspb.Task, error)
- func GetJobTimestamp(ctx context.Context, name string) int64
- func GetKV(ctx context.Context, k string) (string, error)
- func InvalidateKV(ctx context.Context, k string)
- func SetKV(ctx context.Context, k, v string, duration int64) error
- func UpdateJob(ctx context.Context, name string, ts int64) error
- type Counter
- type Job
- type KV
- type Metric
Constants ¶
View Source
const ( // DatastoreKV collection KV DatastoreKV string = "KV" // DefaultExpiration is the minimum time to keep an entry in the store DefaultExpiration int64 = 86400 * 14 // 14 days )
View Source
const ( // DatastoreMetrics collection of metrics DatastoreMetrics string = "METRICS" // CountType is a int counter CountType = "COUNTER" )
View Source
const ( // DatastoreJobs collection of job / cron metadata DatastoreJobs string = "JOBS" )
Variables ¶
This section is empty.
Functions ¶
func CreateSimpleTask ¶
CreateSimpleTask is used to schedule a background task using the default queue. The payload is a simple string, i.e. no marshalling happens.
func CreateTask ¶
CreateTask is used to schedule a background task using the default queue. The payload can be any struct and will be marshalled into a json string.
func GetJobTimestamp ¶
GetJobTimestamp returns the timestamp when a job was last executed
func InvalidateKV ¶
InvalidateKV removes an entry from the cache
Types ¶
Click to show internal directories.
Click to hide internal directories.