sshrunner

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DialWithDeadline

func DialWithDeadline(network string, addr string, config *ssh.ClientConfig) (*ssh.Client, error)

DialWithDeadline works around the case when net.DialWithTimeout succeeds, but key exchange hangs. Setting deadline on connection prevents this case from happening

Types

type AttachIO

type AttachIO api.AttachIO

type DialInfo

type DialInfo struct {
	Address  string
	Username string
	Password string
}

type Option

type Option func(opts *options)

func WithAttachIO

func WithAttachIO(attachIO AttachIO) Option

func WithEnv

func WithEnv(env []v1.EnvVar) Option

func WithIsSensitiveEnvVar

func WithIsSensitiveEnvVar(f func(name string) bool) Option

func WithPrefix

func WithPrefix(prefix string) Option

func WithTimeout

func WithTimeout(timeout time.Duration) Option

type Runner

type Runner struct {
}

func NewRunner

func NewRunner() *Runner

func (*Runner) Run

func (s *Runner) Run(ctx context.Context, dialInfo DialInfo, cmd []string, opts ...Option) error

Jump to

Keyboard shortcuts

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