test

package
Version: v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2020 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddrBookTest

func AddrBookTest(t *testing.T, factory AddrBookFactory)

func AddressProducer

func AddressProducer(ctx context.Context, b *testing.B, addrs chan *logpair, addrsPerPeer int)

func AssertAddressesEqual

func AssertAddressesEqual(t *testing.T, exp, act []ma.Multiaddr)

func BenchmarkHeadBook

func BenchmarkHeadBook(b *testing.B, factory HeadBookFactory)

func BenchmarkKeyBook

func BenchmarkKeyBook(b *testing.B, factory KeyBookFactory)

func BenchmarkLogstore

func BenchmarkLogstore(b *testing.B, factory LogstoreFactory, variant string)

func GenerateAddrs

func GenerateAddrs(count int) []ma.Multiaddr

func GeneratePeerIDs

func GeneratePeerIDs(count int) []peer.ID

func HeadBookTest

func HeadBookTest(t *testing.T, factory HeadBookFactory)

func KeyBookTest

func KeyBookTest(t *testing.T, factory KeyBookFactory)

func LogstoreTest

func LogstoreTest(t *testing.T, factory LogstoreFactory)

func MetadataBookTest

func MetadataBookTest(t *testing.T, factory MetadataBookFactory)

func Multiaddr

func Multiaddr(m string) ma.Multiaddr

func RandomPeer

func RandomPeer(b *testing.B, addrCount int) *logpair

Types

type AddrBookFactory

type AddrBookFactory func() (core.AddrBook, func())

type HeadBookFactory

type HeadBookFactory func() (core.HeadBook, func())

type KeyBookFactory

type KeyBookFactory func() (core.KeyBook, func())

type LogstoreFactory

type LogstoreFactory func() (core.Logstore, func())

type MetadataBookFactory

type MetadataBookFactory func() (core.ThreadMetadata, func())

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL