core

package
v0.0.0-...-35d1bc9 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2018 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Core

Index

Constants

View Source
const (
	S_NODEENGINE = "NodeEngine"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IConfig

type IConfig interface {
	SetNodeNameList(s []interface{})
	Export() interface{}
	Import(i interface{})
}

type NodeEngine

type NodeEngine struct {
	Self   nodes.NodeRpc
	Pool   rpc.ConnectionPool
	Config IConfig
	// contains filtered or unexported fields
}

func CreateNodeEngine

func CreateNodeEngine(name, group string, config IConfig) *NodeEngine

func (*NodeEngine) Handle

func (ne *NodeEngine) Handle(clientAddr string, request interface{}) (response interface{})

func (*NodeEngine) Init

func (ne *NodeEngine) Init()

func (*NodeEngine) OnEnter

func (ne *NodeEngine) OnEnter(n string)

func (*NodeEngine) OnLeave

func (ne *NodeEngine) OnLeave(n string)

func (*NodeEngine) State

func (ne *NodeEngine) State() State

type State

type State uint
const (
	ALONE State = iota
	MASTER
	SLAVE
)

func (State) String

func (s State) String() string

Jump to

Keyboard shortcuts

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