Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BinaryPreparable ¶
type BinaryPreparable struct { Name string SourcePath string Cmd string SysFolder string Language string KeepAlive bool Args []string }
func (*BinaryPreparable) Identifier ¶
func (preparable *BinaryPreparable) Identifier() string
Identifier is a function that get proc name
func (*BinaryPreparable) PrepareBin ¶
func (preparable *BinaryPreparable) PrepareBin() ([]byte, error)
PrepareBin checks if the given binary path is a valid executable. Returns no bytes, but if there is an error, it will be returned.
func (*BinaryPreparable) Start ¶
func (preparable *BinaryPreparable) 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 Preparable ¶
type Preparable struct { Name string SourcePath string Cmd string SysFolder string Language string KeepAlive bool Args []string }
func (*Preparable) Identifier ¶
func (preparable *Preparable) Identifier() string
Identifier is a function that get proc name
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 }
ProcPreparable is a preparable with all the necessary informations to run a process. To actually run a process, call the Start() method.