ssh

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	// contains filtered or unexported fields
}

func NewCommand

func NewCommand(value string, sensitive ...string) *Command

func (*Command) Info

func (c *Command) Info() string

func (*Command) Run

func (c *Command) Run(client *ssh.Client) (string, error)

func (*Command) WithSudo

func (c *Command) WithSudo(sudo bool) Runnable

type RemoteExecutor

type RemoteExecutor struct {
	Host       string
	User       string
	Port       uint32
	PrivateKey string
	Logger     logr.Logger
	CmdTimeout time.Duration
	Commands   []Runnable
}

func (*RemoteExecutor) Run

func (re *RemoteExecutor) Run() error

type Runnable

type Runnable interface {
	Run(*ssh.Client) (string, error)
	Info() string
	WithSudo(bool) Runnable
}

type Script

type Script struct {
	// contains filtered or unexported fields
}

func NewScript

func NewScript(interpreter string, script string, sensitive ...string) *Script

func (*Script) Info

func (s *Script) Info() string

func (*Script) Run

func (s *Script) Run(client *ssh.Client) (string, error)

func (*Script) WithSudo

func (s *Script) WithSudo(sudo bool) Runnable

Jump to

Keyboard shortcuts

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