Documentation
¶
Overview ¶
pluginDeployer implements the Deployer interface for external plugins.
External plugins are standalone executables that follow a simple JSON protocol:
- The deploy tool sends a PluginRequest as JSON to the plugin's stdin.
- The plugin executes the deployment step.
- The plugin writes a PluginResponse as JSON to stdout.
Plugin executables are discovered by name convention (deploy-plugin-<type>) or registered explicitly via RegisterPath when resolved from a Git repository.
Package deployers provides a global registry for deployer implementations and includes the built-in shell deployer and external plugin support.
Built-in deployers register themselves in init() functions. External plugins are registered at runtime via RegisterPath (from the resolver) or discovered automatically by looking for deploy-plugin-<type> executables in PATH and the ./plugins/ directory.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecPath ¶
ExecPath returns the resolved executable path for a deployer, or "" for built-in deployers (like "shell") that don't have an external binary.
func Get ¶
Get returns a deployer by type name. If no built-in deployer is found, it falls back to looking for an external plugin executable.
func RegisterPath ¶
func RegisterPath(name, executablePath string)
RegisterPath registers an external plugin deployer by name and executable path.
Types ¶
type PluginRequest ¶
type PluginRequest struct {
Name string `json:"name"`
Description string `json:"description"`
Config map[string]string `json:"config"`
Env map[string]string `json:"env"`
}
PluginRequest is the JSON payload sent to a plugin's stdin.
type PluginResponse ¶
type PluginResponse struct {
Success bool `json:"success"`
Output string `json:"output"`
Error string `json:"error,omitempty"`
}
PluginResponse is the JSON payload expected from a plugin's stdout.