Documentation ¶
Overview ¶
Package framework Golaxy分布式服务开发框架。
Index ¶
- 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, serv any) *App
- func (app *App) StartingCB(cb generic.DelegateAction1[*App]) *App
- func (app *App) TerminateCB(cb generic.DelegateAction1[*App]) *App
- type InstallRuntimeDistEntities
- type InstallRuntimeLogger
- type InstallServiceBroker
- type InstallServiceConfig
- type InstallServiceDistEntityQuerier
- type InstallServiceDistService
- type InstallServiceDistSync
- type InstallServiceLogger
- type InstallServiceRPC
- type InstallServiceRegistry
- type LifecycleRuntimeBirth
- type LifecycleRuntimeContextBirth
- type LifecycleRuntimeContextFrameLoopBegin
- type LifecycleRuntimeContextFrameLoopEnd
- type LifecycleRuntimeContextFrameUpdateBegin
- type LifecycleRuntimeContextFrameUpdateEnd
- type LifecycleRuntimeContextInit
- type LifecycleRuntimeContextRunCallBegin
- type LifecycleRuntimeContextRunCallEnd
- type LifecycleRuntimeContextRunGCBegin
- type LifecycleRuntimeContextRunGCEnd
- type LifecycleRuntimeContextStarted
- type LifecycleRuntimeContextStarting
- type LifecycleRuntimeContextTerminated
- type LifecycleRuntimeContextTerminating
- type LifecycleRuntimeFrameLoopBegin
- type LifecycleRuntimeFrameLoopEnd
- type LifecycleRuntimeFrameUpdateBegin
- type LifecycleRuntimeFrameUpdateEnd
- type LifecycleRuntimeInit
- type LifecycleRuntimeRunCallBegin
- type LifecycleRuntimeRunCallEnd
- type LifecycleRuntimeRunGCBegin
- type LifecycleRuntimeRunGCEnd
- type LifecycleRuntimeStarted
- type LifecycleRuntimeStarting
- type LifecycleRuntimeTerminated
- type LifecycleRuntimeTerminating
- type LifecycleServiceBirth
- type LifecycleServiceContextBirth
- type LifecycleServiceContextInit
- type LifecycleServiceContextStarted
- type LifecycleServiceContextStarting
- type LifecycleServiceContextTerminated
- type LifecycleServiceContextTerminating
- type LifecycleServiceInit
- type LifecycleServiceStarted
- type LifecycleServiceStarting
- type LifecycleServiceTerminated
- type LifecycleServiceTerminating
- type RuntimeBehavior
- 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(rt any) RuntimeCreator
- func (c RuntimeCreator) Spawn() core.Runtime
- type ServiceBehavior
- type SetupRuntimeContextComposite
- type SetupServiceContextComposite
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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 InstallRuntimeLogger ¶
type InstallServiceBroker ¶
type InstallServiceConfig ¶
type InstallServiceDistSync ¶
type InstallServiceLogger ¶
type InstallServiceRPC ¶
type InstallServiceRegistry ¶
type LifecycleRuntimeBirth ¶
type LifecycleRuntimeContextBirth ¶ added in v0.1.32
type LifecycleRuntimeContextBirth interface {
Birth()
}
type LifecycleRuntimeContextFrameLoopBegin ¶ added in v0.1.32
type LifecycleRuntimeContextFrameLoopBegin interface {
FrameLoopBegin()
}
type LifecycleRuntimeContextFrameLoopEnd ¶ added in v0.1.32
type LifecycleRuntimeContextFrameLoopEnd interface {
FrameLoopEnd()
}
type LifecycleRuntimeContextFrameUpdateBegin ¶ added in v0.1.32
type LifecycleRuntimeContextFrameUpdateBegin interface {
FrameUpdateBegin()
}
type LifecycleRuntimeContextFrameUpdateEnd ¶ added in v0.1.32
type LifecycleRuntimeContextFrameUpdateEnd interface {
FrameUpdateEnd()
}
type LifecycleRuntimeContextInit ¶ added in v0.1.32
type LifecycleRuntimeContextInit interface {
Init()
}
type LifecycleRuntimeContextRunCallBegin ¶ added in v0.1.32
type LifecycleRuntimeContextRunCallBegin interface {
RunCallBegin()
}
type LifecycleRuntimeContextRunCallEnd ¶ added in v0.1.32
type LifecycleRuntimeContextRunCallEnd interface {
RunCallEnd()
}
type LifecycleRuntimeContextRunGCBegin ¶ added in v0.1.32
type LifecycleRuntimeContextRunGCBegin interface {
RunGCBegin()
}
type LifecycleRuntimeContextRunGCEnd ¶ added in v0.1.32
type LifecycleRuntimeContextRunGCEnd interface {
RunGCEnd()
}
type LifecycleRuntimeContextStarted ¶ added in v0.1.32
type LifecycleRuntimeContextStarted interface {
Started()
}
type LifecycleRuntimeContextStarting ¶ added in v0.1.32
type LifecycleRuntimeContextStarting interface {
Starting()
}
type LifecycleRuntimeContextTerminated ¶ added in v0.1.32
type LifecycleRuntimeContextTerminated interface {
Terminated()
}
type LifecycleRuntimeContextTerminating ¶ added in v0.1.32
type LifecycleRuntimeContextTerminating interface {
Terminating()
}
type LifecycleRuntimeInit ¶
type LifecycleRuntimeStarted ¶
type LifecycleServiceBirth ¶
type LifecycleServiceContextBirth ¶ added in v0.1.32
type LifecycleServiceContextBirth interface {
Birth()
}
type LifecycleServiceContextInit ¶ added in v0.1.32
type LifecycleServiceContextInit interface {
Init()
}
type LifecycleServiceContextStarted ¶ added in v0.1.32
type LifecycleServiceContextStarted interface {
Started()
}
type LifecycleServiceContextStarting ¶ added in v0.1.32
type LifecycleServiceContextStarting interface {
Starting()
}
type LifecycleServiceContextTerminated ¶ added in v0.1.32
type LifecycleServiceContextTerminated interface {
Terminated()
}
type LifecycleServiceContextTerminating ¶ added in v0.1.32
type LifecycleServiceContextTerminating interface {
Terminating()
}
type LifecycleServiceInit ¶
type LifecycleServiceStarted ¶
type RuntimeBehavior ¶
type RuntimeBehavior struct {
// contains filtered or unexported fields
}
RuntimeBehavior 运行时行为,开发新运行环境时,匿名嵌入至新运行时结构体中
func (*RuntimeBehavior) GetMemKVs ¶
func (rb *RuntimeBehavior) GetMemKVs() *sync.Map
GetMemKVs 获取服务内存KV数据库
func (*RuntimeBehavior) GetServiceCtx ¶
func (rb *RuntimeBehavior) GetServiceCtx() service.Context
GetServiceCtx 获取服务上下文
func (*RuntimeBehavior) GetStartupConf ¶
func (rb *RuntimeBehavior) GetStartupConf() *viper.Viper
GetStartupConf 获取启动参数配置
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 任务处理流水线大小
type ServiceBehavior ¶
type ServiceBehavior struct {
// contains filtered or unexported fields
}
ServiceBehavior 服务行为,在开发新服务时,匿名嵌入至服务结构体中
func (*ServiceBehavior) GetStartupConf ¶
func (sb *ServiceBehavior) GetStartupConf() *viper.Viper
GetStartupConf 获取启动参数配置
type SetupRuntimeContextComposite ¶ added in v0.1.32
type SetupServiceContextComposite ¶ added in v0.1.32
Source Files ¶
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/kcp/websocket)之上,支持链路加密、链路鉴权、断线续连等特性。
|
Package gtp Golaxy传输层协议(golaxy transfer protocol),适用于长连接、实时通信的工作场景,需要工作在可靠网络协议(tcp/kcp/websocket)之上,支持链路加密、链路鉴权、断线续连等特性。 |
plugins
|
|
dentq
+k8s:deepcopy-gen=package
|
+k8s:deepcopy-gen=package |
discovery
+k8s:deepcopy-gen=package
|
+k8s:deepcopy-gen=package |
util
|
|
Click to show internal directories.
Click to hide internal directories.