runtime

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package runtime contains runtime implementations that can execute workflow actions. They are responsible for extracting workflow failure reason and messages from the the action file system at the following locations:

/tinkerbell/failure-reason
/tinkerbell/failure-message

Index

Constants

View Source
const (
	// ReasonMountPath is the path used by Actions to write their failure reasons.
	ReasonMountPath = "/tinkerbell/failure-reason"

	// MessageMountPath is the path used by Actions to write their failure message.
	MessageMountPath = "/tinkerbell/failure-message"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Docker

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

Docker is a docker runtime that satisfies agent.ContainerRuntime.

func NewDocker

func NewDocker(opts ...DockerOption) (*Docker, error)

NewDocker creates a new Docker instance.

func (*Docker) Run

func (d *Docker) Run(ctx context.Context, a workflow.Action) error

Run satisfies agent.ContainerRuntime.

type DockerOption

type DockerOption func(*Docker)

DockerOption defines optional configuration for a Docker instance.

func WithClient

func WithClient(clnt *client.Client) DockerOption

WithClient returns an option to configure a Docker client on a Docker instance.

func WithLogger

func WithLogger(log logr.Logger) DockerOption

WithLogger returns an option to configure the logger on a Docker instance.

type Fake

type Fake struct {
	Log logr.Logger
}

Fake is a runtime that always succeeds. It does not literally execute any actions.

func Noop

func Noop() Fake

func (Fake) Run

func (f Fake) Run(_ context.Context, a workflow.Action) error

Run satisfies agent.ContainerRuntime.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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