exec

package
v0.0.24 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cmd

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

func NewCommand

func NewCommand(name string) *Cmd

func (*Cmd) Args

func (c *Cmd) Args(args ...string) *Cmd

func (Cmd) Base

func (c Cmd) Base() *Cmd

func (Cmd) Command

func (c Cmd) Command() []string

func (*Cmd) Cwd

func (c *Cmd) Cwd(path string) *Cmd

func (*Cmd) Done

func (c *Cmd) Done() <-chan struct{}

func (*Cmd) Env

func (c *Cmd) Env(env ...string) *Cmd

func (*Cmd) Logger

func (c *Cmd) Logger(l *logrus.Entry) *Cmd

func (*Cmd) NoWait

func (c *Cmd) NoWait() *Cmd

func (*Cmd) PostEnd

func (c *Cmd) PostEnd(f func() error) *Cmd

func (*Cmd) PostStart

func (c *Cmd) PostStart(f func(p *os.Process) error) *Cmd

func (*Cmd) PreStart

func (c *Cmd) PreStart(f func() error) *Cmd

func (*Cmd) Quiet

func (c *Cmd) Quiet() *Cmd

func (*Cmd) Run

func (c *Cmd) Run(ctx context.Context) (string, error)

func (*Cmd) Started

func (c *Cmd) Started() <-chan struct{}

func (*Cmd) Stderr

func (c *Cmd) Stderr(w io.Writer) *Cmd

func (*Cmd) Stdin

func (c *Cmd) Stdin(r io.Reader) *Cmd

func (*Cmd) Stdout

func (c *Cmd) Stdout(w io.Writer) *Cmd

type DockerCmd

type DockerCmd struct {
	Cmd
}

func NewDockerCommand

func NewDockerCommand() *DockerCmd

func (DockerCmd) Build

func (c DockerCmd) Build(workDir string, options ...string) *Cmd

func (DockerCmd) GetPlatform

func (c DockerCmd) GetPlatform(ctx context.Context, image string) (*Platform, error)

func (DockerCmd) ImageInspect

func (c DockerCmd) ImageInspect(options ...string) *Cmd

func (DockerCmd) Pull

func (c DockerCmd) Pull(image, tag string, options ...string) *Cmd

func (DockerCmd) Push

func (c DockerCmd) Push(image, tag string, options ...string) *Cmd

type GoCmd

type GoCmd struct {
	Cmd
}

func NewGoCommand

func NewGoCommand() *GoCmd

func (GoCmd) Build

func (c GoCmd) Build(output string, inputs []string, flags ...string) *Cmd

type HelmCmd

type HelmCmd struct {
	Cmd
}

func NewHelmCommand

func NewHelmCommand() *HelmCmd

func (HelmCmd) GetLatestRevision

func (c HelmCmd) GetLatestRevision(ctx context.Context, deployment string) (int, error)

func (HelmCmd) Rollback

func (c HelmCmd) Rollback(deployment string, revision int) *Cmd

type KubectlCmd

type KubectlCmd struct {
	Cmd
}

func NewKubectlCommand

func NewKubectlCommand() *KubectlCmd

func (KubectlCmd) CopyToPod

func (c KubectlCmd) CopyToPod(pod, container, source, destination string) *Cmd

func (KubectlCmd) CreateConfigMap

func (c KubectlCmd) CreateConfigMap(name string, keyMap map[string]string) *KubectlCmd

func (KubectlCmd) CreateConfigMapFromFile

func (c KubectlCmd) CreateConfigMapFromFile(name, path string) *Cmd

func (KubectlCmd) DeleteConfigMap

func (c KubectlCmd) DeleteConfigMap(name string) *Cmd

func (KubectlCmd) DeleteService

func (c KubectlCmd) DeleteService(service string) *Cmd

func (KubectlCmd) ExecPod

func (c KubectlCmd) ExecPod(pod, container string, cmd []string) *Cmd

func (KubectlCmd) ExecShell

func (c KubectlCmd) ExecShell(resource, path string) *Cmd

func (KubectlCmd) ExposePod

