Documentation
¶
Index ¶
- func BidirectionalTunnels(ctx context.Context, t *testing.T, coordinator tailnet.CoordinatorV2)
- func GracefulDisconnectTest(ctx context.Context, t *testing.T, coordinator tailnet.CoordinatorV2)
- func LostTest(ctx context.Context, t *testing.T, coordinator tailnet.CoordinatorV2)
- func ReadyForHandshakeNoPermissionTest(ctx context.Context, t *testing.T, coordinator tailnet.CoordinatorV2)
- func ReadyForHandshakeTest(ctx context.Context, t *testing.T, coordinator tailnet.CoordinatorV2)
- type FakeCoordinateeAuth
- type FakeSubjectKey
- type Peer
- func NewAgent(ctx context.Context, t testing.TB, coord tailnet.CoordinatorV2, name string) *Peer
- func NewClient(ctx context.Context, t testing.TB, coord tailnet.CoordinatorV2, name string, ...) *Peer
- func NewPeer(ctx context.Context, t testing.TB, coord tailnet.CoordinatorV2, name string, ...) *Peer
- func (p *Peer) AddTunnel(other uuid.UUID)
- func (p *Peer) AssertEventuallyDisconnected(other uuid.UUID)
- func (p *Peer) AssertEventuallyGetsError(match string)
- func (p *Peer) AssertEventuallyHasDERP(other uuid.UUID, derp int32)
- func (p *Peer) AssertEventuallyLost(other uuid.UUID)
- func (p *Peer) AssertEventuallyReadyForHandshake(other uuid.UUID)
- func (p *Peer) AssertEventuallyResponsesClosed()
- func (p *Peer) AssertNeverHasDERPs(ctx context.Context, other uuid.UUID, expected ...int32)
- func (p *Peer) AssertNeverUpdateKind(peer uuid.UUID, kind proto.CoordinateResponse_PeerUpdate_Kind)
- func (p *Peer) AssertNotClosed(d time.Duration)
- func (p *Peer) Close(ctx context.Context)
- func (p *Peer) ConnectToCoordinator(ctx context.Context, c tailnet.CoordinatorV2)
- func (p *Peer) Disconnect()
- func (p *Peer) ReadyForHandshake(peer uuid.UUID)
- func (p *Peer) RemoveTunnel(other uuid.UUID)
- func (p *Peer) UngracefulDisconnect(ctx context.Context)
- func (p *Peer) UpdateDERP(derp int32)
- func (p *Peer) UpdateNode(node *proto.Node)
- type PeerOption
- type PeerStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BidirectionalTunnels ¶
func GracefulDisconnectTest ¶
func ReadyForHandshakeNoPermissionTest ¶ added in v2.11.0
func ReadyForHandshakeTest ¶ added in v2.11.0
Types ¶
type FakeCoordinateeAuth ¶ added in v2.18.0
type FakeCoordinateeAuth struct {
Chan chan struct{}
}
func (FakeCoordinateeAuth) Authorize ¶ added in v2.18.0
func (f FakeCoordinateeAuth) Authorize(ctx context.Context, _ *proto.CoordinateRequest) error
type FakeSubjectKey ¶ added in v2.18.0
type FakeSubjectKey struct{}
type Peer ¶
func NewAgent ¶ added in v2.16.0
NewAgent is a wrapper around NewPeer, creating a peer with Agent auth tied to its ID
func NewClient ¶ added in v2.16.0
func NewClient(ctx context.Context, t testing.TB, coord tailnet.CoordinatorV2, name string, agentID uuid.UUID) *Peer
NewClient is a wrapper around NewPeer, creating a peer with Client auth tied to the provided agentID
func NewPeer ¶
func NewPeer(ctx context.Context, t testing.TB, coord tailnet.CoordinatorV2, name string, opts ...PeerOption) *Peer
func (*Peer) AssertEventuallyDisconnected ¶
func (*Peer) AssertEventuallyGetsError ¶ added in v2.11.0
func (*Peer) AssertEventuallyHasDERP ¶
func (*Peer) AssertEventuallyLost ¶
func (*Peer) AssertEventuallyReadyForHandshake ¶ added in v2.11.0
func (*Peer) AssertEventuallyResponsesClosed ¶
func (p *Peer) AssertEventuallyResponsesClosed()
func (*Peer) AssertNeverHasDERPs ¶ added in v2.16.0
func (*Peer) AssertNeverUpdateKind ¶ added in v2.15.0
func (p *Peer) AssertNeverUpdateKind(peer uuid.UUID, kind proto.CoordinateResponse_PeerUpdate_Kind)
AssertNeverUpdateKind asserts that we have not received any updates on the provided peer for the provided kind.
func (*Peer) AssertNotClosed ¶ added in v2.16.0
func (*Peer) ConnectToCoordinator ¶ added in v2.15.0
func (p *Peer) ConnectToCoordinator(ctx context.Context, c tailnet.CoordinatorV2)
func (*Peer) Disconnect ¶
func (p *Peer) Disconnect()
func (*Peer) ReadyForHandshake ¶ added in v2.11.0
func (*Peer) RemoveTunnel ¶ added in v2.18.0
func (*Peer) UngracefulDisconnect ¶ added in v2.16.0
func (*Peer) UpdateDERP ¶
func (*Peer) UpdateNode ¶ added in v2.16.0
type PeerOption ¶ added in v2.16.0
type PeerOption func(*Peer)
func WithAuth ¶ added in v2.16.0
func WithAuth(auth tailnet.CoordinateeAuth) PeerOption
func WithID ¶ added in v2.16.0
func WithID(id uuid.UUID) PeerOption
type PeerStatus ¶
type PeerStatus struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.