Application states
Work states
constant
add uid and sid into group. ignore any uid that uid not specified.
user id
server id
grouped uids, , key: sid, value: [uid]
add uid and sid into group. ignore any uid that uid not specified.
Add tasks into task group. Create the task group if it dose not exist.
task key
task callback
task timeout callback
Fire after filter chain if have
Compare the two arrays and return the difference.
Fire before filter chain if any
Bind process with cpu
server id
process id
server host
Check if server is exsit.
Destroy task group
task key
whether close task group directly
Configure custom logger.
Configure pinus logger
Check if cron is in crons.
Server factory function.
current application context
erver instance
Create a count down latch
Remote service for backend servers. Receive and handle request message forwarded from frontend server.
Initialize application configuration.
delete element from array
Encode batch msg to client
Check a string whether ends with another string
Generate proxy for the server infos.
rpc client instance
application context
server info list
Generate rpc client
current application context
contructor parameters for rpc client
rpc client
Get user remote cron path
application base path
server type
path string if the path exist else null
Get handler path
application base path
server type
path string if the path exist else null
Get logs path.
application base path
logs path string
Get proxy path for rpc client. Iterate all the remote service path and create remote path record.
current application context
server info, format: {id, serverType, host, port}
remote path record array
Get admin script root path.
application base path
script path string
Get system remote service path
server role: frontend, backend
path string if the path exist else null
Get user remote service path
application base path
server type
path string if the path exist else null
pass err to the global error handler if specified
check if has Chinese characters.
Check a server whether has generated proxy before
rpc client instance
server info
true or false
Invoke callback with check
Kill application in all servers
array of server's pid
List all the subdirectory names of user remote directory which hold the codes for all the server types.
application base path
all the subdiretory name under servers/
Load cluster server.
Load cron handlers from current application
Load crons from configure file
Load default components for application.
Load lifecycle file.
Load master info from config/master.json.
Load admin modules
Load server info from config/servers.json.
Run local command.
Apply command to loaded components. This method would invoke the component {method} in series. Any component {method} return err, it would return err directly.
loaded component list
component lifecycle method name, such as: start, stop
Parse route string.
route string, such as: serverName.handlerName.methodName
parse result object or null for illeagle route string
Ping server to check if network is available
Process server start command
Append the default system admin modules
Compose remote path record
remote path namespace, such as: 'sys', 'user'
remote service source path
remote path record
Run server
current application context
Run all servers
current application context
Send message to the client that associated with the session.
push message by group
route route message
message that would be sent to client
grouped uids, , key: sid, value: [uid]
push options
cb(err)
Setup enviroment.
Get the count of elements of object
Fork child process to run command.
Use ssh to run command.
command that would be executed in the remote server
remote server host
callback function
Start servers by type.
Check a string whether starts with another string
Stop components.
component list
current component index
whether stop component immediately
transform unicode to utf8
ServerInfo
Represents some Type of the Object.