tests

package
v0.0.0-...-3231407 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockRouter

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

func NewMockRouter

func NewMockRouter(resolver map[string][]string) *MockRouter

func (*MockRouter) Advertise

func (m *MockRouter) Advertise(ctx context.Context, keys []string) error

func (*MockRouter) Close

func (m *MockRouter) Close() error

func (*MockRouter) LookupKey

func (m *MockRouter) LookupKey(key string) ([]string, bool)

func (*MockRouter) Net

func (m *MockRouter) Net() peernet.Network

Net implements routing.Router.

func (*MockRouter) Resolve

func (m *MockRouter) Resolve(ctx context.Context, key string, allowSelf bool, count int) (<-chan routing.PeerInfo, error)

func (*MockRouter) ResolveWithCache

func (m *MockRouter) ResolveWithCache(ctx context.Context, key string, allowSelf bool, count int) (<-chan routing.PeerInfo, func(), error)

ResolveWithCache implements Router.

Jump to

Keyboard shortcuts

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