MCPcopy Index your code
hub / github.com/coder/coder / UpdateNode

Method UpdateNode

tailnet/test/peer.go:122–138  ·  view source on GitHub ↗
(node *proto.Node)

Source from the content-addressed store, hash-verified

120}
121
122func (p *Peer) UpdateNode(node *proto.Node) {
123 p.t.Helper()
124 nk, err := p.nodeKey.MarshalBinary()
125 assert.NoError(p.t, err)
126 node.Key = nk
127 dk, err := p.discoKey.MarshalText()
128 assert.NoError(p.t, err)
129 node.Disco = string(dk)
130 req := &proto.CoordinateRequest{UpdateSelf: &proto.CoordinateRequest_UpdateSelf{Node: node}}
131 select {
132 case <-p.ctx.Done():
133 p.t.Errorf("timeout updating node for %s", p.name)
134 return
135 case p.reqs <- req:
136 return
137 }
138}
139
140func (p *Peer) ReadyForHandshake(peer uuid.UUID) {
141 p.t.Helper()

Calls 4

MarshalTextMethod · 0.80
HelperMethod · 0.65
DoneMethod · 0.45
ErrorfMethod · 0.45