instructions

package
v0.1.1-0...-7f03b72 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2016 License: GPL-3.0 Imports: 9 Imported by: 2

README

Running tests on the instructions package

Unit tests in this package uses Docker to launch containers and try the SSH functions on them.

The nature of Docker forces you to launch the container using sudo privileges. This means that the tests must also be run using sudo:

# Change /usr/local/go to your GOROOT location
sudo /usr/local/go/bin/go test -v .

Documentation

Overview

Package instructions contains all implemented syntax in Raccoon. Every command is separated on a single file and all must implement the CommandExecutor interface

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ADD

type ADD struct {
	//Source path of the file
	SourcePath string

	//Destination path of the file in host
	DestPath string

	Command raccoon.Command
}

ADD copies a single file to the destination host folder

func (*ADD) Execute

func (a *ADD) Execute(h raccoon.Host)

Execute is the implementation of the Instruction interface for a ADD instruction

func (*ADD) GetCommand

func (a *ADD) GetCommand() *raccoon.Command

type ENV

type ENV struct {
	Command     *raccoon.Command
	Environment string
}

func (*ENV) Execute

func (e *ENV) Execute(h raccoon.Host)

func (*ENV) GetCommand

func (e *ENV) GetCommand() *raccoon.Command

type MAINTAINER

type MAINTAINER struct {
	Command raccoon.Command
}

func (*MAINTAINER) Execute

func (m *MAINTAINER) Execute(h raccoon.Host)

Execute is the implementation of the Instruction interface for a MAINTAINER instruction TODO

func (*MAINTAINER) GetCommand

func (m *MAINTAINER) GetCommand() *raccoon.Command

type RUN

type RUN struct {
	Command raccoon.Command

	//Bash instruction to execute
	Instruction string
}

RUN is a instruction that in the recipe file correspond to the CMD instruction. It will execute the "Command" on every machine. Ideally, every command must be bash

func (*RUN) Execute

func (r *RUN) Execute(h raccoon.Host)

Execute is the implementation of the Instruction interface for a RUN instruction

func (*RUN) GetCommand

func (r *RUN) GetCommand() *raccoon.Command

Jump to

Keyboard shortcuts

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