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

Function NewNode

src/api/node/node.go:31–40  ·  view source on GitHub ↗

NewNode creates a new node

(id, name, ipAddress string, port int)

Source from the content-addressed store, hash-verified

29
30// NewNode creates a new node
31func NewNode(id, name, ipAddress string, port int) *Node {
32 return &Node{
33 ID: id,
34 Name: name,
35 IPAddress: ipAddress,
36 Port: port,
37 CreatedAt: time.Now(),
38 UpdatedAt: time.Now(),
39 }
40}
41
42// GetID returns the node's ID
43func (n *Node) GetID() string {

Callers 1

TestNodeServiceFunction · 0.70

Calls

no outgoing calls

Tested by 1

TestNodeServiceFunction · 0.56