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)
| 79 | |
| 80 | // NewClient is a wrapper around NewPeer, creating a peer with Client auth tied to the provided agentID |
| 81 | func 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 | |
| 87 | func (p *Peer) ConnectToCoordinator(ctx context.Context, c tailnet.CoordinatorV2) { |
| 88 | p.t.Helper() |