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

Method GetNode

src/api/node/node.go:162–170  ·  view source on GitHub ↗
(ctx context.Context, id string)

Source from the content-addressed store, hash-verified

160}
161
162func (s *nodeService) GetNode(ctx context.Context, id string) (*Node, error) {
163 s.mu.RLock()
164 defer s.mu.RUnlock()
165 node, ok := s.nodes[id]
166 if !ok {
167 return nil, errors.NewNotFoundError("node not found")
168 }
169 return node, nil
170}
171
172func (s *nodeService) CreateNode(ctx context.Context, node *Node) error {
173 s.mu.Lock()

Callers 1

ServeHTTPMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected