cherryCluster

package
v1.1.23 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2022 License: MIT Imports: 18 Imported by: 7

Documentation

Index

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

func GetLocalNodeSubject(nodeType string, nodeId string) string

GetLocalNodeSubject local packet nats chan

func GetRemoteNodeSubject added in v1.1.20

func GetRemoteNodeSubject(nodeType string, nodeId string) string

GetRemoteNodeSubject remote packet nats chan

Types

type Component added in v1.1.1

type Component struct {
	facade.Component
	// contains filtered or unexported fields
}

func NewComponent added in v1.1.5

func NewComponent() *Component

func (*Component) Client added in v1.1.17

func (c *Component) Client() facade.RPCClient

func (*Component) ForwardLocal added in v1.1.17

func (c *Component) ForwardLocal(session *cherrySession.Session, msg *cherryMessage.Message)

ForwardLocal forward message to backend node

func (*Component) Init added in v1.1.5

func (c *Component) Init()

func (*Component) Name added in v1.1.5

func (c *Component) Name() string

func (*Component) OnStop added in v1.1.5

func (c *Component) OnStop()

func (*Component) Server added in v1.1.17

func (c *Component) Server() facade.RPCServer

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 (*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 (*NatsRPCServer) OnStop added in v1.1.17

func (n *NatsRPCServer) OnStop()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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