Documentation ¶
Index ¶
- type Handler
- type ProcessHandler
- func (h *ProcessHandler[T]) CreateProcess() T
- func (h *ProcessHandler[T]) DeleteProcess() T
- func (h *ProcessHandler[T]) GetHandlers() Handler[T]
- func (h *ProcessHandler[T]) GetStderrLog() T
- func (h *ProcessHandler[T]) GetStdoutLog() T
- func (h *ProcessHandler[T]) ListProcesses() T
- func (h *ProcessHandler[T]) RestartProcess() T
- func (h *ProcessHandler[T]) SetupRoutes() *http.ServeMux
- func (h *ProcessHandler[T]) StartProcess() T
- func (h *ProcessHandler[T]) StopProcess() T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler[T any] interface { ListProcesses() T CreateProcess() T DeleteProcess() T StartProcess() T StopProcess() T RestartProcess() T GetStdoutLog() T GetStderrLog() T }
Handler 是一个泛型接口,定义了所有处理方法
type ProcessHandler ¶
type ProcessHandler[T any] struct { // contains filtered or unexported fields }
ProcessHandler 是一个泛型结构体,实现了 Handler 接口
func NewProcessHandler ¶
func NewProcessHandler[T any](manager *process.Manager, warp func(http.HandlerFunc) T) *ProcessHandler[T]
NewProcessHandler 创建一个新的 ProcessHandler 实例
func (*ProcessHandler[T]) CreateProcess ¶
func (h *ProcessHandler[T]) CreateProcess() T
CreateProcess 创建新进程
func (*ProcessHandler[T]) DeleteProcess ¶
func (h *ProcessHandler[T]) DeleteProcess() T
DeleteProcess 删除进程
func (*ProcessHandler[T]) GetHandlers ¶
func (h *ProcessHandler[T]) GetHandlers() Handler[T]
GetHandlers 返回实现了 Handler 接口的 ProcessHandler
func (*ProcessHandler[T]) GetStderrLog ¶
func (h *ProcessHandler[T]) GetStderrLog() T
GetStderrLog 获取错误输出日志
func (*ProcessHandler[T]) GetStdoutLog ¶
func (h *ProcessHandler[T]) GetStdoutLog() T
GetStdoutLog 获取标准输出日志
func (*ProcessHandler[T]) ListProcesses ¶
func (h *ProcessHandler[T]) ListProcesses() T
ListProcesses 获取进程列表
func (*ProcessHandler[T]) RestartProcess ¶
func (h *ProcessHandler[T]) RestartProcess() T
RestartProcess 重启进程
func (*ProcessHandler[T]) SetupRoutes ¶
func (h *ProcessHandler[T]) SetupRoutes() *http.ServeMux
SetupRoutes sets up the HTTP routes for the ProcessHandler
func (*ProcessHandler[T]) StartProcess ¶
func (h *ProcessHandler[T]) StartProcess() T
StartProcess 启动进程
func (*ProcessHandler[T]) StopProcess ¶
func (h *ProcessHandler[T]) StopProcess() T
StopProcess 停止进程
Click to show internal directories.
Click to hide internal directories.