sandbox

package
v0.0.47 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Request

type Request struct {
	Ref        name.Reference
	Name       string
	Namespace  string
	WorkingDir string
	User       int64
	Group      int64
	Env        map[string]string
	Entrypoint []string
	Cmd        []string
	Resources  ResourceRequest
	Labels     map[string]string
}

Request is the common configuration options for all sandbox types. This is essentially a wrapper around a Pod spec scoped specifically for a sandbox usage.

type ResourceRequest

type ResourceRequest struct {
	Limits   map[string]resource.Quantity
	Requests map[string]resource.Quantity
}

ResourceRequest is really just a wrapper around a pods resource request.

type Runner

type Runner interface {
	Run(ctx context.Context, cmd harness.Command) error
}

type Sandbox

type Sandbox interface {
	Start(ctx context.Context) (Runner, error)
	Destroy(ctx context.Context) error
}

Sandbox is an interface for defining the sandbox where tests are executed. Each instance of a sandbox is responsible for the lifecycle of only one sandbox environment. Configuration for the sandbox is handled at instantiation.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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