Documentation
¶
Overview ¶
Package once contains utilities for managing actions that must be performed exactly once.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Map ¶
Map coordinates actions that must happen exactly once, keyed by user-defined keys.
type Task ¶
type Task struct {
// contains filtered or unexported fields
}
Task manages a computation that must be run at most once. It's similar to sync.Once, except it also handles and returns errors.
func (*Task) Do ¶
Do run the function do at most once. Successive invocations of Do guarantee exactly one invocation of the function do. Do returns the error of do's invocation.
Click to show internal directories.
Click to hide internal directories.