Versions in this module Expand all Collapse all v1 v1.0.0 Feb 3, 2021 Changes in this version + type AppContext struct + func (b *AppContext) App() IApplication + func (b *AppContext) Set(ctx IApplication) + type BaseComponent struct + func (*BaseComponent) AfterInit() + func (*BaseComponent) BeforeStop() + func (*BaseComponent) Init() + func (*BaseComponent) Name() string + func (*BaseComponent) Stop() + type EventFn func(e IEvent) + type FrontendId = string + type IAppContext interface + App func() IApplication + Set func(ctx IApplication) + type IApplication interface + All func() []IComponent + Find func(name string) IComponent + NodeId func() string + NodeType func() string + Remove func(name string) IComponent + Running func() bool + Shutdown func(beforeStopHook ...func()) + Startup func(components ...IComponent) + ThisNode func() INode + type IComponent interface + AfterInit func() + BeforeStop func() + Init func() + Name func() string + Stop func() + type IConnectListener func(conn net.Conn) + type IConnector interface + OnConnect func(listener IConnectListener) + Start func() + Stop func() + type IEvent interface + EventName func() string + UniqueId func() string + type IHandler interface + AfterInit func() + GetEvent func(name string) ([]EventFn, bool) + GetEvents func() map[string][]EventFn + GetLocal func(funcName string) (*InvokeFn, bool) + GetLocals func() map[string]*InvokeFn + GetRemote func(funcName string) (*InvokeFn, bool) + GetRemotes func() map[string]*InvokeFn + Init func() + Name func() string + PreInit func() + PutMessage func(message interface{}) + SetName func(name string) + Stop func() + type INetworkEntity interface + Close func() error + LastMid func() uint64 + Push func(route string, data interface{}) error + RPC func(route string, data interface{}) error + RemoteAddr func() net.Addr + Response func(data interface{}) error + ResponseMid func(mid uint64, data interface{}) error + type INode interface + Address func() string + Enabled func() bool + NodeId func() string + NodeType func() string + RpcAddress func() string + Settings func() jsoniter.Any + type IRoute interface + HandlerName func() string + Method func() string + NodeType func() string + type ISerializer interface + Marshal func(interface{}) ([]byte, error) + Name func() string + Unmarshal func([]byte, interface{}) error + type ISession interface + Closed func() + Conn func() net.Conn + Contains func(key string) bool + Data func() map[string]interface{} + FrontendId func() FrontendId + OnClose func(listener SessionListener) + OnError func(listener SessionListener) + OnMessage func(listener MessageListener) + Remove func(key string) + SID func() SID + Send func(msg []byte) error + SendBatch func(batchMsg ...[]byte) + Set func(key string, value interface{}) + SetStatus func(status int) + Status func() int + UID func() UID + type InvokeFn struct + InArgs []reflect.Type + OutArgs []reflect.Type + Type reflect.Type + Value reflect.Value + type MessageListener func(bytes []byte) error + type Packet struct + Data []byte + Length int + Type byte + func New() *Packet + func (p *Packet) String() string + type PacketDecoder interface + Decode func(data []byte) ([]*Packet, error) + type PacketEncoder interface + Encode func(typ byte, buf []byte) ([]byte, error) + type RouteFunc func(session ISession, msg RpcMessage, nodeInfo []RpcNodeInfo) + type RouteFunction func(session ISession, packet interface{}, ctx IApplication) error + type RpcFilter struct + After RpcFilterFunc + Before RpcFilterFunc + Name string + type RpcFilterFunc func(nodeId string, msg interface{}) + type RpcMessage struct + type RpcNodeInfo interface + Address func() string + Id func() string + NodeType func() string + Weight func() int + type SID = int64 + type SessionListener func(session ISession) + type UID = int64