Documentation ¶
Index ¶
- func Tokenize(s string) (tokens []string)
- func ValidateNoCircular(process *Process, name string) (stack string)
- func ValidateNoDependOnAutoRestart(process *Process) error
- func ValidateNoDuplicates(processes []*Process) error
- type Process
- type ProcessManager
- func (p *ProcessManager) BuildProcessTree(processes []*Process) error
- func (p *ProcessManager) BuildProcesses(processJsons []*processJson) error
- func (p *ProcessManager) ParseConfig(data string) error
- func (p *ProcessManager) ParseConfigFile(pathToConfigFile string) error
- func (p *ProcessManager) StartProcesses(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateNoCircular ¶
Checks if a given process is part of a circular dependency chain
func ValidateNoDuplicates ¶
Checks for dublicates. We can't have multiple processes with the same name, as we then can't build a dependency tree
Types ¶
type Process ¶
type Process struct { // The name of the process Name string // The command to run Command string // The args to pass along to the command Args []string // If the process should be automatically restarted if it stops AutoRestart bool // Proccesses that should be run after this process Before []*Process // The name of the directory the process should be run in WorkingDirectory string // contains filtered or unexported fields }
Describes a single process
type ProcessManager ¶
type ProcessManager struct {
// contains filtered or unexported fields
}
The main process manager, managing processes
func NewProcessManager ¶
func NewProcessManager() *ProcessManager
func (*ProcessManager) BuildProcessTree ¶
func (p *ProcessManager) BuildProcessTree(processes []*Process) error
Builds a process tree to run, as processes can have inter-dependencies
func (*ProcessManager) BuildProcesses ¶
func (p *ProcessManager) BuildProcesses(processJsons []*processJson) error
func (*ProcessManager) ParseConfig ¶
func (p *ProcessManager) ParseConfig(data string) error
func (*ProcessManager) ParseConfigFile ¶
func (p *ProcessManager) ParseConfigFile(pathToConfigFile string) error
func (*ProcessManager) StartProcesses ¶
func (p *ProcessManager) StartProcesses(ctx context.Context) error
Click to show internal directories.
Click to hide internal directories.