runtime

package
v0.0.0-...-6feaff8 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DockerTask

type DockerTask struct {
	// contains filtered or unexported fields
}

func NewDockerTask

func NewDockerTask(ctx context.Context, options NewDockerTaskOptions) (*DockerTask, error)

NewDockerTask creates a new task based on the given code and ready for execution.

func (*DockerTask) Run

func (t *DockerTask) Run(ctx context.Context) (*ExecOutput, error)

Run runs a task.

type ExecInput

type ExecInput struct {
	RunInstructions ExecInputRunInstructions `json:"runInstructions"`
	Files           []*ExecInputFile         `json:"files"`
	Stdin           *string                  `json:"stdin"`
}

type ExecInputFile

type ExecInputFile struct {
	Name    string `json:"name"`
	Content string `json:"content"`
}

type ExecInputRunInstructions

type ExecInputRunInstructions struct {
	BuildCommands []string `json:"buildCommands"`
	RunCommand    string   `json:"runCommand"`
}

type ExecOutput

type ExecOutput struct {
	Stdout   string `json:"stdout"`
	Stderr   string `json:"stderr"`
	Error    string `json:"error"`
	Duration int64  `json:"duration"`
}

ExecOutput is the glot output style.

type ExecRuntime

type ExecRuntime interface {
	Run(ctx context.Context) (*ExecOutput, error)
}

type KubernetesTask

type KubernetesTask struct {
	// contains filtered or unexported fields
}

func NewKubernetesTask

func NewKubernetesTask(_ context.Context, options NewKubernetesTaskOptions) (*KubernetesTask, error)

func (*KubernetesTask) Run

func (t *KubernetesTask) Run(ctx context.Context) (*ExecOutput, error)

type NewDockerTaskOptions

type NewDockerTaskOptions struct {
	Language string
	Template *db.Tpl
	Code     []byte
}

type NewKubernetesTaskOptions

type NewKubernetesTaskOptions struct {
	Language string
	Template *db.Tpl
	Code     []byte
}

Jump to

Keyboard shortcuts

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