func (c KubectlCmd) ExposePod(pod string, host string, port int) *Cmd

func (KubectlCmd) GetConfigMapKey

func (c KubectlCmd) GetConfigMapKey(ctx context.Context, name, key string) (string, error)

func (KubectlCmd) GetContainerFromDeployment

func (_ KubectlCmd) GetContainerFromDeployment(container string, d *apps.Deployment) (*core.Container, error)

func (KubectlCmd) GetContainers

func (c KubectlCmd) GetContainers(deployment apps.Deployment) []string

func (KubectlCmd) GetDeployment

func (c KubectlCmd) GetDeployment(ctx context.Context, deployment string) (*apps.Deployment, error)

func (KubectlCmd) GetDeploymentFromConfigMap

func (c KubectlCmd) GetDeploymentFromConfigMap(ctx context.Context, deployment, configMapKey string) (*apps.Deployment, error)

func (KubectlCmd) GetDeployments

func (c KubectlCmd) GetDeployments(ctx context.Context) ([]string, error)

func (KubectlCmd) GetImage

func (c KubectlCmd) GetImage(ctx context.Context, deployment v1.Deployment, container string) (string, error)

func (KubectlCmd) GetLatestRevision

func (c KubectlCmd) GetLatestRevision(ctx context.Context, deployment string) (int, error)

func (KubectlCmd) GetMostRecentRunningPodBySelectors

func (c KubectlCmd) GetMostRecentRunningPodBySelectors(ctx context.Context,
	selectors map[string]string) (string, error)

func (KubectlCmd) GetNamespaces

func (c KubectlCmd) GetNamespaces(ctx context.Context) ([]string, error)

func (KubectlCmd) GetPIDsOf

func (c KubectlCmd) GetPIDsOf(ctx context.Context, pod, container, process string) (pids []string, err error)

func (KubectlCmd) GetPods

func (c KubectlCmd) GetPods(ctx context.Context, selectors map[string]string) ([]string, error)

func (KubectlCmd) GetPodsByLabels

func (c KubectlCmd) GetPodsByLabels(ctx context.Context, labels []string) ([]string, error)

func (KubectlCmd) KillPidsOnPod

func (c KubectlCmd) KillPidsOnPod(ctx context.Context, pod, container string, pids []string, murder bool) []error

func (KubectlCmd) PatchDeployment

func (c KubectlCmd) PatchDeployment(patch, deployment string) *Cmd

func (KubectlCmd) PortForwardPod

func (c KubectlCmd) PortForwardPod(pod string, host string, port int) *Cmd

func (KubectlCmd) RestartDeployment

func (c KubectlCmd) RestartDeployment(deployment string) *Cmd

func (KubectlCmd) RolloutUndo

func (c KubectlCmd) RolloutUndo(deployment string, revision int) *Cmd

func (KubectlCmd) RolloutUndoToPrevious

func (c KubectlCmd) RolloutUndoToPrevious(deployment string) *Cmd

func (KubectlCmd) UpdateChangeCause

func (c KubectlCmd) UpdateChangeCause(deployment, cause string) *Cmd

func (KubectlCmd) ValidateContainer

func (c KubectlCmd) ValidateContainer(d apps.Deployment, container *string) error

func (KubectlCmd) ValidateDeployment

func (c KubectlCmd) ValidateDeployment(ctx context.Context, namespace, deployment string) error

func (KubectlCmd) ValidateNamespace

func (c KubectlCmd) ValidateNamespace(ctx context.Context, namespace string) error

func (KubectlCmd) ValidatePod

func (c KubectlCmd) ValidatePod(ctx context.Context, d apps.Deployment, pod *string) error

func (KubectlCmd) WaitForPodState

func (c KubectlCmd) WaitForPodState(pod, condition, timeout string) *Cmd

func (KubectlCmd) WaitForRollout

func (c KubectlCmd) WaitForRollout(deployment, timeout string) *Cmd

type Platform

type Platform struct {
	OS   string
	Arch string
}

func NewPlatform

func NewPlatform(v string) (*Platform, error)

func (Platform) String

func (p Platform) String() string

Jump to

Keyboard shortcuts

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