Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BeginWatch ¶
func BeginWatch(service services.ServiceOrGroup, restart func() error, logger Logger) (func(), error)
BeginWatch starts auto-restart watches for the provided services. The function returned will close the watcher.
Types ¶
type Log ¶
type Log struct {
// contains filtered or unexported fields
}
Log provides the io.Writer interface to publish service logs to file
type LogLine ¶
LogLine represents a line in an Edward service log
func ParseLogLine ¶
ParseLogLine parses the JSON representation of a log line into a LogLine
type Logger ¶
type Logger interface {
Printf(format string, a ...interface{})
}
Logger provides a simple interface for logging
type Runner ¶
type Runner struct { NoWatch bool WorkingDir string Logger Logger // contains filtered or unexported fields }
Runner provides state and functions for running a given service
type RunningCommand ¶
type RunningCommand struct {
// contains filtered or unexported fields
}
RunningCommand provides state and functions for running a service
func NewRunningCommand ¶
func NewRunningCommand(service *services.ServiceConfig, cmd *exec.Cmd, commandWait *sync.WaitGroup) *RunningCommand
NewRunningCommand creates a RunningCommand for a given service and exec.Cmd
func (*RunningCommand) Interrupt ¶
func (c *RunningCommand) Interrupt() error
Interrupt sends an interrupt to a running command
func (*RunningCommand) Kill ¶
func (c *RunningCommand) Kill() error
Kill sends a kill signal to a running command
func (*RunningCommand) Start ¶
func (c *RunningCommand) Start(errorLog Logger)
Start starts a command running in a goroutine
func (*RunningCommand) Wait ¶
func (c *RunningCommand) Wait()
Wait blocks until this command has exited