engine

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: Apache-2.0 Imports: 12 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
	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
}

ExecutorConfig allows to customise the executor behaviour.

type InstanceIDGenerator

type InstanceIDGenerator func() uuid.UUID

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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