Documentation ¶
Index ¶
- func SetApplication(app base.ApplicationInterface)
- type Base
- type Console
- type Database
- type HttpServer
- type WebsocketServer
- func (component *WebsocketServer) Init(configInterface base.ConfigComponentInterface)
- func (component *WebsocketServer) OnClose(handler func(conn *models.Context))
- func (component *WebsocketServer) OnConnect(handler func(conn *models.Context))
- func (component *WebsocketServer) OnMessage(handler func(conn *models.Context, recvMessage []byte))
- func (component *WebsocketServer) Start()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Base ¶
type Base struct { base.ComponentInterface // contains filtered or unexported fields }
所有组件的基类
func (*Base) Init ¶
func (component *Base) Init(configInterface base.ConfigComponentInterface)
使用配置初始化数据
type Console ¶ added in v0.0.2
type Console struct { Base // contains filtered or unexported fields }
命令行组件
func (*Console) Init ¶ added in v0.0.2
func (component *Console) Init(configInterface base.ConfigComponentInterface)
初始化方法
type Database ¶ added in v0.0.2
type Database struct { Base // contains filtered or unexported fields }
数据库组件
func (*Database) Init ¶ added in v0.0.2
func (component *Database) Init(configInterface base.ConfigComponentInterface)
初始化
type HttpServer ¶
type HttpServer struct { Base // contains filtered or unexported fields }
http服务
func (*HttpServer) Init ¶
func (component *HttpServer) Init(configInterface base.ConfigComponentInterface)
使用配置初始化数据
func (*HttpServer) Stop ¶ added in v0.0.2
func (component *HttpServer) Stop()
type WebsocketServer ¶
type WebsocketServer struct { Base // contains filtered or unexported fields }
func (*WebsocketServer) Init ¶
func (component *WebsocketServer) Init(configInterface base.ConfigComponentInterface)
使用配置 初始化数据
func (*WebsocketServer) OnClose ¶
func (component *WebsocketServer) OnClose(handler func(conn *models.Context))
设置 关闭连接的方法
func (*WebsocketServer) OnConnect ¶
func (component *WebsocketServer) OnConnect(handler func(conn *models.Context))
设置 接受新连接的方法
Click to show internal directories.
Click to hide internal directories.