core

package
v0.0.0-...-ea36977 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2015 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DebugLines

func DebugLines(reader io.Reader)

func SetLogLevel

func SetLogLevel(level logging.Level)

SetLogLevel sets the log level for the core logger

Types

type Args

type Args struct {
	Environment []string
	Args        []string
	Options     configuration.OptionCollection
}

Args describes the args for the remote call.

type Facts

type Facts map[string]string

func (Facts) Arch

func (f Facts) Arch() string

func (Facts) Home

func (f Facts) Home() string

func (Facts) OS

func (f Facts) OS() string

type Remote

type Remote struct {
	Host       *configuration.Host
	Config     *configuration.Configuration
	Facts      Facts
	Client     *ssh.Client
	SftpClient *sftp.Client
	// contains filtered or unexported fields
}

Remote describes a runner which runs task on a remote system via SSH.

func NewRemoteRunner

func NewRemoteRunner(host *configuration.Host, config *configuration.Configuration) *Remote

NewRemoteRunner creates a new runner which runs tasks on a remote system.

func (*Remote) AfterAll

func (r *Remote) AfterAll() error

AfterAll runs post task scripts.

func (*Remote) BeforeAll

func (r *Remote) BeforeAll(tasks configuration.TaskCollection) error

func (*Remote) CleanUp

func (r *Remote) CleanUp() error

CleanUp removes the temporary directory on the remote system.

func (*Remote) Close

func (r *Remote) Close()

Close closes the SSH connection to the remote system

func (*Remote) Connect

func (r *Remote) Connect() error

Connct connects to the remote system via SSH.

func (*Remote) Execute

func (r *Remote) Execute(t *configuration.Task) error

Execute executes the task on the remote system via the runner.

func (*Remote) GatherFacts

func (r *Remote) GatherFacts() (Facts, error)

RunCommand runs an abritrary command on the remote system.

func (*Remote) Prepare

func (r *Remote) Prepare(task *configuration.Task) error

Prepare prepares the remote system so it can run plugins. This will do the following: * Create temp directory /tmp/kiss/<current_datetime>

func (*Remote) Run

func (r *Remote) Run(t *configuration.Task) error

Run runs the given task on the remote system.

type Runner

type Runner interface {
	Prepare() error
	Run(*configuration.Task) error
	Close()
	CleanUp() error
}

Runner is the interface which describes objects that can execute tasks on a system.

Jump to

Keyboard shortcuts

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