host

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiscoverHost

func DiscoverHost()

DiscoverHost discover information about the host

func Exec

func Exec(cmd *exec.Cmd) string

Exec exec command on the host and return the output

func ExecPod added in v0.1.0

func ExecPod(options *PodOptions) error

func GetKubeClient added in v0.1.0

func GetKubeClient() (
	config *rest.Config,
	clientset *kubernetes.Clientset,
	namespace string,
	err error,
)

Types

type Host

type Host struct {
	Name string
	User string
	UID  int64
	GID  int64
	Home string
	Cwd  string
}

Host facts about the host

type PodOptions added in v0.1.0

type PodOptions struct {
	Config    *rest.Config
	Clientset *kubernetes.Clientset
	Namespace string
	PodSpec   *v1.Pod
	Container string
	Mode      PodRunMode
	ExecCmd   []string
	Stdin     io.Reader
	Stdout    io.Writer
	Stderr    io.Writer
	Tty       bool
	Ports     map[int]int
}

type PodRunMode added in v0.1.0

type PodRunMode string
const (
	PodRunModeModeAttach PodRunMode = "PodRunModeModeAttach"
	PodRunModeModeExec   PodRunMode = "PodRunModeModeExec"
	PodRunModeModeLogs   PodRunMode = "PodRunModeModeLogs"
)

Jump to

Keyboard shortcuts

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