exec

package
v0.2.6 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: 6 Imported by: 0

Documentation

Overview

Package exec provides utility functions for executing shell commands.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Execute enables monkey-patching cmd execution for integration tests.
	Execute = execute

	// Docker references to the docker binary.
	Docker string
	// DockerBin is a Binary struct that references the docker binary.
	DockerBin = Binary{"docker", &Docker}

	// Helm references to the helm binary.
	Helm string
	// HelmBin is a Binary struct that references the helm binary.
	HelmBin = Binary{"helm", &Helm}

	// Kind references to the kind binary.
	Kind string
	// KindBin is a Binary struct that references the kind binary.
	KindBin = Binary{"kind", &Kind}

	// Kubectl references to the kubectl binary.
	Kubectl string
	// KubectlBin is a Binary struct that references the kubectl binary.
	KubectlBin = Binary{"kubectl", &Kubectl}

	// Nslookup references to the nslookup binary.
	Nslookup string
	// NslookupBin is a Binary struct that references the nslookup binary.
	NslookupBin = Binary{"nslookup", &Nslookup}

	// Ping references to the ping binary.
	Ping string
	// PingBin is a Binary struct that references the ping binary.
	PingBin = Binary{"ping", &Ping}
)

Functions

func CheckBinaries

func CheckBinaries(binaries []Binary) error

CheckBinaries checks if the required binaries are installed and available on the PATH and returns an error if any are missing.

Types

type Binary added in v0.1.0

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

Binary represents a binary executable.

type WriterStringer

type WriterStringer interface {
	String() string
	Write(p []byte) (n int, err error)
}

WriterStringer is an interface that combines the io.Writer and fmt.Stringer interfaces

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