mocks

package
v0.0.11-alpha Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Copyright (c) Microsoft Corporation. Licensed under the MIT License.

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) 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) Provide

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

func (*MockRouter) Resolve

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

func (*MockRouter) ResolveWithNegativeCacheCallback

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

ResolveWithNegativeCacheCallback implements Router.

Jump to

Keyboard shortcuts

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