execlib

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultBashPath = "/bin/bash"

DefaultBashPath is the path used if Applier.Bash is empty.

Variables

This section is empty.

Functions

func Apply added in v0.2.0

func Apply(ctx context.Context, sys system.System, c catalog.Catalog, opts *Options) error

Apply changes a system match the resources in a catalog. Passing nil options is the same as passing the zero value.

Types

type Error

type Error struct {
	ResourceID      uint64
	ResourceComment string
	Err             error
	Output          []byte
}

func (*Error) Error

func (e *Error) Error() string

type Logger

type Logger interface {
	Infof(ctx context.Context, format string, args ...interface{})
	Error(ctx context.Context, err error)
}

Logger collects execution messages from an Applier. A Logger must be safe to call from multiple goroutines.

type Options added in v0.2.0

type Options struct {
	// Log will receive progress messages if non-nil.
	Log Logger

	// Bash is the path to the bash executable.
	// If it's empty, then Apply uses DefaultBashPath.
	Bash string

	// ConcurrentJobs is the number of resources to apply simultaneously.
	// If non-positive, then it assumes 1.
	ConcurrentJobs int
}

Options is the set of optional parameters for Apply. The zero value is the default set of options.

Jump to

Keyboard shortcuts

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