nodenetwork

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2018 License: Apache-2.0 Imports: 3 Imported by: 26

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	// contains filtered or unexported fields
}

Node is an essence which provides communication between network level and MessageRouter.

func NewNode

func NewNode(nodeID, hostID string, domainID core.RecordRef) *Node

NewNode creates a node with given args.

func (Node) GetNodeID

func (node Node) GetNodeID() string

GetNodeID returns a Node ID.

func (Node) GetNodeRole

func (node Node) GetNodeRole() string

GetNodeRole returns a Node role.

func (Node) GetReference

func (node Node) GetReference() core.RecordRef

GetReference returns a Node domain ID.

type Nodenetwork

type Nodenetwork struct {
	// contains filtered or unexported fields
}

Nodenetwork is nodes manager.

func NewNodeNetwork

func NewNodeNetwork(nodeCfg configuration.NodeNetwork) *Nodenetwork

NewNodeNetwork creates a new nodenetwork.

func (*Nodenetwork) AddNode

func (network *Nodenetwork) AddNode(nodeID, hostID, domainID string) error

AddNode adds a new node to nodes map.

func (*Nodenetwork) GetReferenceHostID

func (network *Nodenetwork) GetReferenceHostID(ref string) (string, error)

GetReferenceHostID returns a host found by reference.

Jump to

Keyboard shortcuts

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