Documentation
¶
Index ¶
- Constants
- func FilterEnvForDisplay(env map[string]string, maxVars int) map[string]string
- func LogsDir(repoRoot string) string
- func ProcessAlive(pid int) bool
- func Remove(repoRoot string) error
- func SanitizeEnv(env map[string]string) map[string]string
- func Save(repoRoot string, s *State) error
- func StatePath(repoRoot string) string
- func TailLines(path string, tailLines int, maxBytes int64) ([]string, error)
- func WriteExitInfo(path string, info ExitInfo) error
- type ExitInfo
- type ServiceRecord
- type State
Constants ¶
View Source
const ( StateDirName = ".devctl" StateFilename = "state.json" LogsDirName = "logs" )
Variables ¶
This section is empty.
Functions ¶
func FilterEnvForDisplay ¶
FilterEnvForDisplay returns a subset of environment variables suitable for display. It removes common noise variables and limits the total count.
func ProcessAlive ¶
func SanitizeEnv ¶
SanitizeEnv returns a copy of the environment map with sensitive values redacted. Keys containing patterns like PASSWORD, SECRET, TOKEN, KEY, CREDENTIAL, etc. will have their values replaced with "[REDACTED]".
func WriteExitInfo ¶
Types ¶
type ExitInfo ¶
type ExitInfo struct {
Service string `json:"service"`
PID int `json:"pid"`
StartedAt time.Time `json:"started_at"`
ExitedAt time.Time `json:"exited_at"`
ExitCode *int `json:"exit_code,omitempty"`
Signal string `json:"signal,omitempty"`
Error string `json:"error,omitempty"`
StderrTail []string `json:"stderr_tail,omitempty"`
StdoutTail []string `json:"stdout_tail,omitempty"`
}
func ReadExitInfo ¶
type ServiceRecord ¶
type ServiceRecord struct {
Name string `json:"name"`
PID int `json:"pid"`
Command []string `json:"command"`
Cwd string `json:"cwd"`
Env map[string]string `json:"env,omitempty"`
StdoutLog string `json:"stdout_log"`
StderrLog string `json:"stderr_log"`
ExitInfo string `json:"exit_info,omitempty"`
StartedAt time.Time `json:"started_at,omitempty"` // When the process was started
// Health check configuration (if any)
HealthType string `json:"health_type,omitempty"` // "tcp"|"http"
HealthAddress string `json:"health_address,omitempty"` // For TCP checks
HealthURL string `json:"health_url,omitempty"` // For HTTP checks
}
Click to show internal directories.
Click to hide internal directories.