Documentation ¶
Index ¶
- Constants
- Variables
- func NeedUpdate(currentVersion, remoteVersion string, versionIsRequired bool) bool
- type GenericEventHandler
- type Launcher
- func (instance *Launcher) Error() error
- func (instance *Launcher) GoString() string
- func (instance *Launcher) IsKillable() bool
- func (instance *Launcher) Kill() error
- func (instance *Launcher) OnQuit(callback func(command string, pid int))
- func (instance *Launcher) OnStart(callback func(command string))
- func (instance *Launcher) OnStarted(callback func(command string, pid int))
- func (instance *Launcher) Output() string
- func (instance *Launcher) Pid() int
- func (instance *Launcher) Run(command string) error
- func (instance *Launcher) String() string
- func (instance *Launcher) Wait() error
- type LauncherQuitHandler
- type LauncherStartHandler
- type LauncherStartedHandler
- type PackageFile
- type Settings
- type TaskHandler
- type Updater
- func (instance *Updater) GetDirApp() string
- func (instance *Updater) GetDirStart() string
- func (instance *Updater) GetDirWork() string
- func (instance *Updater) GetProcessOutput() string
- func (instance *Updater) GetProcessPid() int
- func (instance *Updater) GetRoot() string
- func (instance *Updater) GetSettingKeepAlive() bool
- func (instance *Updater) GetSettingVersionFile() string
- func (instance *Updater) GetUid() string
- func (instance *Updater) GetVariable(name string) string
- func (instance *Updater) HasUpdates() bool
- func (instance *Updater) IsProcessRunning() bool
- func (instance *Updater) IsUpdating() bool
- func (instance *Updater) IsUpgradable(currentVersion, remoteVersion string) bool
- func (instance *Updater) OnError(handler UpdaterErrorHandler)
- func (instance *Updater) OnEvent(handler GenericEventHandler)
- func (instance *Updater) OnLaunchQuit(handler LauncherQuitHandler)
- func (instance *Updater) OnLaunchStart(handler LauncherStartHandler)
- func (instance *Updater) OnLaunchStarted(handler LauncherStartedHandler)
- func (instance *Updater) OnTask(handler TaskHandler)
- func (instance *Updater) OnUpgrade(handler UpdaterUpgradeHandler)
- func (instance *Updater) ReLaunch()
- func (instance *Updater) ReStart()
- func (instance *Updater) SetRoot(path string)
- func (instance *Updater) SetUid(uid string)
- func (instance *Updater) SetVariable(name, value string)
- func (instance *Updater) Settings() *Settings
- func (instance *Updater) Start() (updated bool, fromVersion string, toVersion string, files []string, err error)
- func (instance *Updater) Stop()
- func (instance *Updater) Wait()
- type UpdaterErrorHandler
- type UpdaterUpgradeHandler
Constants ¶
View Source
const ( VariableDirHome = "$dir_home" // root VariableDirStart = "$dir_start" // binary launch dir VariableDirApp = "$dir_app" // binary dir VariableDirWork = "$dir_work" // workspace DirStart = "start" DirApp = "app" DirWork = "*" )
Variables ¶
View Source
var (
ErrorMissingConfigurationParameter = errors.New("missing_configuration_parameter_error")
)
Functions ¶
func NeedUpdate ¶ added in v0.2.44
Types ¶
type GenericEventHandler ¶
type Launcher ¶
type Launcher struct {
// contains filtered or unexported fields
}
func NewLauncher ¶
func (*Launcher) IsKillable ¶
type LauncherQuitHandler ¶
type LauncherStartHandler ¶
type LauncherStartHandler func(command string)
type LauncherStartedHandler ¶
type PackageFile ¶
type Settings ¶
type Settings struct { Uid string `json:"uid"` KeepAlive bool `json:"keep_alive"` // launch again if program is closed VersionFileRequired bool `json:"version_file_required"` // if true, first start will update all if version file does not exists VersionFile string `json:"version_file"` PackageFiles []*PackageFile `json:"package_files"` CommandToRun string `json:"command_to_run"` ScheduledUpdates []*gg_scheduler.Schedule `json:"scheduled_updates"` ScheduledRestart []*gg_scheduler.Schedule `json:"scheduled_restart"` ScheduledTasks []*gg_scheduler.Schedule `json:"scheduled_tasks"` }
type TaskHandler ¶
type Updater ¶
type Updater struct {
// contains filtered or unexported fields
}
func NewUpdater ¶
func NewUpdater(settings ...interface{}) *Updater
func (*Updater) GetDirStart ¶
func (*Updater) GetDirWork ¶
func (*Updater) GetProcessOutput ¶
func (*Updater) GetProcessPid ¶
func (*Updater) GetSettingKeepAlive ¶
func (*Updater) GetSettingVersionFile ¶
func (*Updater) GetVariable ¶
func (*Updater) HasUpdates ¶
func (*Updater) IsProcessRunning ¶
func (*Updater) IsUpdating ¶
func (*Updater) IsUpgradable ¶
func (*Updater) OnError ¶
func (instance *Updater) OnError(handler UpdaterErrorHandler)
func (*Updater) OnEvent ¶
func (instance *Updater) OnEvent(handler GenericEventHandler)
func (*Updater) OnLaunchQuit ¶
func (instance *Updater) OnLaunchQuit(handler LauncherQuitHandler)
func (*Updater) OnLaunchStart ¶
func (instance *Updater) OnLaunchStart(handler LauncherStartHandler)
func (*Updater) OnLaunchStarted ¶
func (instance *Updater) OnLaunchStarted(handler LauncherStartedHandler)
func (*Updater) OnTask ¶
func (instance *Updater) OnTask(handler TaskHandler)
func (*Updater) OnUpgrade ¶
func (instance *Updater) OnUpgrade(handler UpdaterUpgradeHandler)
func (*Updater) SetVariable ¶
type UpdaterErrorHandler ¶
type UpdaterErrorHandler func(err string)
type UpdaterUpgradeHandler ¶
Click to show internal directories.
Click to hide internal directories.