process

package
v0.102.2-nightly Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeploymentStats

type DeploymentStats struct {
	PID        int     `json:"pid"`
	CPUPercent float64 `json:"cpu_percent"`
	MemoryRSS  int64   `json:"memory_rss_bytes"`
	DiskBytes  int64   `json:"disk_bytes"`
	UptimeSecs float64 `json:"uptime_seconds"`
}

DeploymentStats holds on-demand resource usage for a deployment process

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager manages deployment processes via systemd (Linux) or direct process spawning (macOS/other)

func NewManager

func NewManager(logger *zap.Logger) *Manager

NewManager creates a new process manager

func (*Manager) GetLogs

func (m *Manager) GetLogs(ctx context.Context, deployment *deployments.Deployment, lines int, follow bool) ([]byte, error)

GetLogs retrieves logs for a deployment

func (*Manager) GetStats

func (m *Manager) GetStats(ctx context.Context, deployment *deployments.Deployment, deployPath string) (*DeploymentStats, error)

GetStats returns on-demand resource usage stats for a deployment. deployPath is the directory on disk for disk usage calculation.

func (*Manager) Restart

func (m *Manager) Restart(ctx context.Context, deployment *deployments.Deployment) error

Restart restarts a deployment process

func (*Manager) Start

func (m *Manager) Start(ctx context.Context, deployment *deployments.Deployment, workDir string) error

Start starts a deployment process

func (*Manager) Status

func (m *Manager) Status(ctx context.Context, deployment *deployments.Deployment) (string, error)

Status gets the status of a deployment process

func (*Manager) Stop

func (m *Manager) Stop(ctx context.Context, deployment *deployments.Deployment) error

Stop stops a deployment process

func (*Manager) WaitForHealthy

func (m *Manager) WaitForHealthy(ctx context.Context, deployment *deployments.Deployment, timeout time.Duration) error

WaitForHealthy waits for a deployment to become healthy

Jump to

Keyboard shortcuts

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