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

Method AddTunnel

tailnet/test/peer.go:92–102  ·  view source on GitHub ↗
(other uuid.UUID)

Source from the content-addressed store, hash-verified

90}
91
92func (p *Peer) AddTunnel(other uuid.UUID) {
93 p.t.Helper()
94 req := &proto.CoordinateRequest{AddTunnel: &proto.CoordinateRequest_Tunnel{Id: tailnet.UUIDToByteSlice(other)}}
95 select {
96 case <-p.ctx.Done():
97 p.t.Errorf("timeout adding tunnel for %s", p.name)
98 return
99 case p.reqs <- req:
100 return
101 }
102}
103
104func (p *Peer) RemoveTunnel(other uuid.UUID) {
105 p.t.Helper()

Calls 4

UUIDToByteSliceFunction · 0.92
HelperMethod · 0.65
DoneMethod · 0.45
ErrorfMethod · 0.45