juju: github.com/juju/juju/caas/kubernetes/provider/exec Index | Files | Directories

package exec

import "github.com/juju/juju/caas/kubernetes/provider/exec"


Package Files

copy.go exec.go

type CopyParam Uses

type CopyParam struct {
    Src  FileResource
    Dest FileResource
    // contains filtered or unexported fields

CopyParam holds all the necessary parameters for a copy request.

type ExecParams Uses

type ExecParams struct {
    Commands      []string
    Env           []string
    PodName       string
    ContainerName string
    WorkingDir    string

    Stdin  io.Reader
    Stdout io.Writer
    Stderr io.Writer

ExecParams holds all the necessary parameters for Exec.

type Executor Uses

type Executor interface {
    Exec(params ExecParams, cancel <-chan struct{}) error
    Copy(params CopyParam, cancel <-chan struct{}) error

Executor provides the API to exec or cp on a pod inside the cluster.

func New Uses

func New(namespace string, clientset kubernetes.Interface, config *rest.Config) Executor

New contructs an executor. no cross model/namespace allowed.

func NewInCluster Uses

func NewInCluster(namespace string) (Executor, error)

NewInCluster returns a in-cluster exec client.

type ExitError Uses

type ExitError interface {
    String() string
    ExitStatus() int

ExitError exposes what we need from k8s exec.ExitError

type FileResource Uses

type FileResource struct {
    Path          string
    PodName       string
    ContainerName string

FileResource holds all the necessary parameters for the source or destination of a copy request.


mocksPackage mocks is a generated GoMock package.

Package exec imports 21 packages (graph) and is imported by 10 packages. Updated 2019-10-10. Refresh now. Tools for package owners.