updater

package
v0.1.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandUpdater

type CommandUpdater struct {
	Name string
	Args []string
	Env  []string
}

func NewCommandUpdater

func NewCommandUpdater(name string, args ...string) *CommandUpdater

func (*CommandUpdater) Cmd

func (c *CommandUpdater) Cmd() (cmd *exec.Cmd)

func (*CommandUpdater) Execute

func (c *CommandUpdater) Execute(uc *UpdaterClient, payload common.ApUpgradePayload) (err error)

type NetUpdater

type NetUpdater struct {
	Addr string
}

func NewNetUpdater

func NewNetUpdater(addr string) *NetUpdater

func (NetUpdater) Execute

func (u NetUpdater) Execute(uc *UpdaterClient, payload common.ApUpgradePayload) (err error)

type Updater

type Updater interface {
	Execute(uc *UpdaterClient, payload common.ApUpgradePayload) (err error)
}

type UpdaterClient

type UpdaterClient struct {
	ssh.Session
	Name string
}

func NewUpdaterClient

func NewUpdaterClient(session ssh.Session, name string) *UpdaterClient

func (*UpdaterClient) Err

func (uc *UpdaterClient) Err(msg string)

func (*UpdaterClient) Log

func (uc *UpdaterClient) Log(args ...interface{})

func (*UpdaterClient) Sync

func (uc *UpdaterClient) Sync(payload common.ApUpgradePayload, w io.Writer, r io.Reader) (err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址