engine

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExecutor

func NewExecutor(containerExecutor ContainerExecutor, conf *ExecutorConfig) (*executor, error)

NewExecutor returns a new executor.

Types

type ContainerConfig

type ContainerConfig struct {
	Name           string
	Image          string
	Executable     string
	Cmd            []string
	EnvVars        []string
	VolumeBindings []string
	Platform       *ocispec.Platform
}

ContainerConfig stripped down configuration that we need to run simple containers.

type ContainerExecutor

type ContainerExecutor interface {
	RunAndWait(ctx context.Context, conf ContainerConfig) error
}

ContainerExecutor can be implemented to execute containers with different backends.

type ExecutorConfig

type ExecutorConfig struct {
	CleanUpFindingsDB   bool
	InstanceIDGenerator InstanceIDGenerator
	TmpFolderProvisioner
}

ExecutorConfig allows to customise the executor behaviour.

type InstanceIDGenerator

type InstanceIDGenerator func() uuid.UUID

type TmpFolderProvisioner added in v0.0.2

type TmpFolderProvisioner func(instanceID uuid.UUID, folderType string) (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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