Documentation
¶
Index ¶
- type AppLifeSet
- type CallbackSet
- type ModuleSet
- type NameSet
- type ServerSet
- func (app *ServerSet) Servers() []interfaces.ItfServer
- func (app *ServerSet) Start()
- func (app *ServerSet) Stop() error
- func (app *ServerSet) WithApiServer(s ...interfaces.ItfApiServer)
- func (app *ServerSet) WithServer(s ...interfaces.ItfServer)
- func (app *ServerSet) WithWorker(s ...interfaces.ItfWorker)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppLifeSet ¶
type AppLifeSet struct {
// contains filtered or unexported fields
}
AppLifeSet 支持生命周期
func (*AppLifeSet) OnInitialize ¶
func (app *AppLifeSet) OnInitialize(tags ...string)
OnInitialize 初始化(注意该方法只最多执行一次)
func (*AppLifeSet) WithInitialize ¶
func (app *AppLifeSet) WithInitialize(fn ...func())
WithInitialize 设置初始化函数
type CallbackSet ¶
type CallbackSet struct {
// contains filtered or unexported fields
}
CallbackSet 用于设置回调函数
func (*CallbackSet) OnCallbackOnce ¶
func (app *CallbackSet) OnCallbackOnce(tags ...string)
OnCallbackOnce 回调时(只执行一次)
func (*CallbackSet) WithCallback ¶
func (app *CallbackSet) WithCallback(fn ...func())
WithCallback 设置初始化函数
type ModuleSet ¶
type ModuleSet struct {
// contains filtered or unexported fields
}
ModuleSet 模块支持组件
用于设置是否模块启动
type ServerSet ¶
type ServerSet struct {
// contains filtered or unexported fields
}
ServerSet 服务支持组件
用于设置server和启动server
func (*ServerSet) WithApiServer ¶
func (app *ServerSet) WithApiServer(s ...interfaces.ItfApiServer)
WithApiServer 指定apiServer
func (*ServerSet) WithServer ¶
func (app *ServerSet) WithServer(s ...interfaces.ItfServer)
WithServer 指定任意Server
func (*ServerSet) WithWorker ¶
func (app *ServerSet) WithWorker(s ...interfaces.ItfWorker)
WithWorker 指定worker
Click to show internal directories.
Click to hide internal directories.