deployers

package
v0.0.0-...-01651bc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

pluginDeployer implements the Deployer interface for external plugins.

External plugins are standalone executables that follow a simple JSON protocol:

  1. The deploy tool sends a PluginRequest as JSON to the plugin's stdin.
  2. The plugin executes the deployment step.
  3. 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

func ExecPath(typeName string) string

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

func Get(typeName string) (types.Deployer, error)

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 Register

func Register(d types.Deployer)

Register adds a deployer to the global registry.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL