Documentation ¶
Index ¶
- Constants
- func GetLocalNodeSubject(nodeType string, nodeId string) string
- func GetRemoteNodeSubject(nodeType string, nodeId string) string
- type Component
- type NatsRPCClient
- func (n *NatsRPCClient) CallLocal(nodeId string, packet *cherryProto.LocalPacket) error
- func (n *NatsRPCClient) CallRemote(nodeId string, route string, val interface{}, timeout time.Duration, ...)
- func (n *NatsRPCClient) CallRemoteAsync(nodeId string, route string, val interface{})
- func (n *NatsRPCClient) Init(app cherryFacade.IApplication)
- func (n *NatsRPCClient) OnStop()
- func (n *NatsRPCClient) Publish(subject string, val interface{}) error
- func (n *NatsRPCClient) SendKick(nodeId string, uid cherryFacade.UID, reason interface{})
- func (n *NatsRPCClient) SendPush(nodeId string, route string, uid cherryFacade.UID, val interface{})
- type NatsRPCServer
Constants ¶
View Source
const ( PushRoute = "sys.sessionHandler.push" KickRoute = "sys.sessionHandler.kick" )
Variables ¶
This section is empty.
Functions ¶
func GetLocalNodeSubject ¶ added in v1.1.20
GetLocalNodeSubject local packet nats chan
func GetRemoteNodeSubject ¶ added in v1.1.20
GetRemoteNodeSubject remote packet nats chan
Types ¶
type Component ¶ added in v1.1.1
func NewComponent ¶ added in v1.1.5
func NewComponent() *Component
func (*Component) ForwardLocal ¶ added in v1.1.17
func (c *Component) ForwardLocal(session *cherrySession.Session, msg *cherryMessage.Message)
ForwardLocal forward message to backend node
type NatsRPCClient ¶ added in v1.1.17
type NatsRPCClient struct {
cherryFacade.IApplication
}
func NewRPCClient ¶ added in v1.1.22
func NewRPCClient() *NatsRPCClient
func (*NatsRPCClient) CallLocal ¶ added in v1.1.17
func (n *NatsRPCClient) CallLocal(nodeId string, packet *cherryProto.LocalPacket) error
func (*NatsRPCClient) CallRemote ¶ added in v1.1.17
func (n *NatsRPCClient) CallRemote(nodeId string, route string, val interface{}, timeout time.Duration, rsp *cherryProto.Response)
func (*NatsRPCClient) CallRemoteAsync ¶ added in v1.1.20
func (n *NatsRPCClient) CallRemoteAsync(nodeId string, route string, val interface{})
func (*NatsRPCClient) Init ¶ added in v1.1.17
func (n *NatsRPCClient) Init(app cherryFacade.IApplication)
func (*NatsRPCClient) OnStop ¶ added in v1.1.17
func (n *NatsRPCClient) OnStop()
func (*NatsRPCClient) Publish ¶ added in v1.1.20
func (n *NatsRPCClient) Publish(subject string, val interface{}) error
func (*NatsRPCClient) SendKick ¶ added in v1.1.17
func (n *NatsRPCClient) SendKick(nodeId string, uid cherryFacade.UID, reason interface{})
func (*NatsRPCClient) SendPush ¶ added in v1.1.17
func (n *NatsRPCClient) SendPush(nodeId string, route string, uid cherryFacade.UID, val interface{})
type NatsRPCServer ¶ added in v1.1.17
type NatsRPCServer struct { cherryFacade.IApplication // contains filtered or unexported fields }
func NewRPCServer ¶ added in v1.1.22
func NewRPCServer(rpcClient cherryFacade.RPCClient) *NatsRPCServer
func (*NatsRPCServer) Init ¶ added in v1.1.17
func (n *NatsRPCServer) Init(app cherryFacade.IApplication)
func (*NatsRPCServer) OnStop ¶ added in v1.1.17
func (n *NatsRPCServer) OnStop()
Click to show internal directories.
Click to hide internal directories.