Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RpcXServer ¶
type RpcXServer struct {
Address string // host:port
Network string // tcp
Plugins []server.Plugin // 启动rpc服务时,自定义插件
ServerName string // rpc服务名
Receiver interface{} // 路由结构 - 指针
// contains filtered or unexported fields
}
func NewRpcXServer ¶
func NewRpcXServer(config *RpcXServerConfig) (*RpcXServer, error)
func (*RpcXServer) Close ¶
func (rpc *RpcXServer) Close()
func (*RpcXServer) Run ¶
func (rpc *RpcXServer) Run()
type RpcXServerBaseConfig ¶
type RpcXServerConfig ¶
type RpcXServerConfig struct {
Base *RpcXServerBaseConfig
Options *RpcXServerOptionsConfig
Etcd *RpcXServerEtcdConfig
}
type RpcXServerEtcdConfig ¶
type RpcXServerOptionsConfig ¶
type RpcXServerOptionsConfig struct {
ReadTimeout time.Duration // 读取超时时间
WriteTimeout time.Duration // 写入超时时间
Pool *RpcXServerOptionsPoolConfig // 默认pond协程池 alitto/pond
CustomPool server.WorkerPool // 自定义协程池 CustomPool和pool互斥
AsyncWrite bool // 是否异步写入
TCPKeepAlivePeriod time.Duration // tcp保持有效期
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.