cmd

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 16, 2020 License: Apache-2.0 Imports: 50 Imported by: 0

Documentation

Overview

Code generated by go generate; DO NOT EDIT.

Code generated by go generate; DO NOT EDIT.

Code generated by go generate; DO NOT EDIT.

Code generated by go generate; DO NOT EDIT.

Code generated by go generate; DO NOT EDIT.

Code generated by go generate; DO NOT EDIT.

Code generated by go generate; DO NOT EDIT.

Code generated by go generate; DO NOT EDIT.

Code generated by go generate; DO NOT EDIT.

Code generated by go generate; DO NOT EDIT.

Code generated by go generate; DO NOT EDIT.

Code generated by go generate; DO NOT EDIT.

Code generated by go generate; DO NOT EDIT.

Code generated by go generate; DO NOT EDIT.

Code generated by go generate; DO NOT EDIT.

Index

Constants

This section is empty.

Variables

View Source
var ErrPodCompleted = fmt.Errorf("pod ran to completion")

ErrPodCompleted is returned by PodRunning or PodContainerRunning to indicate that the pod has already reached completed state.

Functions

func CreateTar

func CreateTar() (*bytes.Buffer, error)

Creates tarball from *.tf files found in 'path' TODO: unit test TODO: skip this (and the config file it's embedded in) if command doesn't need *.tf files (e.g. terraform import)

func DoubleDashArgsHandler added in v0.1.2

func DoubleDashArgsHandler(args []string) []string

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func ShellWrapDoubleDashArgsHandler added in v0.1.2

func ShellWrapDoubleDashArgsHandler(args []string) []string

Types

type App

type App struct {
	Workspace string
	Namespace string
	Tarball   *bytes.Buffer
	Command   command.Command
	Args      []string
	Resources []runtime.Object
	// embed?
	Client client.Client
	// embed?
	KubeClient     kubernetes.Interface
	Clientset      v1alpha1clientset.StokV1alpha1Interface
	PodWaitTimeout time.Duration
	// contains filtered or unexported fields
}

func (*App) AddToCleanup

func (app *App) AddToCleanup(resource runtime.Object)

func (*App) Cleanup

func (app *App) Cleanup()

func (*App) CreateCommand

func (app *App) CreateCommand() error

func (*App) CreateConfigMap

func (app *App) CreateConfigMap(tarball *bytes.Buffer) (*corev1.ConfigMap, error)

func (*App) Run

func (app *App) Run() error

func (*App) WaitForPod

func (app *App) WaitForPod(name string, exitCondition watchtools.ConditionFunc, timeout time.Duration) (*corev1.Pod, error)

waitForPod watches the given pod until the exitCondition is true TODO: replace with watching cmd

func (*App) WaitForWorkspaceReady

func (app *App) WaitForWorkspaceReady(name string, timeout time.Duration) (command.Command, error)

waitForWorkspaceReady watches the command until the WorkspaceReady condition is true

func (*App) Write

func (app *App) Write(in []byte) (int, error)

permit app to be passed as a writer for the above handleAttachPod method

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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