configs

package
v0.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHttpServer

func NewHttpServer(component base.ComponentInterface, port uint16)

Types

type BaseConfig

type BaseConfig struct {
	base.ConfigComponentInterface
	Component base.ComponentInterface // 需要初始化的组件实例
}

基础配置

func (*BaseConfig) GetComponent

func (config *BaseConfig) GetComponent() base.ComponentInterface

获取配置需要初始化的组件

type HttpServer

type HttpServer struct {
	BaseConfig
}

http 服务

type PluginRouter

type PluginRouter struct {
	HandlerList               []controllers.HandlerInterface
	OnWebsocketMessageHandler func(conn *models.WebsocketSession, recvMessage []byte)
}

路由插件。添加这个插件后的配置可获取路由的参数

type WebsocketServer

type WebsocketServer struct {
	BaseConfig
	PluginRouter
	Port uint16 // 服务器端口
}

websocket server 所需的配置

func NewWebsocketServer

func NewWebsocketServer(component base.ComponentInterface, port uint16) *WebsocketServer

新建 websocket server 配置

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL