mock

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 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 MockRouteTable

type MockRouteTable struct {
	RejectAddrList []boson.Address
	NeighborMap    map[string][]boson.Address
}

func NewMockRouteTable

func NewMockRouteTable() MockRouteTable

func (*MockRouteTable) Connect

func (r *MockRouteTable) Connect(ctx context.Context, target boson.Address) error

func (*MockRouteTable) DelRoute

func (r *MockRouteTable) DelRoute(ctx context.Context, dest boson.Address) (err error)

func (*MockRouteTable) FindRoute

func (r *MockRouteTable) FindRoute(ctx context.Context, target boson.Address, timeout ...time.Duration) (route []*routetab.Path, err error)

func (*MockRouteTable) FindUnderlay

func (r *MockRouteTable) FindUnderlay(ctx context.Context, target boson.Address) (addr *address.Address, err error)

func (*MockRouteTable) GetRoute

func (r *MockRouteTable) GetRoute(ctx context.Context, target boson.Address) (routes []*routetab.Path, err error)

func (*MockRouteTable) GetTargetNeighbor

func (r *MockRouteTable) GetTargetNeighbor(ctx context.Context, target boson.Address, limit int) (addresses []boson.Address, err error)

func (*MockRouteTable) IsNeighbor

func (r *MockRouteTable) IsNeighbor(dest boson.Address) (has bool)

Jump to

Keyboard shortcuts

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