Documentation ¶
Overview ¶
Package tailnettest is a generated GoMock package.
Package tailnettest is a generated GoMock package.
Package tailnettest is a generated GoMock package.
Index ¶
- func DERPIsEmbedded(cfg *derpAndSTUNCfg)
- func DisableSTUN(cfg *derpAndSTUNCfg)
- func RunDERPAndSTUN(t *testing.T, opts ...DERPAndStunOption) (*tailcfg.DERPMap, *derp.Server)
- func RunDERPOnlyWebSockets(t *testing.T) *tailcfg.DERPMap
- type DERPAndStunOption
- type FakeCoordinate
- type FakeCoordinator
- func (*FakeCoordinator) Close() error
- func (f *FakeCoordinator) Coordinate(ctx context.Context, id uuid.UUID, name string, a tailnet.CoordinateeAuth) (chan<- *proto.CoordinateRequest, <-chan *proto.CoordinateResponse)
- func (*FakeCoordinator) Node(uuid.UUID) *tailnet.Node
- func (*FakeCoordinator) ServeHTTPDebug(http.ResponseWriter, *http.Request)
- func (*FakeCoordinator) ServeMultiAgent(uuid.UUID) tailnet.MultiAgentConn
- type FakeServeClient
- type MockCoordinatee
- func (m *MockCoordinatee) EXPECT() *MockCoordinateeMockRecorder
- func (m *MockCoordinatee) SetAllPeersLost()
- func (m *MockCoordinatee) SetNodeCallback(arg0 func(*tailnet.Node))
- func (m *MockCoordinatee) SetTunnelDestination(arg0 uuid.UUID)
- func (m *MockCoordinatee) UpdatePeers(arg0 []*proto.CoordinateResponse_PeerUpdate) error
- type MockCoordinateeMockRecorder
- func (mr *MockCoordinateeMockRecorder) SetAllPeersLost() *gomock.Call
- func (mr *MockCoordinateeMockRecorder) SetNodeCallback(arg0 any) *gomock.Call
- func (mr *MockCoordinateeMockRecorder) SetTunnelDestination(arg0 any) *gomock.Call
- func (mr *MockCoordinateeMockRecorder) UpdatePeers(arg0 any) *gomock.Call
- type MockCoordinator
- func (m *MockCoordinator) Close() error
- func (m *MockCoordinator) Coordinate(arg0 context.Context, arg1 uuid.UUID, arg2 string, ...) (chan<- *proto.CoordinateRequest, <-chan *proto.CoordinateResponse)
- func (m *MockCoordinator) EXPECT() *MockCoordinatorMockRecorder
- func (m *MockCoordinator) Node(arg0 uuid.UUID) *tailnet.Node
- func (m *MockCoordinator) ServeHTTPDebug(arg0 http.ResponseWriter, arg1 *http.Request)
- func (m *MockCoordinator) ServeMultiAgent(arg0 uuid.UUID) tailnet.MultiAgentConn
- type MockCoordinatorMockRecorder
- func (mr *MockCoordinatorMockRecorder) Close() *gomock.Call
- func (mr *MockCoordinatorMockRecorder) Coordinate(arg0, arg1, arg2, arg3 any) *gomock.Call
- func (mr *MockCoordinatorMockRecorder) Node(arg0 any) *gomock.Call
- func (mr *MockCoordinatorMockRecorder) ServeHTTPDebug(arg0, arg1 any) *gomock.Call
- func (mr *MockCoordinatorMockRecorder) ServeMultiAgent(arg0 any) *gomock.Call
- type MockMultiAgentConn
- func (m *MockMultiAgentConn) Close() error
- func (m *MockMultiAgentConn) EXPECT() *MockMultiAgentConnMockRecorder
- func (m *MockMultiAgentConn) IsClosed() bool
- func (m *MockMultiAgentConn) NextUpdate(arg0 context.Context) (*proto.CoordinateResponse, bool)
- func (m *MockMultiAgentConn) SubscribeAgent(arg0 uuid.UUID) error
- func (m *MockMultiAgentConn) UnsubscribeAgent(arg0 uuid.UUID) error
- func (m *MockMultiAgentConn) UpdateSelf(arg0 *proto.Node) error
- type MockMultiAgentConnMockRecorder
- func (mr *MockMultiAgentConnMockRecorder) Close() *gomock.Call
- func (mr *MockMultiAgentConnMockRecorder) IsClosed() *gomock.Call
- func (mr *MockMultiAgentConnMockRecorder) NextUpdate(arg0 any) *gomock.Call
- func (mr *MockMultiAgentConnMockRecorder) SubscribeAgent(arg0 any) *gomock.Call
- func (mr *MockMultiAgentConnMockRecorder) UnsubscribeAgent(arg0 any) *gomock.Call
- func (mr *MockMultiAgentConnMockRecorder) UpdateSelf(arg0 any) *gomock.Call
- type TestMultiAgent
- func (m *TestMultiAgent) Close()
- func (m *TestMultiAgent) RequireEventuallyClosed(ctx context.Context)
- func (m *TestMultiAgent) RequireEventuallyHasDERPs(ctx context.Context, expected ...int)
- func (m *TestMultiAgent) RequireNeverHasDERPs(ctx context.Context, expected ...int)
- func (m *TestMultiAgent) RequireSubscribeAgent(id uuid.UUID)
- func (m *TestMultiAgent) RequireUnsubscribeAgent(id uuid.UUID)
- func (m *TestMultiAgent) SendNodeWithDERP(d int32)
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 ¶
RunDERPAndSTUN creates a DERP mapping for tests.
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 (f *FakeCoordinator) Coordinate(ctx context.Context, id uuid.UUID, name string, a tailnet.CoordinateeAuth) (chan<- *proto.CoordinateRequest, <-chan *proto.CoordinateResponse)
func (*FakeCoordinator) Node ¶ added in v2.8.0
func (*FakeCoordinator) Node(uuid.UUID) *tailnet.Node
func (*FakeCoordinator) ServeHTTPDebug ¶ added in v2.8.0
func (*FakeCoordinator) ServeHTTPDebug(http.ResponseWriter, *http.Request)
func (*FakeCoordinator) ServeMultiAgent ¶ added in v2.8.0
func (*FakeCoordinator) ServeMultiAgent(uuid.UUID) tailnet.MultiAgentConn
type FakeServeClient ¶ added in v2.8.0
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
func (m *MockCoordinatee) EXPECT() *MockCoordinateeMockRecorder
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
func (m *MockCoordinator) EXPECT() *MockCoordinatorMockRecorder
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.
func (*MockCoordinator) ServeMultiAgent ¶ added in v2.7.1
func (m *MockCoordinator) ServeMultiAgent(arg0 uuid.UUID) tailnet.MultiAgentConn
ServeMultiAgent 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
func (mr *MockCoordinatorMockRecorder) Close() *gomock.Call
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.
func (*MockCoordinatorMockRecorder) ServeMultiAgent ¶ added in v2.7.1
func (mr *MockCoordinatorMockRecorder) ServeMultiAgent(arg0 any) *gomock.Call
ServeMultiAgent indicates an expected call of ServeMultiAgent.
type MockMultiAgentConn ¶
type MockMultiAgentConn struct {
// contains filtered or unexported fields
}
MockMultiAgentConn is a mock of MultiAgentConn interface.
func NewMockMultiAgentConn ¶
func NewMockMultiAgentConn(ctrl *gomock.Controller) *MockMultiAgentConn
NewMockMultiAgentConn creates a new mock instance.
func (*MockMultiAgentConn) Close ¶
func (m *MockMultiAgentConn) Close() error
Close mocks base method.
func (*MockMultiAgentConn) EXPECT ¶
func (m *MockMultiAgentConn) EXPECT() *MockMultiAgentConnMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockMultiAgentConn) IsClosed ¶
func (m *MockMultiAgentConn) IsClosed() bool
IsClosed mocks base method.
func (*MockMultiAgentConn) NextUpdate ¶
func (m *MockMultiAgentConn) NextUpdate(arg0 context.Context) (*proto.CoordinateResponse, bool)
NextUpdate mocks base method.
func (*MockMultiAgentConn) SubscribeAgent ¶
func (m *MockMultiAgentConn) SubscribeAgent(arg0 uuid.UUID) error
SubscribeAgent mocks base method.
func (*MockMultiAgentConn) UnsubscribeAgent ¶
func (m *MockMultiAgentConn) UnsubscribeAgent(arg0 uuid.UUID) error
UnsubscribeAgent mocks base method.
func (*MockMultiAgentConn) UpdateSelf ¶
func (m *MockMultiAgentConn) UpdateSelf(arg0 *proto.Node) error
UpdateSelf mocks base method.
type MockMultiAgentConnMockRecorder ¶
type MockMultiAgentConnMockRecorder struct {
// contains filtered or unexported fields
}
MockMultiAgentConnMockRecorder is the mock recorder for MockMultiAgentConn.
func (*MockMultiAgentConnMockRecorder) Close ¶
func (mr *MockMultiAgentConnMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close.
func (*MockMultiAgentConnMockRecorder) IsClosed ¶
func (mr *MockMultiAgentConnMockRecorder) IsClosed() *gomock.Call
IsClosed indicates an expected call of IsClosed.
func (*MockMultiAgentConnMockRecorder) NextUpdate ¶
func (mr *MockMultiAgentConnMockRecorder) NextUpdate(arg0 any) *gomock.Call
NextUpdate indicates an expected call of NextUpdate.
func (*MockMultiAgentConnMockRecorder) SubscribeAgent ¶
func (mr *MockMultiAgentConnMockRecorder) SubscribeAgent(arg0 any) *gomock.Call
SubscribeAgent indicates an expected call of SubscribeAgent.
func (*MockMultiAgentConnMockRecorder) UnsubscribeAgent ¶
func (mr *MockMultiAgentConnMockRecorder) UnsubscribeAgent(arg0 any) *gomock.Call
UnsubscribeAgent indicates an expected call of UnsubscribeAgent.
func (*MockMultiAgentConnMockRecorder) UpdateSelf ¶
func (mr *MockMultiAgentConnMockRecorder) UpdateSelf(arg0 any) *gomock.Call
UpdateSelf indicates an expected call of UpdateSelf.
type TestMultiAgent ¶ added in v2.8.0
func NewTestMultiAgent ¶ added in v2.8.0
func NewTestMultiAgent(t testing.TB, coord tailnet.Coordinator) *TestMultiAgent
func (*TestMultiAgent) Close ¶ added in v2.8.0
func (m *TestMultiAgent) Close()
func (*TestMultiAgent) RequireEventuallyClosed ¶ added in v2.8.0
func (m *TestMultiAgent) RequireEventuallyClosed(ctx context.Context)
func (*TestMultiAgent) RequireEventuallyHasDERPs ¶ added in v2.8.0
func (m *TestMultiAgent) RequireEventuallyHasDERPs(ctx context.Context, expected ...int)
func (*TestMultiAgent) RequireNeverHasDERPs ¶ added in v2.8.0
func (m *TestMultiAgent) RequireNeverHasDERPs(ctx context.Context, expected ...int)
func (*TestMultiAgent) RequireSubscribeAgent ¶ added in v2.8.0
func (m *TestMultiAgent) RequireSubscribeAgent(id uuid.UUID)
func (*TestMultiAgent) RequireUnsubscribeAgent ¶ added in v2.8.0
func (m *TestMultiAgent) RequireUnsubscribeAgent(id uuid.UUID)
func (*TestMultiAgent) SendNodeWithDERP ¶ added in v2.8.0
func (m *TestMultiAgent) SendNodeWithDERP(d int32)