driver

package
v0.2.3-rc Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyKubeDependency = "kube_cluster"
	SuspendAction     = "suspend"
	StartAction       = "start"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver struct {
	Conf       config.DriverConf
	CreateJob  func(ctx context.Context, conf kube.Config, j *job.Job) error
	SuspendJob func(ctx context.Context, conf kube.Config, j *job.Job) error
	DeleteJob  func(ctx context.Context, conf kube.Config, j *job.Job) error
	StartJob   func(ctx context.Context, conf kube.Config, j *job.Job) error
	GetJobPods func(ctx context.Context, conf kube.Config, j *job.Job, labels map[string]string) ([]kube.Pod, error)
	StreamLogs func(ctx context.Context, kubeConf kube.Config, j *job.Job, filter map[string]string) (<-chan module.LogChunk, error)
}

func (*Driver) Log added in v0.1.8

func (driver *Driver) Log(ctx context.Context, res module.ExpandedResource, filter map[string]string) (<-chan module.LogChunk, error)

func (*Driver) Output

func (driver *Driver) Output(ctx context.Context, exr module.ExpandedResource) (json.RawMessage, error)

func (*Driver) Plan

func (*Driver) Sync

func (driver *Driver) Sync(ctx context.Context, exr module.ExpandedResource) (*resource.State, error)

type IgnoreError

type IgnoreError bool

type Output

type Output struct {
	Namespace string     `json:"namespace"`
	JobName   string     `json:"jobName"`
	Pods      []kube.Pod `json:"pods"`
}

func ReadOutputData

func ReadOutputData(exr module.ExpandedResource) (*Output, error)

type PendingStep

type PendingStep string
const (
	Create  PendingStep = "create"
	Suspend PendingStep = "suspend"
	Delete  PendingStep = "delete"
	Start   PendingStep = "start"
)

type TransientData

type TransientData struct {
	PendingSteps []PendingStep `json:"pending_steps"`
}

func ReadTransientData

func ReadTransientData(exr module.ExpandedResource) (*TransientData, error)

Jump to

Keyboard shortcuts

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