Documentation
¶
Index ¶
- func AddNodeRouter(nodeType string, routingFunc crouter.RoutingFunc)
- func Configure(profilePath, profileName, nodeId string) cfacade.IApplication
- func GetConnectors() []cfacade.IConnector
- func GetRPC() cfacade.RPCClient
- func Kick(nodeId string, uid cfacade.UID, val interface{}, close bool) error
- func PostEvent(event cfacade.IEvent)
- func PublishRemote(nodeId string, route string, arg interface{})
- func PublishRemoteByRoute(route string, arg interface{})
- func Push(frontendId string, route string, uid cfacade.UID, val interface{}) error
- func RegisterCommand(command ccommand.ICommand)
- func RegisterComponent(component ...cfacade.IComponent)
- func RegisterConnector(connector cfacade.IConnector)
- func RegisterHandler(handler ...cfacade.IHandler)
- func RegisterHandlerGroup(group ...*chandler.HandlerGroup)
- func RequestRemote(nodeId string, route string, arg, reply interface{}, timeout ...time.Duration) int32
- func RequestRemoteByRoute(route string, arg, reply interface{}, timeout ...time.Duration) int32
- func Run(isFrontend bool, nodeMode NodeMode)
- func SetDataCompression(compression bool)
- func SetDictionary(dict map[string]uint16)
- func SetHandlerOptions(opts ...chandler.Option)
- func SetHandshake(key string, value interface{})
- func SetHeartbeat(t time.Duration)
- func SetOnShutdown(fn ...func())
- func SetPacketCodec(codec cfacade.IPacketCodec)
- func SetSerializer(serializer cfacade.ISerializer)
- type Application
- func (a *Application) All() []cfacade.IComponent
- func (a *Application) DieChan() chan bool
- func (a *Application) Find(name string) cfacade.IComponent
- func (a *Application) IsFrontend() bool
- func (a *Application) NodeMode() NodeMode
- func (a *Application) OnShutdown(fn ...func())
- func (a *Application) Register(components ...cfacade.IComponent)
- func (a *Application) Remove(name string) cfacade.IComponent
- func (a *Application) Running() bool
- func (a *Application) SetPacketCodec(codec cfacade.IPacketCodec)
- func (a *Application) SetSerializer(serializer cfacade.ISerializer)
- func (a *Application) Shutdown()
- func (a *Application) StartTime() string
- func (a *Application) Startup(components ...cfacade.IComponent)
- type NodeMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddNodeRouter ¶
func AddNodeRouter(nodeType string, routingFunc crouter.RoutingFunc)
func Configure ¶
func Configure(profilePath, profileName, nodeId string) cfacade.IApplication
func GetConnectors ¶
func GetConnectors() []cfacade.IConnector
func PublishRemote ¶
func PublishRemoteByRoute ¶
func PublishRemoteByRoute(route string, arg interface{})
func RegisterCommand ¶
func RegisterComponent ¶
func RegisterComponent(component ...cfacade.IComponent)
func RegisterConnector ¶
func RegisterConnector(connector cfacade.IConnector)
func RegisterHandler ¶
func RegisterHandlerGroup ¶
func RegisterHandlerGroup(group ...*chandler.HandlerGroup)
func RequestRemote ¶
func RequestRemoteByRoute ¶
func SetDataCompression ¶
func SetDataCompression(compression bool)
func SetDictionary ¶
func SetHandlerOptions ¶
func SetHandshake ¶
func SetHandshake(key string, value interface{})
func SetHeartbeat ¶
func SetOnShutdown ¶
func SetOnShutdown(fn ...func())
func SetPacketCodec ¶
func SetPacketCodec(codec cfacade.IPacketCodec)
func SetSerializer ¶
func SetSerializer(serializer cfacade.ISerializer)
Types ¶
type Application ¶
type Application struct { cfacade.INode cfacade.ISerializer cfacade.IPacketCodec // contains filtered or unexported fields }
func App ¶
func App() *Application
func NewApp ¶
func NewApp(profilePath, profileName, nodeId string) *Application
NewApp create new application instance
func (*Application) All ¶
func (a *Application) All() []cfacade.IComponent
func (*Application) DieChan ¶
func (a *Application) DieChan() chan bool
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 remove component by name
func (*Application) Running ¶
func (a *Application) Running() bool
func (*Application) SetPacketCodec ¶
func (a *Application) SetPacketCodec(codec cfacade.IPacketCodec)
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(components ...cfacade.IComponent)
Startup load components before startup
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 |
map
Package cherryMap file from https://github.com/beego/beego/blob/develop/core/utils/safemap.go
|
Package cherryMap file from https://github.com/beego/beego/blob/develop/core/utils/safemap.go |
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. |
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 |
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
|
|
Click to show internal directories.
Click to hide internal directories.