Discover Packages
github.com/fergusstrange/embedded-postgres/v2
internal
supervisor
package
Version:
v2.0.0-alpha.3
Opens a new window with list of versions in this module.
Published: Oct 6, 2026
License: MIT
Opens a new window with license information.
Imports: 9
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package supervisor owns a PostgreSQL process independently of its Go caller.
Run requires a dedicated pipe on input. EOF means the owner died or requested
shutdown. The pipe is not inherited by PostgreSQL, so parent death closes it.
RunCommand supervises initdb and client utilities too. The caller cancels by
closing its pipe. Only the child group created here is terminated on EOF.
type Event struct {
Protocol int `json:"protocol"`
PID int `json:"pid,omitempty"`
Error string `json:"error,omitempty"`
}
type Request struct {
Protocol int `json:"protocol"`
Binary string `json:"binary"`
Args []string `json:"args"`
DataDir string `json:"data_dir"`
LogPath string `json:"log_path"`
ShutdownTimeout time .Duration `json:"shutdown_timeout"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.