Documentation
¶
Index ¶
- Variables
- func GetNextSandBoxId() int
- func RemoveSandBox(sandBoxID int) error
- func SetHelpContent(content string)
- func SetOption(key string, v bool)
- func SetOptions(opt map[string]bool)
- func SetSandBox(box ISandBox)
- func Setup(startFunction StartFunc)
- func Shutdown()
- type BoxConf
- type ISandBox
- type Server
- func (that *Server) AddSandBox(s ISandBox)
- func (that *Server) BeforeStop(f StopFunc)
- func (that *Server) CmdParser() *gcmd.Parser
- func (that *Server) Config() *gcfg.Config
- func (that *Server) GetSandBox(id int) ISandBox
- func (that *Server) SetPidFile(pidFile string)
- func (that *Server) SetProcessName(processName string)
- func (that *Server) Setup(startFunction StartFunc)
- func (that *Server) Shutdown()
- func (that *Server) StartTime() *gtime.Time
- type StartFunc
- type StopFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BuildVersion = "No Version Info" BuildGoVersion = "No Version Info" BuildGitCommitId = "No Commit Info" BuildTime = "No Time Info" )
Functions ¶
Types ¶
type BoxConf ¶
type BoxConf struct {
SandBoxName string `json:"sandbox_name" comment:"服务沙盒的名字"`
Network string `json:"network" comment:"使用的网络协议; tcp, tcp4, tcp6, unix or unixpacket"`
ListenAddress string `json:"listen_address" comment:"监听地址"`
PrintDetail bool `json:"print_detail" comment:"是否显示通讯详情"`
SessionMaxTimeout time.Duration `json:"session_max_timeout" comment:"会话生命周期"`
ResponseMaxTimeout time.Duration `json:"response_max_timeout" comment:"单次处理响应最长超时时间"`
SlowTimeout time.Duration `json:"slow_timeout" comment:"慢请求时间"`
CountTime bool `json:"count_time" comment:"是否统计消耗时间"`
RequestMaxTimeout time.Duration `json:"request_max_timeout" comment:"请求最长超时时间"`
RedialTimes int `` /* 126-byte string literal not displayed */
RedialInterval time.Duration `json:"redial_interval" comment:"仅限客户端角色使用 试图链接服务端时候,重试的时间间隔"`
// contains filtered or unexported fields
}
func (*BoxConf) EndpointConfig ¶
func (that *BoxConf) EndpointConfig() drpc.EndpointConfig
EndpointConfig 返回rpc服务要用的配置文件
type ISandBox ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server 服务对象
func (*Server) AddSandBox ¶
func (*Server) SetProcessName ¶
SetProcessName 设置进程名字
Click to show internal directories.
Click to hide internal directories.