preparable

package
v0.0.2-0...-c69cfc8 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Preparable

type Preparable struct {
	Name       string
	SourcePath string
	Cmd        string
	SysFolder  string
	Language   string
	KeepAlive  bool
	Args       []string
}

ProcPreparable is a preparable with all the necessary informations to run a process. To actually run a process, call the Start() method.

func (*Preparable) Identifier

func (preparable *Preparable) Identifier() string

func (*Preparable) PrepareBin

func (preparable *Preparable) PrepareBin() ([]byte, error)

PrepareBin will compile the Golang project from SourcePath and populate Cmd with the proper command for the process to be executed. Returns the compile command output.

func (*Preparable) Start

func (preparable *Preparable) Start() (process.ProcContainer, error)

Start will execute the process based on the information presented on the preparable. This function should be called from inside the master to make sure all the watchers and process handling are done correctly. Returns a tuple with the process and an error in case there's any.

type ProcPreparable

type ProcPreparable interface {
	PrepareBin() ([]byte, error)
	Start() (process.ProcContainer, error)

	Identifier() string
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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