tasks

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PreUp      = "PreUp"
	PostDeploy = "PostDeploy"
	PostDelete = "PostDelete"
)

Variables

View Source
var DefaultRunner = func(c *exec.Cmd) error { return c.Run() }

DefaultRunner runs the given command

View Source
var (
	ErrNoTaskFile = errors.New(".draft-tasks.toml not found")
)

Functions

This section is empty.

Types

type Result

type Result struct {
	Kind    string
	Command []string
	Pass    bool
	Message string
}

type Runner added in v0.16.0

type Runner func(c *exec.Cmd) error

Runner runs the given command. An alternative to DefaultRunner can be used in tests.

type Tasks

type Tasks struct {
	PreUp      map[string]string `toml:"pre-up"`
	PostDeploy map[string]string `toml:"post-deploy"`
	PostDelete map[string]string `toml:"cleanup"`
}

func Load

func Load(path string) (*Tasks, error)

Load takes a path to file where tasks are defined and loads them in tasks

func (*Tasks) Run

func (t *Tasks) Run(runner Runner, kind, podName string) ([]Result, error)

Jump to

Keyboard shortcuts

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