instance

package
v0.125.1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: AGPL-3.0 Imports: 27 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
	// contains filtered or unexported fields
}

func (*PipeInstance) Attributes added in v0.114.2

func (pi *PipeInstance) Attributes() []attribute.KeyValue

func (*PipeInstance) Close added in v0.45.0

func (pi *PipeInstance) Close(context.Context) 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
	// contains filtered or unexported fields
}

func (*PrebuiltInstance) Attributes added in v0.114.2

func (prebuilt *PrebuiltInstance) Attributes() []attribute.KeyValue

func (*PrebuiltInstance) Close added in v0.45.0

func (prebuilt *PrebuiltInstance) Close(context.Context) 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) Attributes added in v0.114.2

func (si *UnsupportedInstance) Attributes() []attribute.KeyValue

func (*UnsupportedInstance) Close added in v0.55.0

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