Documentation ¶
Index ¶
- Variables
- func BlockingDialog(title, message string, options []string, defaultOption int, ...) int
- func ClearProblem()
- func HandlePanic(launcherFlags *flags.LauncherFlags)
- func HideWaitDialog()
- func Main(ctx context.Context, cancelFunc func(), title string, showMainWindow bool) error
- func NotifyProblem(problemMessage string, requiresUserAction bool)
- func PanicInformatively(r interface{}, launcherFlags *flags.LauncherFlags)
- func Pause(ctx context.Context, message string)
- func Quit()
- func SetStage(s Stage, progressTarget uint64)
- func SetStageText(s Stage, text string)
- func ShowWaitDialog(title, text string)
- func WaitUntilReady()
- type DownloadStatusPanel
- type GuiDownloadProgressHandler
- func (handler *GuiDownloadProgressHandler) GetProgress() uint64
- func (handler *GuiDownloadProgressHandler) HandleBadHttpResponse(fromURL string, code int)
- func (handler *GuiDownloadProgressHandler) HandleFailDownload(fromURL string, workerId int, err error)
- func (handler *GuiDownloadProgressHandler) HandleFinishDownload(fromURL string, workerId int)
- func (handler *GuiDownloadProgressHandler) HandleHttpGetError(fromURL string, err error)
- func (handler *GuiDownloadProgressHandler) HandleProgress(fromURL string, workerId int, receivedBytes uint64)
- func (handler *GuiDownloadProgressHandler) HandleReadError(fromURL string, err error, receivedByteCount int64)
- func (handler *GuiDownloadProgressHandler) HandleStartDownload(fromURL string, workerId int)
- func (handler *GuiDownloadProgressHandler) ResetProgress()
- type Stage
Constants ¶
This section is empty.
Variables ¶
var ProgressFunc = func(s Stage) uint64 {
return 0
}
ProgressFunc should be set to a function which reports the progress of the given stage.
Functions ¶
func BlockingDialog ¶
func ClearProblem ¶
func ClearProblem()
func HandlePanic ¶ added in v1.3.2
func HandlePanic(launcherFlags *flags.LauncherFlags)
func HideWaitDialog ¶
func HideWaitDialog()
func Main ¶
Main hands control over to ui.Main() to initialize and manage the GUI. It blocks until gui.Quit() is called.
func NotifyProblem ¶
func PanicInformatively ¶ added in v1.3.2
func PanicInformatively(r interface{}, launcherFlags *flags.LauncherFlags)
func Pause ¶ added in v1.4.0
Pause shows given message in the download status panel along with a clickable link which reads "Continue" and blocks until the user clicks it.
func SetStage ¶
SetStage sets up the GUI to determine the progress bar value based on the progress interval of the given stage. When progressTotal is >0, you can set gui.ProgressFunc to a function which reports the current progress.
func SetStageText ¶
func ShowWaitDialog ¶
func ShowWaitDialog(title, text string)
func WaitUntilReady ¶
func WaitUntilReady()
Types ¶
type DownloadStatusPanel ¶
type GuiDownloadProgressHandler ¶
type GuiDownloadProgressHandler struct {
// contains filtered or unexported fields
}
Implements fetching.DownloadProgressHandler
func NewGuiDownloadProgressHandler ¶
func NewGuiDownloadProgressHandler(bucketCount int) *GuiDownloadProgressHandler
func (*GuiDownloadProgressHandler) GetProgress ¶
func (handler *GuiDownloadProgressHandler) GetProgress() uint64
func (*GuiDownloadProgressHandler) HandleBadHttpResponse ¶
func (handler *GuiDownloadProgressHandler) HandleBadHttpResponse(fromURL string, code int)
func (*GuiDownloadProgressHandler) HandleFailDownload ¶
func (handler *GuiDownloadProgressHandler) HandleFailDownload(fromURL string, workerId int, err error)
func (*GuiDownloadProgressHandler) HandleFinishDownload ¶
func (handler *GuiDownloadProgressHandler) HandleFinishDownload(fromURL string, workerId int)
func (*GuiDownloadProgressHandler) HandleHttpGetError ¶
func (handler *GuiDownloadProgressHandler) HandleHttpGetError(fromURL string, err error)
func (*GuiDownloadProgressHandler) HandleProgress ¶
func (handler *GuiDownloadProgressHandler) HandleProgress(fromURL string, workerId int, receivedBytes uint64)
func (*GuiDownloadProgressHandler) HandleReadError ¶
func (handler *GuiDownloadProgressHandler) HandleReadError(fromURL string, err error, receivedByteCount int64)
func (*GuiDownloadProgressHandler) HandleStartDownload ¶
func (handler *GuiDownloadProgressHandler) HandleStartDownload(fromURL string, workerId int)
func (*GuiDownloadProgressHandler) ResetProgress ¶
func (handler *GuiDownloadProgressHandler) ResetProgress()
type Stage ¶
type Stage int
Stage is an abstraction of the various steps which the launcher goes through when it runs.
const ( StageAcquireLock Stage = iota StageGetDeploymentConfig StageDetermineLocalLauncherVersion StageRetrieveRemoteLauncherVersion StageSelfUpdate StageDetermineLocalBundleVersions StageRetrieveRemoteBundleVersions StageAwaitApplicationsTerminated StageDownloadBundleUpdates StageLaunchApplication )