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

Method Update

src/api/node/node.go:85–93  ·  view source on GitHub ↗

Update updates the node's information

(name, ipAddress string, port int)

Source from the content-addressed store, hash-verified

83
84// Update updates the node's information
85func (n *Node) Update(name, ipAddress string, port int) error {
86 n.mu.Lock()
87 defer n.mu.Unlock()
88 n.Name = name
89 n.IPAddress = ipAddress
90 n.Port = port
91 n.UpdatedAt = time.Now()
92 return nil
93}
94
95// MarshalJSON marshals the node to JSON
96func (n *Node) MarshalJSON() ([]byte, error) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected