runner

package
v0.0.0-...-e3103ca Latest Latest
Warning

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

Go to latest
Published: May 21, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const INSTANCE = "k8srun.yashkov.org/instance"
View Source
const PREFIX = "k8srun.yashkov.org/prefix"

Variables

This section is empty.

Functions

This section is empty.

Types

type Execution

type Execution struct {
	Job  *Job
	Pods typedCore.PodInterface
	Pod  *core.Pod
}

func (*Execution) CopyLogs

func (execution *Execution) CopyLogs(ctx context.Context, dst io.Writer) error

func (*Execution) Delete

func (execution *Execution) Delete(ctx context.Context) error

func (*Execution) WaitForCompletion

func (execution *Execution) WaitForCompletion(ctx context.Context) (int, error)

type Job

type Job struct {
	Instance  string
	Name      string
	Namespace string
	Template  string
	Args      []string
}

type K8sClient

type K8sClient interface {
	NewClientConfig(loader clientcmd.ClientConfigLoader,
		overrides *clientcmd.ConfigOverrides) clientcmd.ClientConfig
	NewClientset(c *rest.Config) (kubernetes.Interface, error)
}
var Client K8sClient = defaultK8sClient{}

type Runner

type Runner interface {
	Run(ctx context.Context, job *Job, out io.Writer) (int, error)
	Start(ctx context.Context, job *Job) (*Execution, error)
}

type RunnerFactory

type RunnerFactory interface {
	New(kubeconfig string) (Runner, error)
}

func NewRunnerFactory

func NewRunnerFactory() RunnerFactory

Jump to

Keyboard shortcuts

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