mock

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: May 25, 2022 License: BSD-3-Clause 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 added in v1.0.9

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

func NewMockRouteTable

func NewMockRouteTable() MockRouteTable

func (*MockRouteTable) Connect added in v1.0.9

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

func (*MockRouteTable) DelRoute added in v1.0.12

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

func (*MockRouteTable) FindRoute added in v1.0.9

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

func (*MockRouteTable) FindUnderlay added in v1.2.0

func (r *MockRouteTable) FindUnderlay(ctx context.Context, target boson.Address, timeouts ...time.Duration) (addr *aurora.Address, err error)

func (*MockRouteTable) GetRoute added in v1.0.9

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

func (*MockRouteTable) GetTargetNeighbor added in v1.0.9

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

func (*MockRouteTable) IsNeighbor added in v1.0.9

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