instance

package
v0.108.5 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: AGPL-3.0 Imports: 26 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFailedToCreateInstance = errors.New("failed to create instance")
	ErrUnsupportedInstance    = errors.New("unsupported instance type")
)
View Source
var ErrPipeCreationFailed = errors.New("failed to create pipe instance")

Functions

func CreateTempArchive added in v0.3.0

func CreateTempArchive(dir string) (string, error)

func NewFromProto

func NewFromProto(
	anyInstance *any.Any,
	commands []*api.Command,
	customWorkingDir string,
	logger logger.Lightweight,
) (abstract.Instance, error)

Types

type PipeInstance added in v0.3.0

type PipeInstance struct {
	Stages           []PipeStage
	CPU              float32
	Memory           uint32
	CustomWorkingDir string
}

func (*PipeInstance) Close added in v0.45.0

func (pi *PipeInstance) Close() error

func (*PipeInstance) Run added in v0.3.0

func (pi *PipeInstance) Run(ctx context.Context, config *runconfig.RunConfig) (err error)

func (*PipeInstance) WorkingDirectory added in v0.16.0

func (pi *PipeInstance) WorkingDirectory(projectDir string, dirtyMode bool) string

type PipeStage added in v0.3.0

type PipeStage struct {
	Image                  string
	CommandFrom, CommandTo string
}

func PipeStagesFromCommands added in v0.3.0

func PipeStagesFromCommands(commands []*api.Command) ([]PipeStage, error)

PipeStagesFromCommands uses image hints in commands to build the stages.

type PrebuiltInstance added in v0.3.0

type PrebuiltInstance struct {
	Image      string
	Dockerfile string
	Arguments  map[string]string
}

func (*PrebuiltInstance) Close added in v0.45.0

func (prebuilt *PrebuiltInstance) Close() error

func (*PrebuiltInstance) Run added in v0.3.0

func (prebuilt *PrebuiltInstance) Run(ctx context.Context, config *runconfig.RunConfig) error

func (*PrebuiltInstance) WorkingDirectory added in v0.16.0

func (prebuilt *PrebuiltInstance) WorkingDirectory(projectDir string, dirtyMode bool) string

type UnsupportedInstance added in v0.55.0

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

func (*UnsupportedInstance) Close added in v0.55.0

func (si *UnsupportedInstance) Close() error

func (*UnsupportedInstance) Run added in v0.55.0

func (*UnsupportedInstance) WorkingDirectory added in v0.55.0

func (si *UnsupportedInstance) WorkingDirectory(projectDir string, dirtyMode bool) string

Jump to

Keyboard shortcuts

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