instance

package
v0.86.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 License: AGPL-3.0 Imports: 25 Imported by: 0

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