hooks

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package hooks runs lifecycle hooks. pre_build runs locally; pre_deploy, post_deploy and post_app_boot run on the target server. Entries are script paths or inline shell commands; executable files at .ferry/hooks/<name> are auto-discovered.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Env

type Env struct {
	Version   string
	Service   string
	Server    string
	Image     string
	Performer string
	Runtime   time.Duration
	Preview   string // preview SHA, empty for regular deploys
}

Env is the environment passed to every hook.

type Runner

type Runner struct {
	Hooks map[config.HookType]config.Hook
	Dir   string // project dir; .ferry/hooks lives here
}

Runner executes hooks from config plus auto-discovered scripts.

func (*Runner) RunLocal

func (r *Runner) RunLocal(t config.HookType, env Env) error

RunLocal executes a hook on this machine.

func (*Runner) RunRemote

func (r *Runner) RunRemote(h *exec.Host, t config.HookType, env Env) error

RunRemote executes a hook on the target server. Script files are read locally and piped to a remote shell.

Jump to

Keyboard shortcuts

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