network_map

package
v0.60.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2025 License: BSD-3-Clause, AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package network_map is a generated GoMock package.

Index

Constants

View Source
const (
	EnvNewNetworkMapBuilder  = "NB_EXPERIMENT_NETWORK_MAP"
	EnvNewNetworkMapAccounts = "NB_EXPERIMENT_NETWORK_MAP_ACCOUNTS"

	DnsForwarderPort           = nbdns.ForwarderServerPort
	OldForwarderPort           = nbdns.ForwarderClientPort
	DnsForwarderPortMinVersion = "v0.59.0"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller interface {
	UpdateAccountPeers(ctx context.Context, accountID string) error
	UpdateAccountPeer(ctx context.Context, accountId string, peerId string) error
	BufferUpdateAccountPeers(ctx context.Context, accountID string) error
	GetValidatedPeerWithMap(ctx context.Context, isRequiresApproval bool, accountID string, p *nbpeer.Peer) (*nbpeer.Peer, *types.NetworkMap, []*posture.Checks, int64, error)
	GetDNSDomain(settings *types.Settings) string
	StartWarmup(context.Context)
	GetNetworkMap(ctx context.Context, peerID string) (*types.NetworkMap, error)

	DeletePeer(ctx context.Context, accountId string, peerId string) error

	OnPeerUpdated(accountId string, peer *nbpeer.Peer)
	OnPeerAdded(ctx context.Context, accountID string, peerID string) error
	OnPeerDeleted(ctx context.Context, accountID string, peerID string) error
	DisconnectPeers(ctx context.Context, peerIDs []string)
	IsConnected(peerID string) bool
}

type MockController

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

MockController is a mock of Controller interface.

func NewMockController

func NewMockController(ctrl *gomock.Controller) *MockController

NewMockController creates a new mock instance.

func (*MockController) BufferUpdateAccountPeers

func (m *MockController) BufferUpdateAccountPeers(ctx context.Context, accountID string) error

BufferUpdateAccountPeers mocks base method.

func (*MockController) DeletePeer

func (m *MockController) DeletePeer(ctx context.Context, accountId, peerId string) error

DeletePeer mocks base method.

func (*MockController) DisconnectPeers

func (m *MockController) DisconnectPeers(ctx context.Context, peerIDs []string)

DisconnectPeers mocks base method.

func (*MockController) EXPECT

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

func (*MockController) GetDNSDomain

func (m *MockController) GetDNSDomain(settings *types.Settings) string

GetDNSDomain mocks base method.

func (*MockController) GetNetworkMap

func (m *MockController) GetNetworkMap(ctx context.Context, peerID string) (*types.NetworkMap, error)

GetNetworkMap mocks base method.

func (*MockController) GetValidatedPeerWithMap

func (m *MockController) GetValidatedPeerWithMap(ctx context.Context, isRequiresApproval bool, accountID string, p *peer.Peer) (*peer.Peer, *types.NetworkMap, []*posture.Checks, int64, error)

GetValidatedPeerWithMap mocks base method.

func (*MockController) IsConnected

func (m *MockController) IsConnected(peerID string) bool

IsConnected mocks base method.

func (*MockController) OnPeerAdded

func (m *MockController) OnPeerAdded(ctx context.Context, accountID, peerID string) error

OnPeerAdded mocks base method.

func (*MockController) OnPeerDeleted

func (m *MockController) OnPeerDeleted(ctx context.Context, accountID, peerID string) error

OnPeerDeleted mocks base method.

func (*MockController) OnPeerUpdated

func (m *MockController) OnPeerUpdated(accountId string, peer *peer.Peer)

OnPeerUpdated mocks base method.

func (*MockController) StartWarmup

func (m *MockController) StartWarmup(arg0 context.Context)

StartWarmup mocks base method.

func (*MockController) UpdateAccountPeer

func (m *MockController) UpdateAccountPeer(ctx context.Context, accountId, peerId string) error

UpdateAccountPeer mocks base method.

func (*MockController) UpdateAccountPeers

func (m *MockController) UpdateAccountPeers(ctx context.Context, accountID string) error

UpdateAccountPeers mocks base method.

type MockControllerMockRecorder

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

MockControllerMockRecorder is the mock recorder for MockController.

func (*MockControllerMockRecorder) BufferUpdateAccountPeers

func (mr *MockControllerMockRecorder) BufferUpdateAccountPeers(ctx, accountID any) *gomock.Call

BufferUpdateAccountPeers indicates an expected call of BufferUpdateAccountPeers.

func (*MockControllerMockRecorder) DeletePeer

func (mr *MockControllerMockRecorder) DeletePeer(ctx, accountId, peerId any) *gomock.Call

DeletePeer indicates an expected call of DeletePeer.

func (*MockControllerMockRecorder) DisconnectPeers

func (mr *MockControllerMockRecorder) DisconnectPeers(ctx, peerIDs any) *gomock.Call

DisconnectPeers indicates an expected call of DisconnectPeers.

func (*MockControllerMockRecorder) GetDNSDomain

func (mr *MockControllerMockRecorder) GetDNSDomain(settings any) *gomock.Call

GetDNSDomain indicates an expected call of GetDNSDomain.

func (*MockControllerMockRecorder) GetNetworkMap

func (mr *MockControllerMockRecorder) GetNetworkMap(ctx, peerID any) *gomock.Call

GetNetworkMap indicates an expected call of GetNetworkMap.

func (*MockControllerMockRecorder) GetValidatedPeerWithMap

func (mr *MockControllerMockRecorder) GetValidatedPeerWithMap(ctx, isRequiresApproval, accountID, p any) *gomock.Call

GetValidatedPeerWithMap indicates an expected call of GetValidatedPeerWithMap.

func (*MockControllerMockRecorder) IsConnected

func (mr *MockControllerMockRecorder) IsConnected(peerID any) *gomock.Call

IsConnected indicates an expected call of IsConnected.

func (*MockControllerMockRecorder) OnPeerAdded

func (mr *MockControllerMockRecorder) OnPeerAdded(ctx, accountID, peerID any) *gomock.Call

OnPeerAdded indicates an expected call of OnPeerAdded.

func (*MockControllerMockRecorder) OnPeerDeleted

func (mr *MockControllerMockRecorder) OnPeerDeleted(ctx, accountID, peerID any) *gomock.Call

OnPeerDeleted indicates an expected call of OnPeerDeleted.

func (*MockControllerMockRecorder) OnPeerUpdated

func (mr *MockControllerMockRecorder) OnPeerUpdated(accountId, peer any) *gomock.Call

OnPeerUpdated indicates an expected call of OnPeerUpdated.

func (*MockControllerMockRecorder) StartWarmup

func (mr *MockControllerMockRecorder) StartWarmup(arg0 any) *gomock.Call

StartWarmup indicates an expected call of StartWarmup.

func (*MockControllerMockRecorder) UpdateAccountPeer

func (mr *MockControllerMockRecorder) UpdateAccountPeer(ctx, accountId, peerId any) *gomock.Call

UpdateAccountPeer indicates an expected call of UpdateAccountPeer.

func (*MockControllerMockRecorder) UpdateAccountPeers

func (mr *MockControllerMockRecorder) UpdateAccountPeers(ctx, accountID any) *gomock.Call

UpdateAccountPeers indicates an expected call of UpdateAccountPeers.

type PeersUpdateManager

type PeersUpdateManager interface {
	SendUpdate(ctx context.Context, peerID string, update *UpdateMessage)
	CreateChannel(ctx context.Context, peerID string) chan *UpdateMessage
	CloseChannel(ctx context.Context, peerID string)
	CountStreams() int
	HasChannel(peerID string) bool
	CloseChannels(ctx context.Context, peerIDs []string)
	GetAllConnectedPeers() map[string]struct{}
}

type UpdateMessage

type UpdateMessage struct {
	Update *proto.SyncResponse
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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