Documentation ¶
Overview ¶
Package fpm 实现了php-fpm进程管理。
Index ¶
- func CloseExistProcess(pidfileName string) error
- type Config
- type Fpm
- type Meta
- type Process
- func (proc *Process) Address() (network, address string)
- func (proc *Process) GetProcessMeta() Meta
- func (proc *Process) Kill() error
- func (proc *Process) PID() int
- func (proc *Process) Reload() error
- func (proc *Process) Start() (err error)
- func (proc *Process) UpdateConfigFile(configFile string)
- func (proc *Process) Wait() (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseExistProcess ¶
CloseExistProcess close php-fpm process already exist for this project
Types ¶
type Config ¶
type Config struct { FpmBin string // phpfpm 可执行文件路径 PhpConfigFile string // php.ini配置文件 FpmConfigDir string // php-fpm.conf配置文件目录 WorkDir string // 工作目录 User string // 执行用户 Group string // 执行用户组 ErrorLogFile string // fpm错误日志 SlowLogFile string // fpm 慢查询日志 PIDFile string // fpm pid file SocketFile string // fpm socket file FpmConfigFile string // fpm config file PM string // fpm进程管理方式 MaxChildren string // fpm最大子进程数目 StartServers string // fpm启动时进程数目 MinSpareServers string // fpm最小空闲进程数数目 MaxSpareServers string // fpm最大空闲进程数目 SlowlogTimeout string // fpm慢请求日志超时时间 }
Config Meta Fpm配置
type Fpm ¶
type Fpm struct {
// contains filtered or unexported fields
}
Fpm FPM进程管理对象
func (*Fpm) GetNetworkAddress ¶
GetNetworkAddress 获取监听的网络类型和地址
type Meta ¶
type Meta struct { FpmBin string PidFile string ErrorLog string SlowLog string Listen string FpmConfigFile string PhpConfigFile string User string Group string PM string // fpm进程管理方式 MaxChildren string // fpm最大子进程数目 StartServers string // fpm启动时进程数目 MinSpareServers string // fpm最小空闲进程数数目 MaxSpareServers string // fpm最大空闲进程数目 SlowlogTimeout string // fpm慢请求日志超时时间 }
Meta 进程运行配置信息
type Process ¶
type Process struct { Meta Meta // contains filtered or unexported fields }
Process PHP-FPM进程管理器
func (*Process) GetProcessMeta ¶
GetProcessMeta get process configuration info
func (*Process) UpdateConfigFile ¶
UpdateConfigFile 更新或创建fpm配置文件
Click to show internal directories.
Click to hide internal directories.