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

Function NewClient

tailnet/test/peer.go:81–85  ·  view source on GitHub ↗

NewClient is a wrapper around NewPeer, creating a peer with Client auth tied to the provided agentID

(ctx context.Context, t testing.TB, coord tailnet.CoordinatorV2, name string, agentID uuid.UUID)

Source from the content-addressed store, hash-verified

79
80// NewClient is a wrapper around NewPeer, creating a peer with Client auth tied to the provided agentID
81func NewClient(ctx context.Context, t testing.TB, coord tailnet.CoordinatorV2, name string, agentID uuid.UUID) *Peer {
82 p := NewPeer(ctx, t, coord, name, WithAuth(tailnet.ClientCoordinateeAuth{AgentID: agentID}))
83 p.AddTunnel(agentID)
84 return p
85}
86
87func (p *Peer) ConnectToCoordinator(ctx context.Context, c tailnet.CoordinatorV2) {
88 p.t.Helper()

Callers 1

TestCoordinatorFunction · 0.92

Calls 3

AddTunnelMethod · 0.95
NewPeerFunction · 0.85
WithAuthFunction · 0.85

Tested by 1

TestCoordinatorFunction · 0.74