cherryCluster

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name = "cluster_component"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component struct {
	cfacade.Component
	cfacade.RPCClient
	cfacade.RPCServer
}

func NewComponent

func NewComponent() *Component

func (*Component) Init

func (c *Component) Init()

func (*Component) Name

func (c *Component) Name() string

func (*Component) OnStop

func (c *Component) OnStop()

type NatsRPCClient

type NatsRPCClient struct {
	cfacade.IApplication
}

func NewRPCClient

func NewRPCClient(app cfacade.IApplication) *NatsRPCClient

func (*NatsRPCClient) OnStop

func (n *NatsRPCClient) OnStop()

func (*NatsRPCClient) Publish

func (n *NatsRPCClient) Publish(subject string, data []byte) error

func (*NatsRPCClient) PublishKick

func (n *NatsRPCClient) PublishKick(nodeId string, kick *cproto.Kick) error

func (*NatsRPCClient) PublishLocal

func (n *NatsRPCClient) PublishLocal(nodeId string, request *cproto.Request) error

func (*NatsRPCClient) PublishPush

func (n *NatsRPCClient) PublishPush(frontendId cfacade.FrontendId, push *cproto.Push) error

func (*NatsRPCClient) PublishRemote

func (n *NatsRPCClient) PublishRemote(nodeId string, request *cproto.Request) error

func (*NatsRPCClient) RequestRemote

func (n *NatsRPCClient) RequestRemote(nodeId string, request *cproto.Request, timeout ...time.Duration) (*cproto.Response, error)

type NatsRPCServer

type NatsRPCServer struct {
	cfacade.IApplication
	// contains filtered or unexported fields
}

func NewNatsRPCServer

func NewNatsRPCServer(app cfacade.IApplication, rpcClient cfacade.RPCClient, bufferSize int) *NatsRPCServer

func (*NatsRPCServer) Init

func (n *NatsRPCServer) Init()

func (*NatsRPCServer) OnStop

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