MCPcopy Create free account
hub / github.com/KOSASIH/skybridge / NewNode

Function NewNode

src/node/node.go:18–23  ·  view source on GitHub ↗

NewNode returns a new Node instance

(id string)

Source from the content-addressed store, hash-verified

16
17// NewNode returns a new Node instance
18func NewNode(id string) *Node {
19 return &Node{
20 id: id,
21 neighbors: make([]*Node, 0),
22 }
23}
24
25// AddNeighbor adds a neighbor to the node
26func (n *Node) AddNeighbor(neighbor *Node) {

Callers 1

TestNodeFunction · 0.70

Calls

no outgoing calls

Tested by 1

TestNodeFunction · 0.56