tailnettest

package
v2.18.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2024 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Overview

Package tailnettest is a generated GoMock package.

Package tailnettest is a generated GoMock package.

Package tailnettest is a generated GoMock package.

Package tailnettest is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DERPIsEmbedded added in v2.9.0

func DERPIsEmbedded(cfg *derpAndSTUNCfg)

func DisableSTUN added in v2.9.0

func DisableSTUN(cfg *derpAndSTUNCfg)

func RunDERPAndSTUN

func RunDERPAndSTUN(t *testing.T, opts ...DERPAndStunOption) (*tailcfg.DERPMap, *derp.Server)

RunDERPAndSTUN creates a DERP mapping for tests.

func RunDERPOnlyWebSockets

func RunDERPOnlyWebSockets(t *testing.T) *tailcfg.DERPMap

RunDERPOnlyWebSockets creates a DERP mapping for tests that only allows WebSockets through it. Many proxies do not support upgrading DERP, so this is a good fallback.

Types

type DERPAndStunOption added in v2.9.0

type DERPAndStunOption func(cfg *derpAndSTUNCfg)

type FakeCoordinate added in v2.8.0

type FakeCoordinate struct {
	Ctx   context.Context
	ID    uuid.UUID
	Name  string
	Auth  tailnet.CoordinateeAuth
	Reqs  chan *proto.CoordinateRequest
	Resps chan *proto.CoordinateResponse
}

type FakeCoordinator added in v2.8.0

type FakeCoordinator struct {
	CoordinateCalls chan *FakeCoordinate
}

func NewFakeCoordinator added in v2.8.0

func NewFakeCoordinator() *FakeCoordinator

func (*FakeCoordinator) Close added in v2.8.0

func (*FakeCoordinator) Close() error

func (*FakeCoordinator) Coordinate added in v2.8.0

func (*FakeCoordinator) Node added in v2.8.0

func (*FakeCoordinator) ServeHTTPDebug added in v2.8.0

func (*FakeCoordinator) ServeHTTPDebug(http.ResponseWriter, *http.Request)

type FakeServeClient added in v2.8.0

type FakeServeClient struct {
	Conn  net.Conn
	ID    uuid.UUID
	Agent uuid.UUID
	ErrCh chan error
}

type MockCoordinatee added in v2.8.0

type MockCoordinatee struct {
	// contains filtered or unexported fields
}

MockCoordinatee is a mock of Coordinatee interface.

func NewMockCoordinatee added in v2.8.0

func NewMockCoordinatee(ctrl *gomock.Controller) *MockCoordinatee

NewMockCoordinatee creates a new mock instance.

func (*MockCoordinatee) EXPECT added in v2.8.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockCoordinatee) SetAllPeersLost added in v2.8.0

func (m *MockCoordinatee) SetAllPeersLost()

SetAllPeersLost mocks base method.

func (*MockCoordinatee) SetNodeCallback added in v2.8.0

func (m *MockCoordinatee) SetNodeCallback(arg0 func(*tailnet.Node))

SetNodeCallback mocks base method.

func (*MockCoordinatee) SetTunnelDestination added in v2.11.0

func (m *MockCoordinatee) SetTunnelDestination(arg0 uuid.UUID)

SetTunnelDestination mocks base method.

func (*MockCoordinatee) UpdatePeers added in v2.8.0

func (m *MockCoordinatee) UpdatePeers(arg0 []*proto.CoordinateResponse_PeerUpdate) error

UpdatePeers mocks base method.

type MockCoordinateeMockRecorder added in v2.8.0

type MockCoordinateeMockRecorder struct {
	// contains filtered or unexported fields
}

MockCoordinateeMockRecorder is the mock recorder for MockCoordinatee.

func (*MockCoordinateeMockRecorder) SetAllPeersLost added in v2.8.0

func (mr *MockCoordinateeMockRecorder) SetAllPeersLost() *gomock.Call

SetAllPeersLost indicates an expected call of SetAllPeersLost.

func (*MockCoordinateeMockRecorder) SetNodeCallback added in v2.8.0

func (mr *MockCoordinateeMockRecorder) SetNodeCallback(arg0 any) *gomock.Call

SetNodeCallback indicates an expected call of SetNodeCallback.

func (*MockCoordinateeMockRecorder) SetTunnelDestination added in v2.11.0

func (mr *MockCoordinateeMockRecorder) SetTunnelDestination(arg0 any) *gomock.Call

SetTunnelDestination indicates an expected call of SetTunnelDestination.

func (*MockCoordinateeMockRecorder) UpdatePeers added in v2.8.0

func (mr *MockCoordinateeMockRecorder) UpdatePeers(arg0 any) *gomock.Call

UpdatePeers indicates an expected call of UpdatePeers.

type MockCoordinator added in v2.7.1

type MockCoordinator struct {
	// contains filtered or unexported fields
}

MockCoordinator is a mock of Coordinator interface.

