Documentation ¶
Index ¶
- func NewKubeClientConfig(kubeconfigPath, context, namespace string) clientcmd.ClientConfig
- type ContainerConfig
- type ContainerExec
- type ContainerSlice
- type DockerContainer
- type DockerContainerExec
- type DockerDriver
- func (d *DockerDriver) Archs(ctx context.Context) ([]types.Arch, error)
- func (d *DockerDriver) ExecutorGroup(ctx context.Context) (string, error)
- func (d *DockerDriver) GetExecutors(ctx context.Context) ([]string, error)
- func (d *DockerDriver) GetPods(ctx context.Context, all bool) ([]Pod, error)
- func (d *DockerDriver) NewPod(ctx context.Context, podConfig *PodConfig, out io.Writer) (Pod, error)
- func (d *DockerDriver) Setup(ctx context.Context) error
- type DockerPod
- func (dp *DockerPod) Exec(ctx context.Context, execConfig *ExecConfig) (ContainerExec, error)
- func (dp *DockerPod) ExecutorID() string
- func (dp *DockerPod) ID() string
- func (dp *DockerPod) Remove(ctx context.Context) error
- func (dp *DockerPod) Stop(ctx context.Context) error
- func (dp *DockerPod) TaskID() string
- type Driver
- type ExecConfig
- type K8sContainerExec
- type K8sDriver
- func (d *K8sDriver) Archs(ctx context.Context) ([]types.Arch, error)
- func (d *K8sDriver) ExecutorGroup(ctx context.Context) (string, error)
- func (d *K8sDriver) GetExecutors(ctx context.Context) ([]string, error)
- func (d *K8sDriver) GetPods(ctx context.Context, all bool) ([]Pod, error)
- func (d *K8sDriver) NewPod(ctx context.Context, podConfig *PodConfig, out io.Writer) (Pod, error)
- func (d *K8sDriver) Setup(ctx context.Context) error
- type K8sPod
- type LeaseData
- type Pod
- type PodConfig
- type Stdin
- type Volume
- type VolumeTmpFS
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewKubeClientConfig ¶
func NewKubeClientConfig(kubeconfigPath, context, namespace string) clientcmd.ClientConfig
NewKubeClientConfig return a kube client config that will by default use an in cluster client config or, if not available or overriden an external client config using the default client behavior used also by kubectl.
Types ¶
type ContainerConfig ¶
type ContainerExec ¶
type ContainerSlice ¶
type ContainerSlice []*DockerContainer
func (ContainerSlice) Len ¶
func (p ContainerSlice) Len() int
func (ContainerSlice) Less ¶
func (p ContainerSlice) Less(i, j int) bool
func (ContainerSlice) Swap ¶
func (p ContainerSlice) Swap(i, j int)
type DockerContainer ¶
type DockerContainer struct { Index int dockertypes.Container }
type DockerContainerExec ¶
type DockerContainerExec struct {
// contains filtered or unexported fields
}
func (*DockerContainerExec) Stdin ¶
func (e *DockerContainerExec) Stdin() io.WriteCloser
type DockerDriver ¶
type DockerDriver struct {
// contains filtered or unexported fields
}
func NewDockerDriver ¶
func NewDockerDriver(log zerolog.Logger, executorID, toolboxPath, initImage string, initDockerConfig *registry.DockerConfig) (*DockerDriver, error)
func (*DockerDriver) ExecutorGroup ¶
func (d *DockerDriver) ExecutorGroup(ctx context.Context) (string, error)
func (*DockerDriver) GetExecutors ¶
func (d *DockerDriver) GetExecutors(ctx context.Context) ([]string, error)
type DockerPod ¶
type DockerPod struct {
// contains filtered or unexported fields
}
func (*DockerPod) Exec ¶
func (dp *DockerPod) Exec(ctx context.Context, execConfig *ExecConfig) (ContainerExec, error)
func (*DockerPod) ExecutorID ¶
type Driver ¶
type Driver interface { Setup(ctx context.Context) error NewPod(ctx context.Context, podConfig *PodConfig, out io.Writer) (Pod, error) GetPods(ctx context.Context, all bool) ([]Pod, error) ExecutorGroup(ctx context.Context) (string, error) GetExecutors(ctx context.Context) ([]string, error) Archs(ctx context.Context) ([]types.Arch, error) }
Driver is a generic interface around the pod concept (a group of "containers" sharing, at least, the same network namespace) It's just tailored aroun the need of an executor and should be quite generic to work with multiple implementations. For example: * Docker containers * Kubernetes pods * A Virtual Machine on which we execute multiple processes
type ExecConfig ¶
type K8sContainerExec ¶
type K8sContainerExec struct {
// contains filtered or unexported fields
}
func (*K8sContainerExec) Stdin ¶
func (e *K8sContainerExec) Stdin() io.WriteCloser
type K8sDriver ¶
type K8sDriver struct {
// contains filtered or unexported fields
}
func NewK8sDriver ¶
func (*K8sDriver) ExecutorGroup ¶
func (*K8sDriver) GetExecutors ¶
type K8sPod ¶
type K8sPod struct {
// contains filtered or unexported fields
}
func (*K8sPod) Exec ¶
func (p *K8sPod) Exec(ctx context.Context, execConfig *ExecConfig) (ContainerExec, error)
func (*K8sPod) ExecutorID ¶
type Pod ¶
type Pod interface { // ID returns the pod id ID() string // ExecutorID return the pod owner executor id ExecutorID() string // TaskID return the pod task id TaskID() string // Stop stops the pod Stop(ctx context.Context) error // Stop stops the pod Remove(ctx context.Context) error // Exec executes a command inside the first container in the Pod Exec(ctx context.Context, execConfig *ExecConfig) (ContainerExec, error) }
type PodConfig ¶
type PodConfig struct { ID string TaskID string Containers []*ContainerConfig Arch types.Arch // The container dir where the init volume will be mounted InitVolumeDir string DockerConfig *registry.DockerConfig }
type Stdin ¶
type Stdin struct {
// contains filtered or unexported fields
}
Stdin is a wrapped HikackedResponse implementing io.WriteCloser so users can easily close stdin. Internally it will close only the write side of the conn.
type Volume ¶ added in v0.3.0
type Volume struct { Path string TmpFS *VolumeTmpFS }
type VolumeTmpFS ¶ added in v0.3.0
type VolumeTmpFS struct {
Size int64
}