Documentation
¶
Index ¶
- type App
- type Command
- type CommandCall
- type CommandRunner
- type Definition
- type Dispatcher
- type EnvironmentVariables
- type Event
- type EventReceiver
- type LogLevel
- type Logger
- type RuntimeEnvironment
- type Script
- type Stack
- type StdCommandRunner
- type StdLogger
- type Supervisor
- type Task
- type TaskRunner
- type WorkerStarter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandCall ¶
type CommandCall struct {
Command string
}
type CommandRunner ¶
type CommandRunner interface {
RunCommand(command string, renv RuntimeEnvironment) error
}
type Definition ¶
type Definition struct {
Env EnvironmentVariables
Commands map[string]Command
}
func LoadDefinition ¶
func LoadDefinition(filename string) (Definition, error)
func ParseDefinition ¶
func ParseDefinition(r io.Reader) (Definition, error)
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
func NewDispatcher ¶
func NewDispatcher(logger Logger) *Dispatcher
func (*Dispatcher) Receive ¶
func (d *Dispatcher) Receive(e Event)
func (*Dispatcher) Register ¶
func (d *Dispatcher) Register(tr *TaskRunner)
type EnvironmentVariables ¶
type EnvironmentVariables []string
type EventReceiver ¶
type EventReceiver interface {
Receive(e Event)
}
type RuntimeEnvironment ¶
type StdCommandRunner ¶
type StdCommandRunner struct {
// contains filtered or unexported fields
}
func NewStdCommandRunner ¶
func NewStdCommandRunner( commands map[string]Command, workDir string, logger Logger, ) StdCommandRunner
func (StdCommandRunner) RunCommand ¶
func (cr StdCommandRunner) RunCommand(command string, renv RuntimeEnvironment) error
type Supervisor ¶
type Supervisor struct {
// contains filtered or unexported fields
}
func NewSupervisor ¶
func NewSupervisor() *Supervisor
func (*Supervisor) Start ¶
func (s *Supervisor) Start(f func() error)
func (*Supervisor) Wait ¶
func (s *Supervisor) Wait() error
type TaskRunner ¶
type TaskRunner struct {
// contains filtered or unexported fields
}
func NewTaskRunner ¶
func NewTaskRunner( task Task, commandRunner CommandRunner, starter WorkerStarter, receiver EventReceiver, stack Stack, logger Logger, env RuntimeEnvironment, ) *TaskRunner
func (*TaskRunner) Receive ¶
func (tr *TaskRunner) Receive(e Event)
func (*TaskRunner) Run ¶
func (tr *TaskRunner) Run()
type WorkerStarter ¶
type WorkerStarter interface {
Start(f func() error)
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.