Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultRestartDelay = 500 * time.Millisecond
View Source
const DefaultShutdownTimeout = 500 * time.Millisecond
View Source
const DefaultWatchDebounce = 500 * time.Millisecond
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Project Project `toml:"project"`
Processes []ProcessConfig `toml:"process"`
}
type ProcessConfig ¶
type ProcessConfig struct {
Name string `toml:"name"`
Cmd string `toml:"cmd"`
Cwd string `toml:"cwd"`
Port int `toml:"port"`
PortEnv string `toml:"port_env"`
NoPort bool `toml:"no_port"`
DependsOn []string `toml:"depends_on"`
Env map[string]string `toml:"env"`
RestartDelay string `toml:"restart_delay"`
ShutdownTimeout string `toml:"shutdown_timeout"`
// File watching + auto-restart (opt-in)
Watch []string `toml:"watch"` // directories to watch for changes
WatchInclude []string `toml:"watch_include"` // file glob patterns to react to, e.g. ["*.go"]
WatchExclude []string `toml:"watch_exclude"` // directories to exclude from watching, e.g. ["tmp","vendor"]
Build []string `toml:"build"` // optional: ordered build steps chained in one shell invocation before restarting, e.g. ["go generate ./...", "go build ./..."]
WatchDebounce string `toml:"watch_debounce"` // debounce delay, default "500ms"
}
func (ProcessConfig) RestartDelayDuration ¶
func (p ProcessConfig) RestartDelayDuration() time.Duration
RestartDelayDuration parses and returns the process restart delay.
func (ProcessConfig) ShutdownTimeoutDuration ¶
func (p ProcessConfig) ShutdownTimeoutDuration() time.Duration
ShutdownTimeoutDuration parses and returns the graceful shutdown timeout.
func (ProcessConfig) WatchDebounceDuration ¶ added in v1.4.0
func (p ProcessConfig) WatchDebounceDuration() time.Duration
WatchDebounceDuration parses and returns the watch debounce delay.
Click to show internal directories.
Click to hide internal directories.