Documentation ¶
Index ¶
- func CloseFile(c io.Closer)
- func PerformSwitch(src, dst string) error
- type Executable
- func (e Executable) GetChecksum() ([]byte, error)
- func (e Executable) GetModified() (time.Time, error)
- func (e Executable) Latest(dir string) (bool, error)
- func (e Executable) Path() string
- func (e *Executable) Release() error
- func (e *Executable) Start(stdout io.Writer, stderr io.Writer) error
- func (e Executable) String() string
- func (e Executable) Switch(dir string) error
- func (e Executable) Terminate(tree bool) error
- func (e Executable) Wait() (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PerformSwitch ¶
PerformSwitch updates executable binary with new version from staging directory.
Types ¶
type Executable ¶
type Executable struct {
// contains filtered or unexported fields
}
Executable is a structure representing an executable that may be updated.
func NewExecutable ¶
func NewExecutable(path string, args ...string) (*Executable, error)
NewExecutable initializes an instance representing executable file.
func (Executable) GetChecksum ¶
func (e Executable) GetChecksum() ([]byte, error)
GetChecksum computes checksum for executable binary.
func (Executable) GetModified ¶
func (e Executable) GetModified() (time.Time, error)
GetModified retrieves file modification time from file system.
func (Executable) Latest ¶
func (e Executable) Latest(dir string) (bool, error)
Latest checks whether Executable instance is running latest version of binary kept in staging directory.
func (Executable) Path ¶
func (e Executable) Path() string
func (*Executable) Release ¶
func (e *Executable) Release() error
func (Executable) Switch ¶
func (e Executable) Switch(dir string) error
Switch overwrites executable for staging dir with exponential back-off
func (Executable) Terminate ¶
func (e Executable) Terminate(tree bool) error
Terminate stops child process and waits for process exit
func (Executable) Wait ¶
func (e Executable) Wait() (int, error)
Wait waits for child process exit and return exit code
Click to show internal directories.
Click to hide internal directories.