operator

package
v0.0.0-...-aa64d6e Latest Latest
Warning

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

Go to latest
Published: May 4, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseDfOutput

func ParseDfOutput(out string) (float64, error)

ParseDfOutput парсим строку комманды df -P TODO: translate

func ParseInt64Output

func ParseInt64Output(out string) (val int64, err error)

ParseInt64Output парсим одну строку с числом TODO: translate

func ParseOutput

func ParseOutput(out string) (val int64, err error)

func RunSshCommand

func RunSshCommand(myCommand string, spec *types.DeploySpec, dryRun bool) error

/ RunSshCommand выполнение комманд на удаленном хосте по ssh TODO: tranclate

Types

type SSHOperator

type SSHOperator struct {
	Config *easyssh.MakeConfig
}

func (*SSHOperator) NewSSHOperator

func (r *SSHOperator) NewSSHOperator(node *types.NodeOpts)

NewSshConnection New SSH Connection

func (*SSHOperator) Run

func (r *SSHOperator) Run(command string) (done bool, err error)

Run command on remote machine

Example:

func (*SSHOperator) Stream

func (r *SSHOperator) Stream(command string, isPrint bool)

Stream returns one channel that combines the stdout and stderr of the command as it is run on the remote machine, and another that sends true when the command is done. The sessions and channels will then be closed.

isPrint - выводить результат на экран или в лог

Jump to

Keyboard shortcuts

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