executor

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter interface {
	Open(host kubeoneapi.HostConfig) (Interface, error)
	Tunnel(host kubeoneapi.HostConfig) (Tunneler, error)
}

func NewLocal

func NewLocal(ctx context.Context) Adapter

type ExtendedFile

type ExtendedFile interface {
	fs.File
	io.Writer
	io.Seeker

	// Chmod changes the mode of the file to mode. If there is an error, it will be of type *fs.PathError.
	Chmod(mode fs.FileMode) error

	// Chown changes the numeric uid and gid of the named file. If there is an error, it will be of type *fs.PathError.
	Chown(uid, gid int) error

	// Truncate changes the size of the file. It does not change the I/O offset. If there is an error, it will be of
	// type *fs.PathError.
	Truncate(size int64) error
}

ExtendedFile extends fs.File bringing it closer in abilities to the os.File.

type Interface

type Interface interface {
	Exec(cmd string) (stdout string, stderr string, exitCode int, err error)
	POpen(cmd string, stdin io.Reader, stdout io.Writer, stderr io.Writer) (exitCode int, err error)
	io.Closer
}

type MkdirFS

type MkdirFS interface {
	fs.FS

	// MkdirAll creates a directory named path, along with any necessary parents, and returns nil, or else returns an
	// error. The permission bits perm (before umask) are used for last directory that MkdirAll creates. If path is
	// already a directory, MkdirAll does nothing and returns nil.
	MkdirAll(path string, perm fs.FileMode) error
}

MkdirFS is the interface implemented by a file system that provides mkdir capabilities.

type Tunneler

type Tunneler interface {
	// `network` can be tcp, tcp4, tcp6, unix
	TunnelTo(ctx context.Context, network, addr string) (net.Conn, error)
	io.Closer
}

Tunneler interface creates net.Conn originating from the remote ssh host to target `addr`

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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