cherry

package module
v0.0.0-...-3ced3f3 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2020 License: MIT Imports: 12 Imported by: 0

README

cherry

cherry game server engine for golang

TODO

基础
  • 多环境profile配置
日志
  • 多文件配置输出
  • 过滤配置
  • LEVEL定义
  • 滚动日志
消息路由
  • 包结构
  • 包解码编码
  • 消息路由
  • 消息序列化
  • 事件
  • 定时器
网络
  • tcp
  • websocket
  • kcp
数据配表
  • 本地加载配表
  • redis加载配表
  • 热更新配表
  • 类型检测
  • 条件查询
集群
  • 配置方式加载结点
  • etcd方式加载&更新结点
  • rpc
自带组件
  • mysql db队列

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	// contains filtered or unexported fields
}

Application

func CreateApp

func CreateApp(configPath, profile, nodeId string) *Application

func New

func New(configPath, profileName, nodeId string) *Application

New create new application instance

func (*Application) All

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

func (*Application) Find

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

func (*Application) Handlers

func (a *Application) Handlers() *handler.Component

func (*Application) LoadConnector

func (a *Application) LoadConnector(_ interfaces.IComponent)

func (*Application) NodeId

func (a *Application) NodeId() string

func (*Application) NodeRoute

func (*Application) NodeRoute(nodeType string, routeFunc interfaces.RouteFunction)

NodeRoute 结点路由规则 nodeType:结点类型,routeFunc 路由规则

func (*Application) NodeType

func (a *Application) NodeType() string

func (*Application) OnShutdown

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

func (*Application) PostEvent

func (a *Application) PostEvent(e interfaces.IEvent)

PostEvent

func (*Application) Register

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

func (*Application) Remove

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

Remove remove component by name

func (*Application) RpcFilter

func (*Application) RpcFilter() interfaces.RpcFilter

RpcFilter rpc全局过滤器

func (*Application) Startup

func (a *Application) Startup(startupFunc ...func())

Startup

func (*Application) ThisNode

func (a *Application) ThisNode() interfaces.INode

Jump to

Keyboard shortcuts

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