task

package
v0.0.0-...-b0449d7 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2023 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandOutput

type CommandOutput struct {
	ExitCode int    `json:"exit_code"`
	Body     []byte `json:"body"`
}

CommandOutput contains the body and the exit code of the command execution.

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) ([]*CommandOutput, error)

Run runs a task.

type KubernetesTask

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

func NewKubernetesTask

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

func (*KubernetesTask) Run

func (t *KubernetesTask) Run(ctx context.Context) ([]*CommandOutput, 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
}

type Runner

type Runner interface {
	Run(ctx context.Context) ([]*CommandOutput, error)
}

Jump to

Keyboard shortcuts

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