Back to

Package reminder

Latest Go to latest

The latest major version is .

Published: Aug 13, 2020 | License: Apache-2.0 | Module:


Package reminder holds Reminder to avoid circular dependencies.



const FreshUntilPrecision = time.Millisecond

FreshUntilPrecision is precision of Reminder.FreshUntil, to which it is always truncated.

type Reminder

type Reminder struct {
	// ID identifies a reminder.
	// ID values are always in hex-encoded and are well distributed in keyspace.
	ID string

	// FreshUntil is the expected time by which the happy path should complete.
	// If the sweeper encounters a Reminder before this time, the sweeper ignores
	// it to allow the happy path to complete.
	// Truncated to FreshUntilPrecision.
	FreshUntil time.Time

	// Payload is a proto-serialized taskspb.CreateTaskRequest.
	// Always has a name set, so even if the reminder is processed more than once,
	// only one task will be enqueued.
	Payload []byte

	// Extra is a proto-serialized tqpb.Extra.
	// It is internal data about the task the dispatcher might want to send to
	// the sweeper. Used for monitoring and tracing.
	Extra []byte

Reminder reminds to enqueue a task.

It is persisted transactionally with some other user logic to the database. Later, a task is actually scheduled and a reminder can be deleted non-transactionally.

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier