Documentation ¶
Index ¶
- func CompilePocketCore(cfg *types.Config, info *types.UpgradeInfo) error
- func DownloadBinary(cfg *types.Config, info *types.UpgradeInfo) error
- func DownloadFile(cfg *types.Config, info *types.UpgradeInfo, link string) bool
- func GetMirrorLinksForVersion(version string) ([]string, error)
- func LaunchProcess(cfg *types.Config, args []string, stdout, stderr io.Writer, stdin io.Reader) (*exec.Cmd, error)
- func TMClient(port string) client.Client
- func Unzip(src string, dest string) ([]string, error)
- func Upgrade(cfg *types.Config, info *types.UpgradeInfo) error
- type EventListener
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompilePocketCore ¶
func CompilePocketCore(cfg *types.Config, info *types.UpgradeInfo) error
func DownloadBinary ¶
func DownloadBinary(cfg *types.Config, info *types.UpgradeInfo) error
func DownloadFile ¶
func LaunchProcess ¶
func LaunchProcess(cfg *types.Config, args []string, stdout, stderr io.Writer, stdin io.Reader) (*exec.Cmd, error)
LaunchProcess runs a subprocess and returns when the subprocess exits, either when it dies, or *after* a successful upgrade.
func Upgrade ¶
func Upgrade(cfg *types.Config, info *types.UpgradeInfo) error
Upgrade will be called after the log message has been parsed and the process has terminated. We can now make any changes to the underlying directory without interferance and leave it in a state, so we can make a proper restart
Types ¶
type EventListener ¶
type EventListener struct { TxChan <-chan coreTypes.ResultEvent HeaderChan <-chan coreTypes.ResultEvent // contains filtered or unexported fields }
func NewEventListener ¶
func NewEventListener(cfg *types.Config) *EventListener
func (*EventListener) Reset ¶
func (el *EventListener) Reset(cfg *types.Config) *EventListener
Click to show internal directories.
Click to hide internal directories.