\Worker\BuiltProcessManager

The process manager is a standard Rpc Worker in independent running mode.

It provides process management services for the entire kernel and cannot be forked or uninstalled. When passively forking, the Worker should be actively uninstalled and the heartbeat/Socket listening subscription- should be logged out to ensure the normal operation of the process manager.

Summary

Methods
Properties
Constants
onMessage()
forkPassive()
initialize()
registerSignalHandler()
processSignalHandler()
onConnect()
setObserverProcessId()
setProcessId()
signal()
kill()
isDie()
registerRpcService()
$processObserverIdMap
$facadeClass
$childrenProcessIds
No constants found
outputInfo()
event()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$processObserverIdMap

$processObserverIdMap : array

映射进程ID守护ID

Type

array

$facadeClass

$facadeClass : string

进程管理器门面

Type

string

$childrenProcessIds

$childrenProcessIds : array

子进程ID列表

Type

array

Methods

onMessage()

onMessage(string  $context, \Worker\Socket\TCPConnection  $client) : void

Parameters

string $context
\Worker\Socket\TCPConnection $client

forkPassive()

forkPassive() : void

注册信号处理器

initialize()

initialize() : void

registerSignalHandler()

registerSignalHandler() : void

processSignalHandler()

processSignalHandler() : void

onConnect()

onConnect(\Worker\Socket\TCPConnection  $client) : void

Parameters

\Worker\Socket\TCPConnection $client

setObserverProcessId()

setObserverProcessId(int  $processId, int  $observerProcessId) : void

设置守护进程ID

Parameters

int $processId
int $observerProcessId

setProcessId()

setProcessId(int  $processId, \Worker\Built\JsonRpc\JsonRpcPublisher  $jsonRpcPublisher) : array

设置进程ID

Parameters

int $processId
\Worker\Built\JsonRpc\JsonRpcPublisher $jsonRpcPublisher

Returns

array —

signal()

signal(int  $processId, int  $signal) : bool

获取守护进程ID

Parameters

int $processId
int $signal

Returns

bool —

kill()

kill(int  $processId) : bool

关闭进程

Parameters

int $processId

Returns

bool —

isDie()

isDie(int  $processId) : void

进程退出

Parameters

int $processId

registerRpcService()

registerRpcService(string  $name, string  $address, string  $type, \Worker\Built\JsonRpc\JsonRpcPublisher  $jsonRpcPublisher) : void

RPC服务上线

Parameters

string $name
string $address
string $type
\Worker\Built\JsonRpc\JsonRpcPublisher $jsonRpcPublisher

outputInfo()

outputInfo( ...$arguments) : void

Parameters

$arguments variadic

event()

event(\Worker\Prop\Build  $event) : void

子进程发布事件

Parameters

\Worker\Prop\Build $event