Documentation ¶
Index ¶
- Variables
- func CreateTar() (*bytes.Buffer, error)
- func Execute()
- func InitClient() (*client.Client, *kubernetes.Clientset, *v1alpha1clientset.StokV1alpha1Client, ...)
- type App
- func (app *App) AddToCleanup(resource runtime.Object)
- func (app *App) Cleanup()
- func (app *App) CreateCommand(name string) (*v1alpha1.Command, error)
- func (app *App) CreateConfigMap(tarball *bytes.Buffer) (string, error)
- func (app *App) CreateRole(name string) (string, error)
- func (app *App) CreateRoleBinding(name string) (string, error)
- func (app *App) CreateServiceAccount(name string) (string, error)
- func (app *App) Run() error
- func (app *App) WaitForPod(name string, exitCondition watchtools.ConditionFunc, timeout time.Duration) (*corev1.Pod, error)
- func (app *App) WaitForWorkspaceReady(name string, timeout time.Duration) (*v1alpha1.Command, error)
- func (app *App) Write(in []byte) (int, error)
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 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 InitClient ¶
func InitClient() (*client.Client, *kubernetes.Clientset, *v1alpha1clientset.StokV1alpha1Client, error)
Types ¶
type App ¶
type App struct { Workspace string Namespace string Tarball *bytes.Buffer Command []string Args []string Resources []runtime.Object // embed? Client client.Client // embed? KubeClient kubernetes.Interface Clientset v1alpha1clientset.StokV1alpha1Interface PodWaitTimeout time.Duration }
func (*App) AddToCleanup ¶
func (*App) CreateConfigMap ¶
func (*App) CreateServiceAccount ¶
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
Click to show internal directories.
Click to hide internal directories.