executor

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 13 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultExecutor

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

DefaultExecutor is the default yip Executor. It simply creates file and executes command for a linux executor

func (*DefaultExecutor) Analyze added in v1.0.0

func (e *DefaultExecutor) Analyze(stage string, fs vfs.FS, console plugins.Console, args ...string)

func (*DefaultExecutor) Apply

func (e *DefaultExecutor) Apply(stageName string, s schema.YipConfig, fs vfs.FS, console plugins.Console) error

Apply applies a yip Config file by creating files and running commands defined.

func (*DefaultExecutor) Conditionals

func (e *DefaultExecutor) Conditionals(p []Plugin)

func (*DefaultExecutor) Graph added in v1.0.2

func (e *DefaultExecutor) Graph(stage string, fs vfs.FS, console plugins.Console, source string) ([][]herd.GraphEntry, error)

func (*DefaultExecutor) Modifier

func (e *DefaultExecutor) Modifier(m schema.Modifier)

func (*DefaultExecutor) Plugins

func (e *DefaultExecutor) Plugins(p []Plugin)

func (*DefaultExecutor) Run

func (e *DefaultExecutor) Run(stage string, fs vfs.FS, console plugins.Console, args ...string) error

Run takes a list of URI to run yipfiles from. URI can be also a dir or a local path, as well as a remote

type Executor

type Executor interface {
	Apply(string, schema.YipConfig, vfs.FS, plugins.Console) error
	Run(string, vfs.FS, plugins.Console, ...string) error
	Plugins([]Plugin)
	Conditionals([]Plugin)
	Modifier(m schema.Modifier)
	Analyze(string, vfs.FS, plugins.Console, ...string)
	Graph(string, vfs.FS, plugins.Console, string) ([][]herd.GraphEntry, error)
}

Executor an executor applies a yip config

func NewExecutor

func NewExecutor(opts ...Options) Executor

NewExecutor returns an executor from the stringified version of it.

type Options

type Options func(d *DefaultExecutor) error

func WithConditionals

func WithConditionals(p ...Plugin) Options

WithConditionals sets the conditionals for the cloudrunner

func WithLogger

func WithLogger(i logger.Interface) Options

WithLogger sets the logger for the cloudrunner

func WithPlugins

func WithPlugins(p ...Plugin) Options

WithPlugins sets the plugins for the cloudrunner

type Plugin

type Plugin func(logger.Interface, schema.Stage, vfs.FS, plugins.Console) error

Jump to

Keyboard shortcuts

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