Documentation ¶
Index ¶
- Constants
- Variables
- type KRPCError
- type RPC
- func (r *RPC) Call(key interface{}, args ...interface{})
- func (r *RPC) Exit(err error)
- func (r *RPC) Init()
- func (r *RPC) Notify(key interface{}, args ...interface{})
- func (r *RPC) Register(key interface{}, f interface{})
- func (r *RPC) Run() error
- func (r *RPC) SetLogger(log logger)
- func (r *RPC) Stop()
Constants ¶
View Source
const (
// MaxCallLimit 最大调用限制,如果超过就会有阻塞
MaxCallLimit = 10000
)
Variables ¶
View Source
var DefaultRPC = new(RPC)
DefaultRPC 默认rpc接口实例
Functions ¶
This section is empty.
Types ¶
type RPC ¶
type RPC struct {
// contains filtered or unexported fields
}
RPC 结构,用户处理内部RPC任务
func (*RPC) Call ¶
func (r *RPC) Call(key interface{}, args ...interface{})
Call rpc调用接口,需要传入回调接口,接口格式 func (error,args ...interface{})
func (*RPC) Notify ¶
func (r *RPC) Notify(key interface{}, args ...interface{})
Notify rpc通知类型接口,不需要传入回调
Click to show internal directories.
Click to hide internal directories.