Documentation ¶
Index ¶
- Variables
- type EntityProxied
- func (p EntityProxied) BalanceOneWayRPC(service, comp, method string, args ...any) error
- func (p EntityProxied) BalanceRPC(service, comp, method string, args ...any) runtime.AsyncRet
- func (p EntityProxied) BroadcastOneWayRPC(service, comp, method string, args ...any) error
- func (p EntityProxied) CliRPC(method string, args ...any) runtime.AsyncRet
- func (p EntityProxied) CliRPCToEntity(entityId uid.Id, method string, args ...any) runtime.AsyncRet
- func (p EntityProxied) GetId() uid.Id
- func (p EntityProxied) GlobalBalanceOneWayRPC(comp, method string, args ...any) error
- func (p EntityProxied) GlobalBalanceRPC(comp, method string, args ...any) runtime.AsyncRet
- func (p EntityProxied) GlobalBroadcastOneWayRPC(comp, method string, args ...any) error
- func (p EntityProxied) OneWayCliRPC(method string, args ...any) error
- func (p EntityProxied) OneWayCliRPCToEntity(entityId uid.Id, method string, args ...any) error
- func (p EntityProxied) OneWayRPC(service, comp, method string, args ...any) error
- func (p EntityProxied) RPC(service, comp, method string, args ...any) runtime.AsyncRet
- type GroupProxied
- type RuntimeProxied
- func (p RuntimeProxied) BalanceOneWayRPC(service, plugin, method string, args ...any) error
- func (p RuntimeProxied) BalanceRPC(service, plugin, method string, args ...any) runtime.AsyncRet
- func (p RuntimeProxied) BroadcastOneWayRPC(service, plugin, method string, args ...any) error
- func (p RuntimeProxied) GetEntityId() uid.Id
- func (p RuntimeProxied) GlobalBalanceOneWayRPC(plugin, method string, args ...any) error
- func (p RuntimeProxied) GlobalBalanceRPC(plugin, method string, args ...any) runtime.AsyncRet
- func (p RuntimeProxied) GlobalBroadcastOneWayRPC(plugin, method string, args ...any) error
- func (p RuntimeProxied) OneWayRPC(service, plugin, method string, args ...any) error
- func (p RuntimeProxied) RPC(service, plugin, method string, args ...any) runtime.AsyncRet
- type ServiceProxied
- func (p ServiceProxied) BalanceOneWayRPC(plugin, method string, args ...any) error
- func (p ServiceProxied) BalanceRPC(plugin, method string, args ...any) runtime.AsyncRet
- func (p ServiceProxied) BroadcastOneWayRPC(plugin, method string, args ...any) error
- func (p ServiceProxied) GetService() string
- func (p ServiceProxied) OneWayRPC(nodeId uid.Id, plugin, method string, args ...any) error
- func (p ServiceProxied) RPC(nodeId uid.Id, plugin, method string, args ...any) runtime.AsyncRet
Constants ¶
This section is empty.
Variables ¶
var ( ErrDistEntityNotFound = errors.New("rpc: distributed entity not found") ErrDistEntityNodeNotFound = errors.New("rpc: distributed entity node not found") )
Functions ¶
This section is empty.
Types ¶
type EntityProxied ¶
type EntityProxied struct {
// contains filtered or unexported fields
}
EntityProxied 实体代理,用于向实体发送RPC
func (EntityProxied) BalanceOneWayRPC ¶
func (p EntityProxied) BalanceOneWayRPC(service, comp, method string, args ...any) error
BalanceOneWayRPC 使用负载均衡模式,向分布式实体目标服务发送单向RPC
func (EntityProxied) BalanceRPC ¶
func (p EntityProxied) BalanceRPC(service, comp, method string, args ...any) runtime.AsyncRet
BalanceRPC 使用负载均衡模式,向分布式实体目标服务发送RPC
func (EntityProxied) BroadcastOneWayRPC ¶
func (p EntityProxied) BroadcastOneWayRPC(service, comp, method string, args ...any) error
BroadcastOneWayRPC 使用广播模式,向分布式实体目标服务发送单向RPC
func (EntityProxied) CliRPC ¶
func (p EntityProxied) CliRPC(method string, args ...any) runtime.AsyncRet
CliRPC 向客户端发送RPC
func (EntityProxied) CliRPCToEntity ¶
CliRPCToEntity 向客户端实体发送RPC
func (EntityProxied) GlobalBalanceOneWayRPC ¶
func (p EntityProxied) GlobalBalanceOneWayRPC(comp, method string, args ...any) error
GlobalBalanceOneWayRPC 使用全局负载均衡模式,向分布式实体任意服务发送单向RPC
func (EntityProxied) GlobalBalanceRPC ¶
func (p EntityProxied) GlobalBalanceRPC(comp, method string, args ...any) runtime.AsyncRet
GlobalBalanceRPC 使用全局负载均衡模式,向分布式实体任意服务发送RPC
func (EntityProxied) GlobalBroadcastOneWayRPC ¶
func (p EntityProxied) GlobalBroadcastOneWayRPC(comp, method string, args ...any) error
GlobalBroadcastOneWayRPC 使用全局广播模式,向分布式实体所有服务发送单向RPC
func (EntityProxied) OneWayCliRPC ¶
func (p EntityProxied) OneWayCliRPC(method string, args ...any) error
OneWayCliRPC 向客户端发送单向RPC
func (EntityProxied) OneWayCliRPCToEntity ¶
OneWayCliRPCToEntity 向客户端实体发送单向RPC
type GroupProxied ¶
type GroupProxied struct {
// contains filtered or unexported fields
}
GroupProxied 分组代理,用于向分组发送RPC
func (GroupProxied) OneWayCliRPC ¶
func (p GroupProxied) OneWayCliRPC(method string, args ...any) error
OneWayCliRPC 向分组客户端发送单向RPC
func (GroupProxied) OneWayCliRPCToEntity ¶
OneWayCliRPCToEntity 向分组客户端实体发送单向RPC
type RuntimeProxied ¶
type RuntimeProxied struct {
// contains filtered or unexported fields
}
RuntimeProxied 运行时代理,用于向实体的运行时发送RPC
func ProxyRuntime ¶
func ProxyRuntime(ctx service.Context, entityId uid.Id) RuntimeProxied
ProxyRuntime 代理运行时
func (RuntimeProxied) BalanceOneWayRPC ¶
func (p RuntimeProxied) BalanceOneWayRPC(service, plugin, method string, args ...any) error
BalanceOneWayRPC 使用负载均衡模式,向分布式实体目标服务的运行时发送单向RPC
func (RuntimeProxied) BalanceRPC ¶
func (p RuntimeProxied) BalanceRPC(service, plugin, method string, args ...any) runtime.AsyncRet
BalanceRPC 使用负载均衡模式,向分布式实体目标服务的运行时发送RPC
func (RuntimeProxied) BroadcastOneWayRPC ¶
func (p RuntimeProxied) BroadcastOneWayRPC(service, plugin, method string, args ...any) error
BroadcastOneWayRPC 使用广播模式,向分布式实体目标服务的运行时发送单向RPC
func (RuntimeProxied) GetEntityId ¶ added in v0.1.37
func (p RuntimeProxied) GetEntityId() uid.Id
GetEntityId 获取实体id
func (RuntimeProxied) GlobalBalanceOneWayRPC ¶
func (p RuntimeProxied) GlobalBalanceOneWayRPC(plugin, method string, args ...any) error
GlobalBalanceOneWayRPC 使用全局负载均衡模式,向分布式实体任意服务的运行时发送单向RPC
func (RuntimeProxied) GlobalBalanceRPC ¶
func (p RuntimeProxied) GlobalBalanceRPC(plugin, method string, args ...any) runtime.AsyncRet
GlobalBalanceRPC 使用全局负载均衡模式,向分布式实体任意服务的运行时发送RPC
func (RuntimeProxied) GlobalBroadcastOneWayRPC ¶
func (p RuntimeProxied) GlobalBroadcastOneWayRPC(plugin, method string, args ...any) error
GlobalBroadcastOneWayRPC 使用全局广播模式,向分布式实体所有服务的运行时发送单向RPC
type ServiceProxied ¶
type ServiceProxied struct {
// contains filtered or unexported fields
}
ServiceProxied 实体服务,用于向服务发送RPC
func ProxyService ¶
func ProxyService(ctx service.Context, service ...string) ServiceProxied
ProxyService 代理服务
func (ServiceProxied) BalanceOneWayRPC ¶
func (p ServiceProxied) BalanceOneWayRPC(plugin, method string, args ...any) error
BalanceOneWayRPC 使用负载均衡模式,向分布式服务发送单向RPC
func (ServiceProxied) BalanceRPC ¶
func (p ServiceProxied) BalanceRPC(plugin, method string, args ...any) runtime.AsyncRet
BalanceRPC 使用负载均衡模式,向分布式服务发送RPC
func (ServiceProxied) BroadcastOneWayRPC ¶
func (p ServiceProxied) BroadcastOneWayRPC(plugin, method string, args ...any) error
BroadcastOneWayRPC 使用广播模式,向分布式服务发送单向RPC
func (ServiceProxied) GetService ¶ added in v0.1.37
func (p ServiceProxied) GetService() string
GetService 获取服务名