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 ¶ added in v3.8.1
type Done struct {
// contains filtered or unexported fields
}
Done is an utility for notifications of something being done.
func (*Done) C ¶ added in v3.8.1
func (d *Done) C() chan struct{}
C returns a channel for waiting for done.
func (*Done) Close ¶ added in v3.8.1
Close marks this Done 'done'. This method may be called mutliple times. All calls after first call will have no effect on its status.
type Notifier ¶ added in v3.8.1
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 ¶ added in v3.8.1
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) Close ¶ added in v3.8.1
func (t *PeriodicTask) Close() error
Close implements common.Runnable.
func (*PeriodicTask) Start ¶ added in v3.8.1
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.