cmdutil

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2019 License: Apache-2.0 Imports: 10 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunCommand

func RunCommand(ctx context.Context, command Command, user string, env []string, timeoutDuration time.Duration) (string, string, int, error)

RunCommand executes command with context

Types

type Command

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

Command represents a plugin/probe command to allow string and []string.

func CommandArgs

func CommandArgs(ss []string) Command

CommandArgs returns a Command of []string.

func CommandString

func CommandString(s string) Command

CommandString returns a Command of string.

func (Command) IsEmpty

func (c Command) IsEmpty() bool

IsEmpty returns the command is empty.

func (Command) String

func (c Command) String() string

String defines the string representation of Command.

func (Command) ToArgs

func (c Command) ToArgs() []string

ToArgs returns the command arguments.

func (*Command) UnmarshalYAML

func (c *Command) UnmarshalYAML(unmarshal func(v interface{}) error) (err error)

UnmarshalYAML defines unmarshaler from YAML.

Jump to

Keyboard shortcuts

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