process

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProcessInfo

type ProcessInfo struct {
	ServiceID string
	PID       int
	Cmd       *exec.Cmd
	StartedAt time.Time
	LogFile   *os.File
}

ProcessInfo 进程信息

type ProcessManager

type ProcessManager interface {
	Start(ctx context.Context, service *domain.Service) error
	Stop(ctx context.Context, serviceID string) error
	Restart(ctx context.Context, service *domain.Service) error
	IsRunning(serviceID string) (bool, error)
	GetPID(serviceID string) (int, error)
}

ProcessManager 进程管理器接口

func NewProcessManager

func NewProcessManager(logger *zap.Logger, pidDir, logDir string) ProcessManager

NewProcessManager 创建进程管理器

Jump to

Keyboard shortcuts

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