runner

package
Version: v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package runner implements a solution to executes one or more commands which have been defined in a configuration file (by default "orbit.yml").

These commands, also called Orbit commands, runs one ore more external commands one by one.

Thanks to the generator package, the configuration file may be a data-driven template which is executed at runtime (e.g. no file generated).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OrbitCommand

type OrbitCommand struct {
	// Use is the name of the Orbit command.
	Use string `yaml:"use"`

	// Run is the stack of external commands to run.
	Run []string `yaml:"run"`
}

OrbitCommand represents an Orbit command as defined in the configuration file.

type OrbitRunner

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

OrbitRunner helps executing Orbit commands.

func NewOrbitRunner

func NewOrbitRunner(context *context.OrbitContext) (*OrbitRunner, error)

NewOrbitRunner instantiates a new instance of OrbitRunner.

func (*OrbitRunner) Exec

func (r *OrbitRunner) Exec(names ...string) error

Exec executes the given Orbit commands.

type OrbitRunnerConfig

type OrbitRunnerConfig struct {
	// Commands slice represents the Orbit commands.
	Commands []*OrbitCommand `yaml:"commands"`
}

OrbitRunnerConfig represents a YAML configuration file defining Orbit commands.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL