spr

package
v0.0.0-...-c1449ee Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

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 BaseChild

type BaseChild struct {
	// contains filtered or unexported fields
}

func (*BaseChild) RpcPing

func (c *BaseChild) RpcPing(args int, reply *bool) error

func (*BaseChild) RpcStopChild

func (c *BaseChild) RpcStopChild(args int, reply *int) error

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()

Directories

Path Synopsis
test

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL