runner

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2025 License: MIT Imports: 6 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IContext

type IContext interface {
	// The root directory of the repository.
	Root() string

	// The Git context initialized at the root of the repository.
	Git() git.Context

	// The logger object.
	Log() log.ILog

	// On which component the runner executes.
	// Should not be able to change things in here.
	Component() *component.Component

	// On which target and step the runner executes.
	Target() target.ID

	// On which step the runner executes.
	Step() step.Index

	// The toolchain this runner runs in.
	Toolchain() string
}

type IRunner

type IRunner interface {
	ID() RegisterID
	Run(ctx IContext) error
}

type ISettings

type ISettings interface{}

type RegisterFunc

type RegisterFunc = func(
	key RegisterKey,
	data ...RunnerData,
)

type RegisterID

type RegisterID = string

The unique id the runner is registered on.

type RegisterKey

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

The key the runner is registered additionally per stage.

func NewRegisterKey

func NewRegisterKey(stage stage.Stage, runnerName string) RegisterKey

func (*RegisterKey) Name

func (r *RegisterKey) Name() string

func (*RegisterKey) Stage

func (r *RegisterKey) Stage() stage.Stage

type RunnerData

type RunnerData struct {
	// The Creator function for the runner.
	// The `runnerConfig` is the unmarshalled config from the
	// `component.Config`.
	Creator func(runnerConfig any) (IRunner, error)

	// The config unmarshaller for additional `config:` section
	// (can be nil if no config should be parsed).
	// The result will be passed to the creator.
	RunnerConfigUnmarshal step.RunnerConfigUnmarshaller

	// The default toolchain to use if not specified in config.
	DefaultToolchain string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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