Documentation ¶
Index ¶
- Variables
- func CallEntity(servCtx service.Context, entityId uid.Id, component, method string, ...) (asyncRet runtime.AsyncRet, err error)
- func CallRuntime(servCtx service.Context, entityId uid.Id, plugin, method string, ...) (asyncRet runtime.AsyncRet, err error)
- func CallService(servCtx service.Context, plugin, method string, args variant.Array) (rets []reflect.Value, err error)
- type IDeliverer
- type IDispatcher
- type LifecycleInit
- type LifecycleShut
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoDeliverer = errors.New("rpc: no deliverer") // 没有匹配的投递器 ErrTerminated = errors.New("rpc: deliverer terminated") // 已终止投递 ErrEntityNotFound = errors.New("rpc: session routing to entity not found") // 找不到路由会话映射的实体 ErrSessionNotFound = errors.New("rpc: entity routing to session not found") // 找不到路由实体映射的会话 ErrGroupNotFound = errors.New("rpc: group not found") // 找不到分组 ErrGroupChanIsFull = errors.New("rpc: group send data channel is full") // 分组发送数据的channel已满 ErrDistEntityNotFound = errors.New("rpc: distributed entity not found") // 找不到分布式实体 ErrDistEntityNodeNotFound = errors.New("rpc: distributed entity node not found") // 找不到分布式实体的服务节点 ErrIncorrectDestAddress = errors.New("rpc: incorrect destination Address") // 错误的目的地址 ErrPluginNotFound = errors.New("rpc: plugin not found") // 找不到插件 ErrMethodNotFound = errors.New("rpc: method not found") // 找不到方法 ErrComponentNotFound = errors.New("rpc: component not found") // 找不到组件 ErrMethodParameterCountMismatch = errors.New("rpc: method parameter count mismatch") // 方法参数数量不匹配 ErrMethodParameterTypeMismatch = errors.New("rpc: method parameter type mismatch") // 方法参数类型不匹配 )
Functions ¶
func CallEntity ¶ added in v0.1.36
func CallRuntime ¶ added in v0.1.36
Types ¶
type IDeliverer ¶
type IDeliverer interface { // Match 是否匹配 Match(ctx service.Context, dst, path string, oneWay bool) bool // Request 请求 Request(ctx service.Context, dst, path string, args []any) runtime.AsyncRet // Notify 通知 Notify(ctx service.Context, dst, path string, args []any) error }
IDeliverer RPC投递器接口,用于将RPC投递至目标
func NewForwardOutDeliverer ¶ added in v0.1.36
func NewForwardOutDeliverer(gate string) IDeliverer
NewForwardOutDeliverer RPC外转投递器,用于S->C的通信
func NewServiceDeliverer ¶
func NewServiceDeliverer() IDeliverer
NewServiceDeliverer 创建分布式服务间的RPC投递器
type IDispatcher ¶
type IDispatcher any
IDispatcher RPC分发器接口,用于分发RPC请求与响应
func NewForwardInDispatcher ¶ added in v0.1.36
func NewForwardInDispatcher(mc gap.IMsgCreator) IDispatcher
NewForwardInDispatcher RPC内转分发器,用于C->S的通信
func NewInboundDispatcher ¶
func NewInboundDispatcher(mc gap.IMsgCreator) IDispatcher
NewInboundDispatcher 创建入站方向RPC分发器,用于C->S的通信
func NewOutboundDispatcher ¶
func NewOutboundDispatcher() IDispatcher
NewOutboundDispatcher 创建出站方向RPC分发器,用于S->C的通信
func NewServiceDispatcher ¶
func NewServiceDispatcher() IDispatcher
NewServiceDispatcher 创建分布式服务间的RPC分发器
type LifecycleInit ¶
LifecycleInit RPC投递器或分发器生命周期开始
type LifecycleShut ¶
LifecycleShut RPC投递器或分发器生命周期结束
Click to show internal directories.
Click to hide internal directories.