kubernetes

package
v0.0.0-...-69999d2 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package kubernetes contains code for accessing compute resources via the Kubernetes v1 Batch API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	events.Computer
	// contains filtered or unexported fields
}

Backend represents the local backend.

func NewBackend

func NewBackend(ctx context.Context, conf config.Kubernetes, reader tes.ReadOnlyServer, writer events.Writer, log *logger.Logger) (*Backend, error)

NewBackend returns a new local Backend instance.

func (*Backend) Cancel

func (b *Backend) Cancel(ctx context.Context, taskID string) error

Cancel removes tasks that are pending kubernetes v1/batch jobs.

func (*Backend) Close

func (b *Backend) Close()

func (*Backend) Submit

func (b *Backend) Submit(ctx context.Context, task *tes.Task) error

Submit submits a task to the as a kubernetes v1/batch job.

func (*Backend) WriteEvent

func (b *Backend) WriteEvent(ctx context.Context, ev *events.Event) error

WriteEvent writes an event to the compute backend. Currently, only TASK_CREATED is handled, which calls Submit.

Jump to

Keyboard shortcuts

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