Documentation ¶
Index ¶
- Constants
- func LoadRpcTypes(typer RunnerTyper)
- func SetRpcPortRange(min, max int)
- type BaseChild
- type CallbackTyper
- type RpcSvr
- type RunnerTyper
- type SubProcCBListener
- type SubProcCallback
- type SubProcCaller
- func (p *SubProcCaller) Call(serviceMethod string, args any, reply any) error
- func (p *SubProcCaller) CreateAndConnectRunner(nameSrc, programSrc string, typers []RunnerTyper, callbackPort int) base.Result
- func (p *SubProcCaller) Ping() (error, bool)
- func (p *SubProcCaller) TerminateRunnerFastly()
- func (p *SubProcCaller) TerminateRunnerSafely()
- type SubProcRunner
Constants ¶
View Source
const ( BaseChildName = "baseChild" StopMethod = BaseChildName + ".RpcStopChild" PingMethod = BaseChildName + ".RpcPing" )
Variables ¶
This section is empty.
Functions ¶
func LoadRpcTypes ¶
func LoadRpcTypes(typer RunnerTyper)
func SetRpcPortRange ¶
func SetRpcPortRange(min, max int)
Types ¶
type CallbackTyper ¶
type CallbackTyper = RunnerTyper
type RpcSvr ¶
type RpcSvr = RunnerTyper
type RunnerTyper ¶
type RunnerTyper interface {
CustomTypeValues() []any
}
type SubProcCBListener ¶
type SubProcCBListener struct {
// contains filtered or unexported fields
}
SubProcCBListener 子进程回调监听器
func (*SubProcCBListener) GetPort ¶
func (l *SubProcCBListener) GetPort() int
func (*SubProcCBListener) StartLoop ¶
func (l *SubProcCBListener) StartLoop(name string, rpcObjs map[string]RpcSvr) base.Result
func (*SubProcCBListener) StopLoop ¶
func (l *SubProcCBListener) StopLoop()
type SubProcCallback ¶
type SubProcCallback struct {
// contains filtered or unexported fields
}
SubProcCallback 子进程回调器
func (*SubProcCallback) Call ¶
func (c *SubProcCallback) Call(serviceMethod string, args any, reply any) error
func (*SubProcCallback) ConnectListener ¶
func (c *SubProcCallback) ConnectListener(cbPort string, typers []CallbackTyper) base.Result
func (*SubProcCallback) Disconnect ¶
func (c *SubProcCallback) Disconnect()
type SubProcCaller ¶
type SubProcCaller struct {
// contains filtered or unexported fields
}
SubProcCaller 子进程控制器
func (*SubProcCaller) Call ¶
func (p *SubProcCaller) Call(serviceMethod string, args any, reply any) error
func (*SubProcCaller) CreateAndConnectRunner ¶
func (p *SubProcCaller) CreateAndConnectRunner(nameSrc, programSrc string, typers []RunnerTyper, callbackPort int) base.Result
func (*SubProcCaller) Ping ¶
func (p *SubProcCaller) Ping() (error, bool)
func (*SubProcCaller) TerminateRunnerFastly ¶
func (p *SubProcCaller) TerminateRunnerFastly()
func (*SubProcCaller) TerminateRunnerSafely ¶
func (p *SubProcCaller) TerminateRunnerSafely()
type SubProcRunner ¶
type SubProcRunner struct {
// contains filtered or unexported fields
}
SubProcRunner 子进程执行器
func (*SubProcRunner) Callback ¶
func (c *SubProcRunner) Callback(cbMethod string, args any, reply any) error
func (*SubProcRunner) Run ¶
func (c *SubProcRunner) Run(rpcObjs map[string]RpcSvr, cbTypes []CallbackTyper) base.Result
func (*SubProcRunner) StopLoop ¶
func (c *SubProcRunner) StopLoop()
Click to show internal directories.
Click to hide internal directories.