custom-pod-autoscaler: github.com/jthomperoo/custom-pod-autoscaler/execute/shell Index | Files

package shell

import "github.com/jthomperoo/custom-pod-autoscaler/execute/shell"

Package shell handles interactions with the OS shell

Index

Package Files

shell.go

Constants

const Type = "shell"

Type shell represents a shell command

type Execute Uses

type Execute struct {
    Command command
}

Execute represents a way to execute shell commands with values piped to them.

func (*Execute) ExecuteWithValue Uses

func (e *Execute) ExecuteWithValue(method *config.Method, value string) (string, error)

ExecuteWithValue executes a shell command with a value piped to it. If it exits with code 0, no error is returned and the stdout is captured and returned. If it exits with code 1, an error is returned and the stderr is captured and returned. If the timeout is reached, an error is returned.

func (*Execute) GetType Uses

func (e *Execute) GetType() string

GetType returns the shell executer type

Package shell imports 6 packages (graph) and is imported by 1 packages. Updated 2020-07-11. Refresh now. Tools for package owners.