Documentation ¶
Overview ¶
Package async provides an async task struct to allow the UI to run background tasks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCanceled = errors.New("async operation canceled")
ErrCanceled is the error set when an async operation was canceled.
Functions ¶
This section is empty.
Types ¶
type Async ¶
type Async struct { // Cancel is used to signal cancelation to the task. Cancel chan interface{} // Done is used to signal completion to the UI. Done chan interface{} // ToUI is used to pass data from the task. ToUI chan interface{} // Err is the final completion status. Err error // UpdateProgress is the function called to give progress feedback to // the UI. UpdateProgress func(string) }
Async is the structure containing the bits needed to communicate from a long running async task back to the UI (eg: Installation).
Click to show internal directories.
Click to hide internal directories.