Documentation ¶
Overview ¶
Package framework Golaxy分布式服务开发框架。
Index ¶
- Variables
- func ReadChan[T any](iec iEC, ch <-chan T) async.AsyncRet
- type App
- func (app *App) GetStartupConf() *viper.Viper
- func (app *App) InitCB(cb generic.DelegateAction1[*App]) *App
- func (app *App) Run()
- func (app *App) Setup(name string, generic any) *App
- func (app *App) StartingCB(cb generic.DelegateAction1[*App]) *App
- func (app *App) TerminateCB(cb generic.DelegateAction1[*App]) *App
- type AwaitDirector
- func (ad AwaitDirector) All(fun generic.ActionVar1[[]async.Ret, any], va ...any)
- func (ad AwaitDirector) Any(fun generic.ActionVar1[async.Ret, any], va ...any)
- func (ad AwaitDirector) AnyOK(fun generic.ActionVar1[async.Ret, any], va ...any)
- func (ad AwaitDirector) Pipe(ctx context.Context, fun generic.ActionVar1[async.Ret, any], va ...any)
- type ComponentBehavior
- func (c *ComponentBehavior) Async(fun generic.FuncVar0[any, async.Ret], va ...any) async.AsyncRet
- func (c *ComponentBehavior) AsyncVoid(fun generic.ActionVar0[any], va ...any) async.AsyncRet
- func (c *ComponentBehavior) Await(asyncRet ...async.AsyncRet) AwaitDirector
- func (c *ComponentBehavior) BalanceOneWayRPC(service, comp, method string, args ...any) error
- func (c *ComponentBehavior) BalanceRPC(service, comp, method string, args ...any) async.AsyncRet
- func (c *ComponentBehavior) BroadcastOneWayRPC(excludeSelf bool, service, comp, method string, args ...any) error
- func (c *ComponentBehavior) CliRPC(method string, args ...any) async.AsyncRet
- func (c *ComponentBehavior) CliRPCToEntity(entityId uid.Id, method string, args ...any) async.AsyncRet
- func (c *ComponentBehavior) GetPluginBundle() plugin.PluginBundle
- func (c *ComponentBehavior) GetRuntime() Runtime
- func (c *ComponentBehavior) GetService() Service
- func (c *ComponentBehavior) GlobalBalanceOneWayRPC(comp, method string, args ...any) error
- func (c *ComponentBehavior) GlobalBalanceRPC(comp, method string, args ...any) async.AsyncRet
- func (c *ComponentBehavior) GlobalBroadcastOneWayRPC(excludeSelf bool, comp, method string, args ...any) error
- func (c *ComponentBehavior) Go(fun generic.FuncVar0[any, async.Ret], va ...any) async.AsyncRet
- func (c *ComponentBehavior) GoVoid(fun generic.ActionVar0[any], va ...any) async.AsyncRet
- func (c *ComponentBehavior) IsAlive() bool
- func (c *ComponentBehavior) OneWayCliRPC(method string, args ...any) error
- func (c *ComponentBehavior) OneWayCliRPCToEntity(entityId uid.Id, method string, args ...any) error
- func (c *ComponentBehavior) OneWayRPC(service, comp, method string, args ...any) error
- func (c *ComponentBehavior) RPC(service, comp, method string, args ...any) async.AsyncRet
- func (c *ComponentBehavior) TimeAfter(dur time.Duration) async.AsyncRet
- func (c *ComponentBehavior) TimeAt(at time.Time) async.AsyncRet
- func (c *ComponentBehavior) TimeTick(dur time.Duration) async.AsyncRet
- type ConcurrentEntityCreator
- func (c ConcurrentEntityCreator) AwakeOnFirstAccess(b bool) ConcurrentEntityCreator
- func (c ConcurrentEntityCreator) Composite(composite ec.Entity) ConcurrentEntityCreator
- func (c ConcurrentEntityCreator) CompositeFace(face iface.Face[ec.Entity]) ConcurrentEntityCreator
- func (c ConcurrentEntityCreator) Meta(m ec.Meta) ConcurrentEntityCreator
- func (c ConcurrentEntityCreator) ParentId(id uid.Id) ConcurrentEntityCreator
- func (c ConcurrentEntityCreator) PersistId(id uid.Id) ConcurrentEntityCreator
- func (c ConcurrentEntityCreator) Runtime(rt core.Runtime) ConcurrentEntityCreator
- func (c ConcurrentEntityCreator) RuntimeCreator(rtCreator RuntimeCreator) ConcurrentEntityCreator
- func (c ConcurrentEntityCreator) Scope(scope ec.Scope) ConcurrentEntityCreator
- func (c ConcurrentEntityCreator) Spawn() (ec.ConcurrentEntity, error)
- func (c ConcurrentEntityCreator) SpawnAsync() async.AsyncRetT[ec.ConcurrentEntity]
- type EntityBehavior
- func (e *EntityBehavior) Async(fun generic.FuncVar0[any, async.Ret], va ...any) async.AsyncRet
- func (e *EntityBehavior) AsyncVoid(fun generic.ActionVar0[any], va ...any) async.AsyncRet
- func (e *EntityBehavior) Await(asyncRet ...async.AsyncRet) AwaitDirector
- func (e *EntityBehavior) BalanceOneWayRPC(service, comp, method string, args ...any) error
- func (e *EntityBehavior) BalanceRPC(service, comp, method string, args ...any) async.AsyncRet
- func (e *EntityBehavior) BroadcastOneWayRPC(excludeSelf bool, service, comp, method string, args ...any) error
- func (e *EntityBehavior) CliRPC(method string, args ...any) async.AsyncRet
- func (e *EntityBehavior) CliRPCToEntity(entityId uid.Id, method string, args ...any) async.AsyncRet
- func (e *EntityBehavior) GetPluginBundle() plugin.PluginBundle
- func (e *EntityBehavior) GetRuntime() Runtime
- func (e *EntityBehavior) GetService() Service
- func (e *EntityBehavior) GlobalBalanceOneWayRPC(comp, method string, args ...any) error
- func (e *EntityBehavior) GlobalBalanceRPC(comp, method string, args ...any) async.AsyncRet
- func (e *EntityBehavior) GlobalBroadcastOneWayRPC(excludeSelf bool, comp, method string, args ...any) error
- func (e *EntityBehavior) Go(fun generic.FuncVar0[any, async.Ret], va ...any) async.AsyncRet
- func (e *EntityBehavior) GoVoid(fun generic.ActionVar0[any], va ...any) async.AsyncRet
- func (e *EntityBehavior) IsAlive() bool
- func (e *EntityBehavior) OneWayCliRPC(method string, args ...any) error
- func (e *EntityBehavior) OneWayCliRPCToEntity(entityId uid.Id, method string, args ...any) error
- func (e *EntityBehavior) OneWayRPC(service, comp, method string, args ...any) error
- func (e *EntityBehavior) RPC(service, comp, method string, args ...any) async.AsyncRet
- func (e *EntityBehavior) TimeAfter(dur time.Duration) async.AsyncRet
- func (e *EntityBehavior) TimeAt(at time.Time) async.AsyncRet
- func (e *EntityBehavior) TimeTick(dur time.Duration) async.AsyncRet
- type EntityPTCreator
- type IRuntimeInstantiation
- type IServiceInstantiation
- type InstallRuntimeDistEntities
- type InstallRuntimeLogger
- type InstallRuntimeRPCStack
- type InstallServiceBroker
- type InstallServiceConfig
- type InstallServiceDistEntityQuerier
- type InstallServiceDistService
- type InstallServiceDistSync
- type InstallServiceLogger
- type InstallServiceRPC
- type InstallServiceRegistry
- type LifecycleRuntimeBirth
- type LifecycleRuntimeBuilt
- type LifecycleRuntimeFrameLoopBegin
- type LifecycleRuntimeFrameLoopEnd
- type LifecycleRuntimeFrameUpdateBegin
- type LifecycleRuntimeFrameUpdateEnd
- type LifecycleRuntimeRunCallBegin
- type LifecycleRuntimeRunCallEnd
- type LifecycleRuntimeRunGCBegin
- type LifecycleRuntimeRunGCEnd
- type LifecycleRuntimeStarted
- type LifecycleRuntimeStarting
- type LifecycleRuntimeTerminated
- type LifecycleRuntimeTerminating
- type LifecycleServiceBirth
- type LifecycleServiceBuilt
- type LifecycleServiceStarted
- type LifecycleServiceStarting
- type LifecycleServiceTerminated
- type LifecycleServiceTerminating
- type Runtime
- type RuntimeCreator
- func (c RuntimeCreator) AutoRun(auto bool) RuntimeCreator
- func (c RuntimeCreator) FPS(fps float32) RuntimeCreator
- func (c RuntimeCreator) Name(name string) RuntimeCreator
- func (c RuntimeCreator) PanicHandling(autoRecover bool, reportError chan error) RuntimeCreator
- func (c RuntimeCreator) ProcessQueueCapacity(cap int) RuntimeCreator
- func (c RuntimeCreator) Setup(generic any) RuntimeCreator
- func (c RuntimeCreator) Spawn() core.Runtime
- type RuntimeGeneric
- type RuntimeGenericT
- type RuntimeInstance
- type Service
- func (serv Service) CreateConcurrentEntity(prototype string) ConcurrentEntityCreator
- func (serv Service) CreateEntityPT(prototype string) core.EntityPTCreator
- func (serv Service) CreateRuntime() RuntimeCreator
- func (serv Service) GetBroker() broker.IBroker
- func (serv Service) GetConf() conf.IConfig
- func (serv Service) GetDistEntityQuerier() dentq.IDistEntityQuerier
- func (serv Service) GetDistService() dserv.IDistService
- func (serv Service) GetDistSync() dsync.IDistSync
- func (serv Service) GetMemKV() *sync.Map
- func (serv Service) GetRPC() rpc.IRPC
- func (serv Service) GetRegistry() discovery.IRegistry
- func (serv Service) GetStartupNo() int
- type ServiceGeneric
- type ServiceGenericT
- type ServiceInstance
- func (inst *ServiceInstance) CreateConcurrentEntity(prototype string) ConcurrentEntityCreator
- func (inst *ServiceInstance) CreateEntityPT(prototype string) core.EntityPTCreator
- func (inst *ServiceInstance) CreateRuntime() RuntimeCreator
- func (inst *ServiceInstance) GetBroker() broker.IBroker
- func (inst *ServiceInstance) GetConf() conf.IConfig
- func (inst *ServiceInstance) GetDistEntityQuerier() dentq.IDistEntityQuerier
- func (inst *ServiceInstance) GetDistService() dserv.IDistService
- func (inst *ServiceInstance) GetDistSync() dsync.IDistSync
- func (inst *ServiceInstance) GetMemKV() *sync.Map
- func (inst *ServiceInstance) GetRPC() rpc.IRPC
- func (inst *ServiceInstance) GetRegistry() discovery.IRegistry
- func (inst *ServiceInstance) GetStartupConf() *viper.Viper
- func (inst *ServiceInstance) GetStartupNo() int
Constants ¶
This section is empty.
Variables ¶
var CreateEntityPT = core.CreateEntityPT
CreateEntityPT 创建实体原型
var (
ErrComponentNotAlive = errors.New("async/await: component not alive")
)
var (
ErrEntityNotAlive = errors.New("async/await: entity not alive")
)
Functions ¶
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App 应用
func (*App) StartingCB ¶
func (app *App) StartingCB(cb generic.DelegateAction1[*App]) *App
StartingCB 启动回调
func (*App) TerminateCB ¶ added in v0.1.33
func (app *App) TerminateCB(cb generic.DelegateAction1[*App]) *App
TerminateCB 终止回调
type AwaitDirector ¶ added in v0.1.56
type AwaitDirector struct {
// contains filtered or unexported fields
}
AwaitDirector 异步等待分发器
func (AwaitDirector) All ¶ added in v0.1.56
func (ad AwaitDirector) All(fun generic.ActionVar1[[]async.Ret, any], va ...any)
All 异步等待所有结果返回
func (AwaitDirector) Any ¶ added in v0.1.56
func (ad AwaitDirector) Any(fun generic.ActionVar1[async.Ret, any], va ...any)
Any 异步等待任意一个结果返回
func (AwaitDirector) AnyOK ¶ added in v0.1.56
func (ad AwaitDirector) AnyOK(fun generic.ActionVar1[async.Ret, any], va ...any)
AnyOK 异步等待任意一个结果成功返回
type ComponentBehavior ¶ added in v0.1.56
type ComponentBehavior struct {
ec.ComponentBehavior
}
ComponentBehavior 组件行为,在开发新组件时,匿名嵌入至组件结构体中
func (*ComponentBehavior) AsyncVoid ¶ added in v0.1.56
func (c *ComponentBehavior) AsyncVoid(fun generic.ActionVar0[any], va ...any) async.AsyncRet
AsyncVoid 异步执行代码,无返回值
func (*ComponentBehavior) Await ¶ added in v0.1.56
func (c *ComponentBehavior) Await(asyncRet ...async.AsyncRet) AwaitDirector
Await 异步等待结果返回
func (*ComponentBehavior) BalanceOneWayRPC ¶ added in v0.1.56
func (c *ComponentBehavior) BalanceOneWayRPC(service, comp, method string, args ...any) error
BalanceOneWayRPC 使用负载均衡模式,向分布式实体目标服务发送单向RPC
func (*ComponentBehavior) BalanceRPC ¶ added in v0.1.56
func (c *ComponentBehavior) BalanceRPC(service, comp, method string, args ...any) async.AsyncRet
BalanceRPC 使用负载均衡模式,向分布式实体目标服务发送RPC
func (*ComponentBehavior) BroadcastOneWayRPC ¶ added in v0.1.56
func (c *ComponentBehavior) BroadcastOneWayRPC(excludeSelf bool, service, comp, method string, args ...any) error
BroadcastOneWayRPC 使用广播模式,向分布式实体目标服务发送单向RPC
func (*ComponentBehavior) CliRPC ¶ added in v0.1.56
func (c *ComponentBehavior) CliRPC(method string, args ...any) async.AsyncRet
CliRPC 向客户端发送RPC
func (*ComponentBehavior) CliRPCToEntity ¶ added in v0.1.56
func (c *ComponentBehavior) CliRPCToEntity(entityId uid.Id, method string, args ...any) async.AsyncRet
CliRPCToEntity 向客户端实体发送RPC
func (*ComponentBehavior) GetPluginBundle ¶ added in v0.1.80
func (c *ComponentBehavior) GetPluginBundle() plugin.PluginBundle
GetPluginBundle 获取插件包
func (*ComponentBehavior) GetRuntime ¶ added in v0.1.56
func (c *ComponentBehavior) GetRuntime() Runtime
GetRuntime 获取运行时
func (*ComponentBehavior) GetService ¶ added in v0.1.56
func (c *ComponentBehavior) GetService() Service
GetService 获取服务
func (*ComponentBehavior) GlobalBalanceOneWayRPC ¶ added in v0.1.56
func (c *ComponentBehavior) GlobalBalanceOneWayRPC(comp, method string, args ...any) error
GlobalBalanceOneWayRPC 使用全局负载均衡模式,向分布式实体任意服务发送单向RPC
func (*ComponentBehavior) GlobalBalanceRPC ¶ added in v0.1.56
func (c *ComponentBehavior) GlobalBalanceRPC(comp, method string, args ...any) async.AsyncRet
GlobalBalanceRPC 使用全局负载均衡模式,向分布式实体任意服务发送RPC
func (*ComponentBehavior) GlobalBroadcastOneWayRPC ¶ added in v0.1.56
func (c *ComponentBehavior) GlobalBroadcastOneWayRPC(excludeSelf bool, comp, method string, args ...any) error
GlobalBroadcastOneWayRPC 使用全局广播模式,向分布式实体所有服务发送单向RPC
func (*ComponentBehavior) GoVoid ¶ added in v0.1.56
func (c *ComponentBehavior) GoVoid(fun generic.ActionVar0[any], va ...any) async.AsyncRet
GoVoid 使用新线程执行代码,无返回值(注意线程安全)
func (*ComponentBehavior) IsAlive ¶ added in v0.1.76
func (c *ComponentBehavior) IsAlive() bool
IsAlive 是否活跃
func (*ComponentBehavior) OneWayCliRPC ¶ added in v0.1.56
func (c *ComponentBehavior) OneWayCliRPC(method string, args ...any) error
OneWayCliRPC 向客户端发送单向RPC
func (*ComponentBehavior) OneWayCliRPCToEntity ¶ added in v0.1.56
OneWayCliRPCToEntity 向客户端实体发送单向RPC
func (*ComponentBehavior) OneWayRPC ¶ added in v0.1.56
func (c *ComponentBehavior) OneWayRPC(service, comp, method string, args ...any) error
OneWayRPC 向分布式实体目标服务发送单向RPC
func (*ComponentBehavior) RPC ¶ added in v0.1.56
func (c *ComponentBehavior) RPC(service, comp, method string, args ...any) async.AsyncRet
RPC 向分布式实体目标服务发送RPC
func (*ComponentBehavior) TimeAfter ¶ added in v0.1.56
func (c *ComponentBehavior) TimeAfter(dur time.Duration) async.AsyncRet
TimeAfter 定时器,指定时长
type ConcurrentEntityCreator ¶ added in v0.1.77
type ConcurrentEntityCreator struct {
// contains filtered or unexported fields
}
ConcurrentEntityCreator 实体构建器
func CreateConcurrentEntity ¶ added in v0.1.77
func CreateConcurrentEntity(ctx service.Context, prototype string) ConcurrentEntityCreator
CreateConcurrentEntity 创建实体
func (ConcurrentEntityCreator) AwakeOnFirstAccess ¶ added in v0.1.77
func (c ConcurrentEntityCreator) AwakeOnFirstAccess(b bool) ConcurrentEntityCreator
AwakeOnFirstAccess 设置开启组件被首次访问时,检测并调用Awake()
func (ConcurrentEntityCreator) Composite ¶ added in v0.1.77
func (c ConcurrentEntityCreator) Composite(composite ec.Entity) ConcurrentEntityCreator
Composite 设置扩展者,在扩展实体自身能力时使用
func (ConcurrentEntityCreator) CompositeFace ¶ added in v0.1.77
func (c ConcurrentEntityCreator) CompositeFace(face iface.Face[ec.Entity]) ConcurrentEntityCreator
CompositeFace 设置扩展者,在扩展实体自身能力时使用
func (ConcurrentEntityCreator) Meta ¶ added in v0.1.77
func (c ConcurrentEntityCreator) Meta(m ec.Meta) ConcurrentEntityCreator
Meta 设置Meta信息
func (ConcurrentEntityCreator) ParentId ¶ added in v0.1.77
func (c ConcurrentEntityCreator) ParentId(id uid.Id) ConcurrentEntityCreator
ParentId 设置父实体Id
func (ConcurrentEntityCreator) PersistId ¶ added in v0.1.77
func (c ConcurrentEntityCreator) PersistId(id uid.Id) ConcurrentEntityCreator
PersistId 设置实体持久化Id
func (ConcurrentEntityCreator) Runtime ¶ added in v0.1.77
func (c ConcurrentEntityCreator) Runtime(rt core.Runtime) ConcurrentEntityCreator
Runtime 设置运行时(优先使用)
func (ConcurrentEntityCreator) RuntimeCreator ¶ added in v0.1.77
func (c ConcurrentEntityCreator) RuntimeCreator(rtCreator RuntimeCreator) ConcurrentEntityCreator
RuntimeCreator 设置运行时构建器
func (ConcurrentEntityCreator) Scope ¶ added in v0.1.77
func (c ConcurrentEntityCreator) Scope(scope ec.Scope) ConcurrentEntityCreator
Scope 设置实体的可访问作用域
func (ConcurrentEntityCreator) Spawn ¶ added in v0.1.77
func (c ConcurrentEntityCreator) Spawn() (ec.ConcurrentEntity, error)
Spawn 创建实体
func (ConcurrentEntityCreator) SpawnAsync ¶ added in v0.1.77
func (c ConcurrentEntityCreator) SpawnAsync() async.AsyncRetT[ec.ConcurrentEntity]
SpawnAsync 创建实体
type EntityBehavior ¶ added in v0.1.76
type EntityBehavior struct {
ec.EntityBehavior
}
EntityBehavior 实体行为,在需要扩展实体能力时,匿名嵌入至实体结构体中
func (*EntityBehavior) AsyncVoid ¶ added in v0.1.76
func (e *EntityBehavior) AsyncVoid(fun generic.ActionVar0[any], va ...any) async.AsyncRet
AsyncVoid 异步执行代码,无返回值
func (*EntityBehavior) Await ¶ added in v0.1.76
func (e *EntityBehavior) Await(asyncRet ...async.AsyncRet) AwaitDirector
Await 异步等待结果返回
func (*EntityBehavior) BalanceOneWayRPC ¶ added in v0.1.76
func (e *EntityBehavior) BalanceOneWayRPC(service, comp, method string, args ...any) error
BalanceOneWayRPC 使用负载均衡模式,向分布式实体目标服务发送单向RPC
func (*EntityBehavior) BalanceRPC ¶ added in v0.1.76
func (e *EntityBehavior) BalanceRPC(service, comp, method string, args ...any) async.AsyncRet
BalanceRPC 使用负载均衡模式,向分布式实体目标服务发送RPC
func (*EntityBehavior) BroadcastOneWayRPC ¶ added in v0.1.76
func (e *EntityBehavior) BroadcastOneWayRPC(excludeSelf bool, service, comp, method string, args ...any) error
BroadcastOneWayRPC 使用广播模式,向分布式实体目标服务发送单向RPC
func (*EntityBehavior) CliRPC ¶ added in v0.1.76
func (e *EntityBehavior) CliRPC(method string, args ...any) async.AsyncRet
CliRPC 向客户端发送RPC
func (*EntityBehavior) CliRPCToEntity ¶ added in v0.1.76
CliRPCToEntity 向客户端实体发送RPC
func (*EntityBehavior) GetPluginBundle ¶ added in v0.1.80
func (e *EntityBehavior) GetPluginBundle() plugin.PluginBundle
GetPluginBundle 获取插件包
func (*EntityBehavior) GetRuntime ¶ added in v0.1.76
func (e *EntityBehavior) GetRuntime() Runtime
GetRuntime 获取运行时
func (*EntityBehavior) GetService ¶ added in v0.1.76
func (e *EntityBehavior) GetService() Service
GetService 获取服务
func (*EntityBehavior) GlobalBalanceOneWayRPC ¶ added in v0.1.76
func (e *EntityBehavior) GlobalBalanceOneWayRPC(comp, method string, args ...any) error
GlobalBalanceOneWayRPC 使用全局负载均衡模式,向分布式实体任意服务发送单向RPC
func (*EntityBehavior) GlobalBalanceRPC ¶ added in v0.1.76
func (e *EntityBehavior) GlobalBalanceRPC(comp, method string, args ...any) async.AsyncRet
GlobalBalanceRPC 使用全局负载均衡模式,向分布式实体任意服务发送RPC
func (*EntityBehavior) GlobalBroadcastOneWayRPC ¶ added in v0.1.76
func (e *EntityBehavior) GlobalBroadcastOneWayRPC(excludeSelf bool, comp, method string, args ...any) error
GlobalBroadcastOneWayRPC 使用全局广播模式,向分布式实体所有服务发送单向RPC
func (*EntityBehavior) GoVoid ¶ added in v0.1.76
func (e *EntityBehavior) GoVoid(fun generic.ActionVar0[any], va ...any) async.AsyncRet
GoVoid 使用新线程执行代码,无返回值(注意线程安全)
func (*EntityBehavior) IsAlive ¶ added in v0.1.76
func (e *EntityBehavior) IsAlive() bool
IsAlive 是否活跃
func (*EntityBehavior) OneWayCliRPC ¶ added in v0.1.76
func (e *EntityBehavior) OneWayCliRPC(method string, args ...any) error
OneWayCliRPC 向客户端发送单向RPC
func (*EntityBehavior) OneWayCliRPCToEntity ¶ added in v0.1.76
OneWayCliRPCToEntity 向客户端实体发送单向RPC
func (*EntityBehavior) OneWayRPC ¶ added in v0.1.76
func (e *EntityBehavior) OneWayRPC(service, comp, method string, args ...any) error
OneWayRPC 向分布式实体目标服务发送单向RPC
func (*EntityBehavior) RPC ¶ added in v0.1.76
func (e *EntityBehavior) RPC(service, comp, method string, args ...any) async.AsyncRet
RPC 向分布式实体目标服务发送RPC
func (*EntityBehavior) TimeAfter ¶ added in v0.1.76
func (e *EntityBehavior) TimeAfter(dur time.Duration) async.AsyncRet
TimeAfter 定时器,指定时长
type EntityPTCreator ¶ added in v0.1.77
type EntityPTCreator = core.EntityPTCreator
EntityPTCreator 实体原型构建器
type IRuntimeInstantiation ¶ added in v0.1.45
IRuntimeInstantiation 运行时实例化接口
type IServiceInstantiation ¶ added in v0.1.45
IServiceInstantiation 服务实例化接口
type InstallRuntimeLogger ¶
type InstallRuntimeRPCStack ¶ added in v0.1.69
type InstallServiceBroker ¶
type InstallServiceConfig ¶
type InstallServiceDistSync ¶
type InstallServiceLogger ¶
type InstallServiceRPC ¶
type InstallServiceRegistry ¶
type LifecycleRuntimeBirth ¶
type LifecycleRuntimeBuilt ¶ added in v0.1.45
type LifecycleRuntimeStarted ¶
type LifecycleServiceBirth ¶
type LifecycleServiceBuilt ¶ added in v0.1.45
type LifecycleServiceStarted ¶
type Runtime ¶ added in v0.1.56
Runtime 运行时
func (Runtime) CreateEntity ¶ added in v0.1.56
func (rt Runtime) CreateEntity(prototype string) core.EntityCreator
CreateEntity 创建实体
func (Runtime) GetDistEntityRegistry ¶ added in v0.1.79
func (rt Runtime) GetDistEntityRegistry() dentr.IDistEntityRegistry
GetDistEntityRegistry 获取分布式实体注册支持插件
func (Runtime) GetRPCStack ¶ added in v0.1.69
GetRPCStack 获取RPC调用堆栈支持插件
type RuntimeCreator ¶
type RuntimeCreator struct {
// contains filtered or unexported fields
}
RuntimeCreator 运行时构建器
func (RuntimeCreator) AutoRun ¶
func (c RuntimeCreator) AutoRun(auto bool) RuntimeCreator
AutoRun 自动开始运行
func (RuntimeCreator) FPS ¶ added in v0.1.27
func (c RuntimeCreator) FPS(fps float32) RuntimeCreator
FPS 帧率
func (RuntimeCreator) PanicHandling ¶ added in v0.1.27
func (c RuntimeCreator) PanicHandling(autoRecover bool, reportError chan error) RuntimeCreator
PanicHandling panic时的处理方式
func (RuntimeCreator) ProcessQueueCapacity ¶
func (c RuntimeCreator) ProcessQueueCapacity(cap int) RuntimeCreator
ProcessQueueCapacity 任务处理流水线大小
func (RuntimeCreator) Setup ¶
func (c RuntimeCreator) Setup(generic any) RuntimeCreator
Setup 安装运行时泛化类型
type RuntimeGeneric ¶ added in v0.1.37
type RuntimeGeneric struct {
// contains filtered or unexported fields
}
RuntimeGeneric 运行时泛化类型
func (*RuntimeGeneric) GetMemKV ¶ added in v0.1.71
func (r *RuntimeGeneric) GetMemKV() *sync.Map
GetMemKV 获取服务内存KV数据库
func (*RuntimeGeneric) GetServiceCtx ¶ added in v0.1.37
func (r *RuntimeGeneric) GetServiceCtx() service.Context
GetServiceCtx 获取服务上下文
type RuntimeGenericT ¶ added in v0.1.62
type RuntimeGenericT[T any] struct { RuntimeGeneric }
RuntimeGenericT 运行时泛化类型实例化
func (*RuntimeGenericT[T]) Instantiation ¶ added in v0.1.62
func (r *RuntimeGenericT[T]) Instantiation() runtime.Context
Instantiation 实例化
type RuntimeInstance ¶ added in v0.1.45
type RuntimeInstance struct {
runtime.ContextBehavior
}
RuntimeInstance 运行时实例
func (*RuntimeInstance) CreateEntity ¶ added in v0.1.45
func (inst *RuntimeInstance) CreateEntity(prototype string) core.EntityCreator
CreateEntity 创建实体
func (*RuntimeInstance) GetMemKV ¶ added in v0.1.71
func (inst *RuntimeInstance) GetMemKV() *sync.Map
GetMemKV 获取服务内存KV数据库
type Service ¶ added in v0.1.56
Service 服务
func (Service) CreateConcurrentEntity ¶ added in v0.1.79
func (serv Service) CreateConcurrentEntity(prototype string) ConcurrentEntityCreator
CreateConcurrentEntity 创建实体
func (Service) CreateEntityPT ¶ added in v0.1.56
func (serv Service) CreateEntityPT(prototype string) core.EntityPTCreator
CreateEntityPT 创建实体原型
func (Service) CreateRuntime ¶ added in v0.1.56
func (serv Service) CreateRuntime() RuntimeCreator
CreateRuntime 创建运行时
func (Service) GetDistEntityQuerier ¶ added in v0.1.56
func (serv Service) GetDistEntityQuerier() dentq.IDistEntityQuerier
GetDistEntityQuerier 获取分布式实体查询插件
func (Service) GetDistService ¶ added in v0.1.56
func (serv Service) GetDistService() dserv.IDistService
GetDistService 获取分布式服务插件
func (Service) GetDistSync ¶ added in v0.1.56
GetDistSync 获取分布式同步插件
func (Service) GetRegistry ¶ added in v0.1.56
GetRegistry 获取服务发现插件
func (Service) GetStartupNo ¶ added in v0.1.71
GetStartupNo 获取启动序号
type ServiceGeneric ¶ added in v0.1.37
type ServiceGeneric struct {
// contains filtered or unexported fields
}
ServiceGeneric 服务泛化类型
func (*ServiceGeneric) GetName ¶ added in v0.1.37
func (s *ServiceGeneric) GetName() string
GetName 获取服务名称
func (*ServiceGeneric) GetStartupConf ¶ added in v0.1.37
func (s *ServiceGeneric) GetStartupConf() *viper.Viper
GetStartupConf 获取启动参数配置
type ServiceGenericT ¶ added in v0.1.62
type ServiceGenericT[T any] struct { ServiceGeneric }
ServiceGenericT 服务泛化类型实例化
func (*ServiceGenericT[T]) Instantiation ¶ added in v0.1.62
func (s *ServiceGenericT[T]) Instantiation() service.Context
Instantiation 实例化
type ServiceInstance ¶ added in v0.1.45
type ServiceInstance struct {
service.ContextBehavior
}
ServiceInstance 服务实例
func (*ServiceInstance) CreateConcurrentEntity ¶ added in v0.1.77
func (inst *ServiceInstance) CreateConcurrentEntity(prototype string) ConcurrentEntityCreator
CreateConcurrentEntity 创建实体
func (*ServiceInstance) CreateEntityPT ¶ added in v0.1.45
func (inst *ServiceInstance) CreateEntityPT(prototype string) core.EntityPTCreator
CreateEntityPT 创建实体原型
func (*ServiceInstance) CreateRuntime ¶ added in v0.1.45
func (inst *ServiceInstance) CreateRuntime() RuntimeCreator
CreateRuntime 创建运行时
func (*ServiceInstance) GetBroker ¶ added in v0.1.45
func (inst *ServiceInstance) GetBroker() broker.IBroker
GetBroker 获取broker插件
func (*ServiceInstance) GetConf ¶ added in v0.1.45
func (inst *ServiceInstance) GetConf() conf.IConfig
GetConf 获取配置插件
func (*ServiceInstance) GetDistEntityQuerier ¶ added in v0.1.45
func (inst *ServiceInstance) GetDistEntityQuerier() dentq.IDistEntityQuerier
GetDistEntityQuerier 获取分布式实体查询插件
func (*ServiceInstance) GetDistService ¶ added in v0.1.45
func (inst *ServiceInstance) GetDistService() dserv.IDistService
GetDistService 获取分布式服务插件
func (*ServiceInstance) GetDistSync ¶ added in v0.1.45
func (inst *ServiceInstance) GetDistSync() dsync.IDistSync
GetDistSync 获取分布式同步插件
func (*ServiceInstance) GetMemKV ¶ added in v0.1.71
func (inst *ServiceInstance) GetMemKV() *sync.Map
GetMemKV 获取服务内存KV数据库
func (*ServiceInstance) GetRPC ¶ added in v0.1.45
func (inst *ServiceInstance) GetRPC() rpc.IRPC
GetRPC 获取RPC支持插件
func (*ServiceInstance) GetRegistry ¶ added in v0.1.45
func (inst *ServiceInstance) GetRegistry() discovery.IRegistry
GetRegistry 获取服务发现插件
func (*ServiceInstance) GetStartupConf ¶ added in v0.1.45
func (inst *ServiceInstance) GetStartupConf() *viper.Viper
GetStartupConf 获取启动参数配置
func (*ServiceInstance) GetStartupNo ¶ added in v0.1.71
func (inst *ServiceInstance) GetStartupNo() int
GetStartupNo 获取启动序号
Source Files ¶
- app.go
- comp.go
- comp_async.go
- comp_await.go
- comp_rpc.go
- doc.go
- ec.go
- ec_async.go
- ec_await.go
- ec_runtime.go
- ec_service.go
- entity.go
- entity_async.go
- entity_await.go
- entity_rpc.go
- entitycreator.go
- entityptcreator.go
- generator.go
- runtime.go
- runtime_instance.go
- runtime_lifecycle.go
- runtime_plugin.go
- runtimecreator.go
- service.go
- service_instance.go
- service_lifecycle.go
- service_plugin.go
Directories ¶
Path | Synopsis |
---|---|
net
|
|
gap
Package gap Golaxy应用层协议(golaxy application protocol),适用于开发应用层通信消息,需要工作在GTP协议或MQ之上,支持消息判重,解决了幂等性问题。
|
Package gap Golaxy应用层协议(golaxy application protocol),适用于开发应用层通信消息,需要工作在GTP协议或MQ之上,支持消息判重,解决了幂等性问题。 |
gtp
Package gtp Golaxy传输层协议(golaxy transfer protocol),适用于长连接、实时通信的工作场景,需要工作在可靠网络协议(TCP/WebSocket)之上,支持链路加密、链路鉴权、断线续连等特性。
|
Package gtp Golaxy传输层协议(golaxy transfer protocol),适用于长连接、实时通信的工作场景,需要工作在可靠网络协议(TCP/WebSocket)之上,支持链路加密、链路鉴权、断线续连等特性。 |
plugins
|
|
dentq
+k8s:deepcopy-gen=package
|
+k8s:deepcopy-gen=package |
discovery
+k8s:deepcopy-gen=package
|
+k8s:deepcopy-gen=package |
util
|
|