Documentation
¶
Index ¶
- Constants
- func Close()
- func Count(ctx context.Context, topic, label string, value int)
- func Critical(topic, format string, args ...interface{})
- func DataStore() *datastore.Client
- func Debug(topic, format string, args ...interface{})
- func Get(ctx context.Context, k string) (string, error)
- func GetLastRun(ctx context.Context, name string) int64
- func Info(topic, format string, args ...interface{})
- func Invalidate(ctx context.Context, k string)
- func PrintError(msg string, args ...interface{})
- func Report(err error)
- func Set(ctx context.Context, k, v string, duration int64) error
- func UpdateTask(ctx context.Context, name string, ts int64) error
- func Warn(topic, format string, args ...interface{})
- type KV
- type Task
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 ( // DatastoreTasks collection Task DatastoreTasks string = "TASK" )
Variables ¶
This section is empty.
Functions ¶
func Critical ¶
func Critical(topic, format string, args ...interface{})
Critical is like Debug, but on CRITICAL level
func Debug ¶
func Debug(topic, format string, args ...interface{})
Debug formats its arguments according to the format, analogous to fmt.Printf, and records the text as a log message at Debug level.
func GetLastRun ¶ added in v0.0.4
GetLastRun returns the timestamp when a task was last executed
func Info ¶
func Info(topic, format string, args ...interface{})
Info is like Debug, but on INFO level
func Invalidate ¶
Invalidate removes an entry from the cache
func PrintError ¶
func PrintError(msg string, args ...interface{})
PrintError prints an error message to stderr
func UpdateTask ¶ added in v0.0.4
UpdateTask updates the timestamp of a task execution
Types ¶
Click to show internal directories.
Click to hide internal directories.