exec

package
v0.0.0-...-c283e9f Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2021 License: BSD-3-Clause Imports: 13 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterClient

type ClusterClient interface {
	Hosts() ([]*cluster.Host, error)
	Host(string) (*cluster.Host, error)
}

type Cmd

type Cmd struct {
	Job *host.Job

	TTY  bool
	Meta map[string]string

	Args []string

	ImageArtifact *ct.Artifact

	Env map[string]string

	Volumes    []*ct.VolumeReq
	Mounts     []host.Mount
	Resources  resource.Resources
	WorkingDir string

	HostNetwork      bool
	HostPIDNamespace bool

	Stdin io.Reader

	Stdout io.Writer
	Stderr io.Writer

	TermHeight, TermWidth uint16

	LinuxCapabilities []string
	AllowedDevices    []*host.Device
	Profiles          []host.JobProfile

	// Host is used to communicate with the host that the job will run on
	Host *cluster.Host
	// contains filtered or unexported fields
}

func Command

func Command(artifact *ct.Artifact, args ...string) *Cmd

func CommandUsingCluster

func CommandUsingCluster(c ClusterClient, artifact *ct.Artifact, args ...string) *Cmd

func CommandUsingHost

func CommandUsingHost(h *cluster.Host, artifact *ct.Artifact, args ...string) *Cmd

func Job

func Job(artifact *ct.Artifact, job *host.Job) *Cmd

func JobUsingCluster

func JobUsingCluster(c ClusterClient, artifact *ct.Artifact, job *host.Job) *Cmd

func JobUsingHost

func JobUsingHost(h *cluster.Host, artifact *ct.Artifact, job *host.Job) *Cmd

func (*Cmd) CombinedOutput

func (c *Cmd) CombinedOutput() ([]byte, error)

func (*Cmd) Kill

func (c *Cmd) Kill() error

func (*Cmd) Output

func (c *Cmd) Output() ([]byte, error)

func (*Cmd) ResizeTTY

func (c *Cmd) ResizeTTY(height, width uint16) error

func (*Cmd) Run

func (c *Cmd) Run() error

func (*Cmd) Signal

func (c *Cmd) Signal(sig int) error

func (*Cmd) Start

func (c *Cmd) Start() error

func (*Cmd) StderrPipe

func (c *Cmd) StderrPipe() (io.Reader, error)

func (*Cmd) StdinPipe

func (c *Cmd) StdinPipe() (io.WriteCloser, error)

func (*Cmd) StdoutPipe

func (c *Cmd) StdoutPipe() (io.Reader, error)

func (*Cmd) Wait

func (c *Cmd) Wait() error

type ExitError

type ExitError int

func (ExitError) Error

func (e ExitError) Error() string

Jump to

Keyboard shortcuts

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