Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecuteAsync ¶
ExecuteAsync executes a function asychrously and return its result.
Types ¶
type ActivityTimer ¶
type ActivityTimer struct {
// contains filtered or unexported fields
}
func CancelAfterInactivity ¶
func CancelAfterInactivity(ctx context.Context, cancel context.CancelFunc, timeout time.Duration) *ActivityTimer
func (*ActivityTimer) SetTimeout ¶
func (t *ActivityTimer) SetTimeout(timeout time.Duration)
func (*ActivityTimer) Update ¶
func (t *ActivityTimer) Update()
type ActivityUpdater ¶
type ActivityUpdater interface {
Update()
}
type Done ¶
type Done struct {
// contains filtered or unexported fields
}
Done is an utility for notifications of something being done.
type Notifier ¶
type Notifier struct {
// contains filtered or unexported fields
}
Notifier is an utility for notifying changes. The change producer may notify changes multiple time, and the consumer may get notified asychronously.
type PeriodicTask ¶
type PeriodicTask struct { // Interval of the task being run Interval time.Duration // Execute is the task function Execute func() error // contains filtered or unexported fields }
PeriodicTask is a task that runs periodically.
func (*PeriodicTask) Start ¶
func (t *PeriodicTask) Start() error
Start implements common.Runnable. Start must not be called multiple times without Close being called.
Click to show internal directories.
Click to hide internal directories.