entrypoint

package
v0.5.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entrypointer

type Entrypointer struct {
	// Entrypoint is the original specified entrypoint, if any.
	Entrypoint string
	// Args are the original specified args, if any.
	Args []string
	// WaitFile is the file to wait for. If not specified, execution begins
	// immediately.
	WaitFile string
	// WaitFileContent indicates the WaitFile should have non-zero size
	// before continuing with execution.
	WaitFileContent bool
	// PostFile is the file to write when complete. If not specified, no
	// file is written.
	PostFile string

	// Waiter encapsulates waiting for files to exist.
	Waiter Waiter
	// Runner encapsulates running commands.
	Runner Runner
	// PostWriter encapsulates writing files when complete.
	PostWriter PostWriter
}

Entrypointer holds fields for running commands with redirected entrypoints.

func (Entrypointer) Go

func (e Entrypointer) Go() error

Go optionally waits for a file, runs the command, and writes a post file.

func (Entrypointer) WritePostFile added in v0.2.0

func (e Entrypointer) WritePostFile(postFile string, err error)

type PostWriter

type PostWriter interface {
	// Write writes to the path when complete.
	Write(file string)
}

PostWriter encapsulates writing a file when complete.

type Runner

type Runner interface {
	Run(args ...string) error
}

Runner encapsulates running commands.

type Waiter

type Waiter interface {
	// Wait blocks until the specified file exists.
	Wait(file string, expectContent bool) error
}

Waiter encapsulates waiting for files to exist.

Jump to

Keyboard shortcuts

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