cherry

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: MIT Imports: 14 Imported by: 0

README

SuperServer

介绍

通用服务器框架

软件架构

软件架构说明

安装教程
  1. xxxx
  2. xxxx
  3. xxxx
使用说明
  1. xxxx
  2. xxxx
  3. xxxx
参与贡献
  1. Fork 本仓库
  2. 新建 Feat_xxx 分支
  3. 提交代码
  4. 新建 Pull Request
特技
  1. 使用 Readme_XXX.md 来支持不同的语言,例如 Readme_en.md, Readme_zh.md
  2. Gitee 官方博客 blog.gitee.com
  3. 你可以 https://gitee.com/explore 这个地址来了解 Gitee 上的优秀开源项目
  4. GVP 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
  5. Gitee 官方提供的使用手册 https://gitee.com/help
  6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 https://gitee.com/gitee-stars/

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppBuilder

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

func Configure

func Configure(profileFilePath, nodeId string, isFrontend bool, mode NodeMode) *AppBuilder

func ConfigureNode

func ConfigureNode(node cfacade.INode, isFrontend bool, mode NodeMode) *AppBuilder

func (*AppBuilder) AddActors

func (p *AppBuilder) AddActors(actors ...cfacade.IActorHandler)

func (*AppBuilder) NetParser

func (p *AppBuilder) NetParser() cfacade.INetParser

func (*AppBuilder) Register

func (p *AppBuilder) Register(component ...cfacade.IComponent)

func (*AppBuilder) SetNetParser

func (p *AppBuilder) SetNetParser(parser cfacade.INetParser)

func (*AppBuilder) Startup

func (p *AppBuilder) Startup()

type Application

type Application struct {
	cfacade.INode
	// contains filtered or unexported fields
}

func NewApp

func NewApp(profileFilePath, nodeId string, isFrontend bool, mode NodeMode) *Application

NewApp create new application instance

func NewAppNode

func NewAppNode(node cfacade.INode, isFrontend bool, mode NodeMode) *Application

func (*Application) ActorSystem

func (a *Application) ActorSystem() cfacade.IActorSystem

func (*Application) All

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

func (*Application) Cluster

func (a *Application) Cluster() cfacade.ICluster

func (*Application) DieChan

func (a *Application) DieChan() chan bool

func (*Application) Discovery

func (a *Application) Discovery() cfacade.IDiscovery

func (*Application) Find

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

func (*Application) IsFrontend

func (a *Application) IsFrontend() bool

func (*Application) NodeMode

func (a *Application) NodeMode() NodeMode

func (*Application) OnShutdown

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

func (*Application) Register

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

func (*Application) Remove

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

Remove component by name

func (*Application) Running

func (a *Application) Running() bool

func (*Application) Serializer

func (a *Application) Serializer() cfacade.ISerializer

func (*Application) SetCluster

func (a *Application) SetCluster(cluster cfacade.ICluster)

func (*Application) SetDiscovery

func (a *Application) SetDiscovery(discovery cfacade.IDiscovery)

func (*Application) SetNetParser

func (a *Application) SetNetParser(netParser cfacade.INetParser)

func (*Application) SetSerializer

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

func (*Application) Shutdown

func (a *Application) Shutdown()

func (*Application) StartTime

func (a *Application) StartTime() string

func (*Application) Startup

func (a *Application) Startup()

Startup load components before startup

type NodeMode

type NodeMode byte
const (
	Cluster    NodeMode = 1 // 集群模式
	Standalone NodeMode = 2 // 单机模式
)

Directories

Path Synopsis
components
gin Module
extend
base58
Package cherryBase58 file from https://github.com/akamensky/base58/blob/master/base58.go
Package cherryBase58 file from https://github.com/akamensky/base58/blob/master/base58.go
gob
map
Package cherryMap file from https://github.com/gogf/gf
Package cherryMap file from https://github.com/gogf/gf
mapstructure
Package cherryMapStructure exposes functionality to convert one arbitrary Go type into another, typically to convert a map[string]interface{} into a native Go structure.
Package cherryMapStructure exposes functionality to convert one arbitrary Go type into another, typically to convert a map[string]interface{} into a native Go structure.
net
queue
Package cherryQueue provides an efficient implementation of a multi-producer, single-consumer lock-free queue.
Package cherryQueue provides an efficient implementation of a multi-producer, single-consumer lock-free queue.
regex
Package cherryRegex file from https://github.com/gogf/gf
Package cherryRegex file from https://github.com/gogf/gf
slice
Package cherrySlice code from: https://github.com/beego/beego/blob/develop/core/utils/slice.go
Package cherrySlice code from: https://github.com/beego/beego/blob/develop/core/utils/slice.go
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.
sync
Package cherrySync cherrySync file from https://github.com/beego/beego/blob/develop/core/utils/safemap.go
Package cherrySync cherrySync file from https://github.com/beego/beego/blob/develop/core/utils/safemap.go
time
Package cherryTime code from: https://github.com/golang-module/carbon
Package cherryTime code from: https://github.com/golang-module/carbon
time_wheel
Package cherryTimeWheel file from https://github.com/RussellLuo/timingwheel
Package cherryTimeWheel file from https://github.com/RussellLuo/timingwheel
utils
Package cherryUtils file from https://github.com/gogf/gf
Package cherryUtils file from https://github.com/gogf/gf
rotatelogs
Package rotatelogs is a port of File-RotateLogs from Perl (https://metacpan.org/release/File-RotateLogs), and it allows you to automatically rotate output files when you write to them according to the filename pattern that you can specify.
Package rotatelogs is a port of File-RotateLogs from Perl (https://metacpan.org/release/File-RotateLogs), and it allows you to automatically rotate output files when you write to them according to the filename pattern that you can specify.
net

Jump to

Keyboard shortcuts

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