func NewMockCoordinator added in v2.7.1

func NewMockCoordinator(ctrl *gomock.Controller) *MockCoordinator

NewMockCoordinator creates a new mock instance.

func (*MockCoordinator) Close added in v2.7.1

func (m *MockCoordinator) Close() error

Close mocks base method.

func (*MockCoordinator) Coordinate added in v2.7.1

func (m *MockCoordinator) Coordinate(arg0 context.Context, arg1 uuid.UUID, arg2 string, arg3 tailnet.CoordinateeAuth) (chan<- *proto.CoordinateRequest, <-chan *proto.CoordinateResponse)

Coordinate mocks base method.

func (*MockCoordinator) EXPECT added in v2.7.1

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockCoordinator) Node added in v2.7.1

func (m *MockCoordinator) Node(arg0 uuid.UUID) *tailnet.Node

Node mocks base method.

func (*MockCoordinator) ServeHTTPDebug added in v2.7.1

func (m *MockCoordinator) ServeHTTPDebug(arg0 http.ResponseWriter, arg1 *http.Request)

ServeHTTPDebug mocks base method.

type MockCoordinatorMockRecorder added in v2.7.1

type MockCoordinatorMockRecorder struct {
	// contains filtered or unexported fields
}

MockCoordinatorMockRecorder is the mock recorder for MockCoordinator.

func (*MockCoordinatorMockRecorder) Close added in v2.7.1

Close indicates an expected call of Close.

func (*MockCoordinatorMockRecorder) Coordinate added in v2.7.1

func (mr *MockCoordinatorMockRecorder) Coordinate(arg0, arg1, arg2, arg3 any) *gomock.Call

Coordinate indicates an expected call of Coordinate.

func (*MockCoordinatorMockRecorder) Node added in v2.7.1

func (mr *MockCoordinatorMockRecorder) Node(arg0 any) *gomock.Call

Node indicates an expected call of Node.

func (*MockCoordinatorMockRecorder) ServeHTTPDebug added in v2.7.1

func (mr *MockCoordinatorMockRecorder) ServeHTTPDebug(arg0, arg1 any) *gomock.Call

ServeHTTPDebug indicates an expected call of ServeHTTPDebug.

type MockSubscription added in v2.18.0

type MockSubscription struct {
	// contains filtered or unexported fields
}

MockSubscription is a mock of Subscription interface.

func NewMockSubscription added in v2.18.0

func NewMockSubscription(ctrl *gomock.Controller) *MockSubscription

NewMockSubscription creates a new mock instance.

func (*MockSubscription) Close added in v2.18.0

func (m *MockSubscription) Close() error

Close mocks base method.

func (*MockSubscription) EXPECT added in v2.18.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockSubscription) Updates added in v2.18.0

func (m *MockSubscription) Updates() <-chan *proto.WorkspaceUpdate

Updates mocks base method.

type MockSubscriptionMockRecorder added in v2.18.0

type MockSubscriptionMockRecorder struct {
	// contains filtered or unexported fields
}

MockSubscriptionMockRecorder is the mock recorder for MockSubscription.

func (*MockSubscriptionMockRecorder) Close added in v2.18.0

Close indicates an expected call of Close.

func (*MockSubscriptionMockRecorder) Updates added in v2.18.0

func (mr *MockSubscriptionMockRecorder) Updates() *gomock.Call

Updates indicates an expected call of Updates.

type MockWorkspaceUpdatesProvider added in v2.18.0

type MockWorkspaceUpdatesProvider struct {
	// contains filtered or unexported fields
}

MockWorkspaceUpdatesProvider is a mock of WorkspaceUpdatesProvider interface.

func NewMockWorkspaceUpdatesProvider added in v2.18.0

func NewMockWorkspaceUpdatesProvider(ctrl *gomock.Controller) *MockWorkspaceUpdatesProvider

NewMockWorkspaceUpdatesProvider creates a new mock instance.

func (*MockWorkspaceUpdatesProvider) Close added in v2.18.0

Close mocks base method.

func (*MockWorkspaceUpdatesProvider) EXPECT added in v2.18.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockWorkspaceUpdatesProvider) Subscribe added in v2.18.0

Subscribe mocks base method.

type MockWorkspaceUpdatesProviderMockRecorder added in v2.18.0

type MockWorkspaceUpdatesProviderMockRecorder struct {
	// contains filtered or unexported fields
}

MockWorkspaceUpdatesProviderMockRecorder is the mock recorder for MockWorkspaceUpdatesProvider.

func (*MockWorkspaceUpdatesProviderMockRecorder) Close added in v2.18.0

Close indicates an expected call of Close.

func (*MockWorkspaceUpdatesProviderMockRecorder) Subscribe added in v2.18.0

func (mr *MockWorkspaceUpdatesProviderMockRecorder) Subscribe(arg0, arg1 any) *gomock.Call

Subscribe indicates an expected call of Subscribe.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL