cherry

package module
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2021 License: MIT Imports: 22 Imported by: 15

README

cherry

cherry game server engine for golang

TODO

基础
  • 多环境profile配置
日志
  • 多文件配置输出
  • 过滤配置
  • LEVEL定义
  • 滚动日志
消息&路由
  • 包结构
  • 包解码编码
  • 消息路由
  • 消息序列化
  • 事件
  • 定时器
网络协议
  • tcp
  • websocket
  • http server
  • http client
  • kcp
数据配表
  • 本地加载配表
  • 第三方数据源加载配表(redis)
  • 热更新配表
  • 类型检测
  • 条件查询(go-linq)
集群
  • 配置方式加载节点
  • etcd方式加载&更新节点
  • grpc
其他
  • mysql db队列
  • nat消息队列
  • gopher-lua脚本

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Configure added in v1.1.5

func Configure(profilePath, profileName, nodeId string) cherryFacade.IApplication

func RegisterCluster added in v1.1.5

func RegisterCluster()

func RegisterCommand added in v1.1.5

func RegisterCommand(command cherryCommand.ICommand)

func RegisterComponent added in v1.1.5

func RegisterComponent(component ...cherryFacade.IComponent)

func RegisterConnector added in v1.1.5

func RegisterConnector(connector cherryFacade.IConnector)

func RegisterHandler added in v1.1.5

func RegisterHandler(handler ...cherryFacade.IHandler)

func RegisterHandlerGroup added in v1.1.5

func RegisterHandlerGroup(group ...*cherryHandler.HandlerGroup)

func Run added in v1.1.5

func Run()

func SetDictionary added in v1.1.5

func SetDictionary(dict map[string]uint16)

func SetHandlerOptions added in v1.1.5

func SetHandlerOptions(opts ...cherryHandler.Option)

func SetHandshake added in v1.1.5

func SetHandshake(key string, value interface{})

func SetHeartbeat added in v1.1.5

func SetHeartbeat(time time.Duration)

func SetMessageCompression added in v1.1.5

func SetMessageCompression(compression bool)

func SetOnShutdown added in v1.1.5

func SetOnShutdown(fn ...func())

func SetPacketCodec added in v1.1.5

func SetPacketCodec(codec cherryFacade.IPacketCodec)

func SetSerializer added in v1.1.5

func SetSerializer(serializer cherryFacade.ISerializer)

Types

type Application

type Application struct {
	facade.INode
	facade.ISerializer
	facade.IPacketCodec
	// contains filtered or unexported fields
}

func App added in v1.1.3

func App() *Application

func NewApp

func NewApp(profilePath, profileName, nodeId string) *Application

NewApp create new application instance

func (*Application) All

func (a *Application) All() []facade.IComponent

func (*Application) Find

func (a *Application) Find(name string) facade.IComponent

func (*Application) OnShutdown added in v1.1.0

func (a *Application) OnShutdown(fn ...func())

func (*Application) Register added in v1.1.5

func (a *Application) Register(components ...facade.IComponent)

func (*Application) Remove

func (a *Application) Remove(name string) facade.IComponent

Remove remove component by name

func (*Application) Running

func (a *Application) Running() bool

func (*Application) SetPacketCodec added in v1.1.0

func (a *Application) SetPacketCodec(codec facade.IPacketCodec)

func (*Application) SetSerializer added in v1.1.0

func (a *Application) SetSerializer(serializer facade.ISerializer)

func (*Application) Shutdown

func (a *Application) Shutdown()

func (*Application) StartTime added in v1.1.0

func (a *Application) StartTime() string

func (*Application) Startup

func (a *Application) Startup(components ...facade.IComponent)

Startup load components before startup

Directories

Path Synopsis
_examples
gin
Package cherryGin from https://github.com/gin-contrib/zap/
Package cherryGin from https://github.com/gin-contrib/zap/
orm
snowflake
Package cherrySnowflake code from: https://github.com/bwmarrin/snowflake snowflake provides a very simple Twitter snowflake generator and parser.
Package cherrySnowflake code from: https://github.com/bwmarrin/snowflake snowflake provides a very simple Twitter snowflake generator and parser.
components
cron Module
data-config Module
etcd Module
gin Module
gops Module
gorm Module
mongo Module
examples module
extend
map
Package cherryMap file from https://github.com/beego/beego/blob/develop/core/utils/safemap.go Package cherryMap file from https://github.com/gogf/gf
Package cherryMap file from https://github.com/beego/beego/blob/develop/core/utils/safemap.go Package cherryMap file from https://github.com/gogf/gf
mapstructure
Package cherryMapStructure file from https://github.com/goinggo/mapstructure Package cherryMapStructure code from https://github.com/goinggo/mapstructure The mapstructure package exposes functionality to convert an abitrary map[string]interface{} into a native Go structure.
Package cherryMapStructure file from https://github.com/goinggo/mapstructure Package cherryMapStructure code from https://github.com/goinggo/mapstructure The mapstructure package exposes functionality to convert an abitrary map[string]interface{} into a native Go structure.
net
regex
Package cherryRegex file from https://github.com/gogf/gf
Package cherryRegex file from https://github.com/gogf/gf
slice
Package cherySlice code from: https://github.com/beego/beego/blob/develop/core/utils/slice.go
Package cherySlice code from: https://github.com/beego/beego/blob/develop/core/utils/slice.go
time
Package cherryTime code from: https://github.com/golang-module/carbon
Package cherryTime code from: https://github.com/golang-module/carbon
utils
Package cherryUtils file from https://github.com/gogf/gf Package cherryUtils file from https://github.com/gogf/gf Package cherryUtils file from https://github.com/gogf/gf
Package cherryUtils file from https://github.com/gogf/gf Package cherryUtils file from https://github.com/gogf/gf Package cherryUtils file from https://github.com/gogf/gf
net

Jump to

Keyboard shortcuts

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