Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type Context ¶
type Context interface {
jujuc.Context
Id() string
HookVars(paths context.Paths) ([]string, error)
ActionData() (*context.ActionData, error)
SetProcess(process context.HookProcess)
HasExecutionSetUnitStatus() bool
ResetExecutionSetUnitStatus()
Prepare() error
Flush(badge string, failure error) error
}
Context exposes jujuc.Context, and additional methods needed by Runner.
type Factory ¶
type Factory interface {
// NewCommandRunner returns an execution context suitable for running
// an arbitrary script.
NewCommandRunner(commandInfo context.CommandInfo) (Runner, error)
// NewHookRunner returns an execution context suitable for running the
// supplied hook definition (which must be valid).
NewHookRunner(hookInfo hook.Info) (Runner, error)
// NewActionRunner returns an execution context suitable for running the
// action identified by the supplied id.
NewActionRunner(actionId string) (Runner, error)
}
Factory represents a long-lived object that can create runners relevant to a specific unit.
type Runner ¶
type Runner interface {
// Context returns the context against which the runner executes.
Context() Context
// RunHook executes the hook with the supplied name.
RunHook(name string) error
// RunAction executes the action with the supplied name.
RunAction(name string) error
// RunCommands executes the supplied script.
RunCommands(commands string) (*utilexec.ExecResponse, error)
}
Runner is responsible for invoking commands in a context.
Source Files
¶
- args.go
- env.go
- errors.go
- factory.go
- logger.go
- runner.go
Directories
¶
| Path | Synopsis |
|---|---|
|
Package context contains the ContextFactory and Context definitions.
|
Package context contains the ContextFactory and Context definitions. |
|
The worker/uniter/runner/jujuc package implements the server side of the jujuc proxy tool, which forwards command invocations to the unit agent process so that they can be executed against specific state.
|
The worker/uniter/runner/jujuc package implements the server side of the jujuc proxy tool, which forwards command invocations to the unit agent process so that they can be executed against specific state. |
Click to show internal directories.
Click to hide internal directories.