Documentation ¶
Index ¶
- Variables
- func NewDatastore(t *testing.T) datastore.Batching
- func NewKeystore(t *testing.T) keystore.Keystore
- func NewLibp2pHostAndDHT(ctx context.Context, t *testing.T, logger *zap.Logger, ds datastore.Batching, ...) (host.Host, *dht.IpfsDHT)
- func NewLogger(t *testing.T) *zap.SugaredLogger
- func NewMultiaddr(t *testing.T) multiaddr.Multiaddr
- func NewPeerstore(t *testing.T) peerstore.Peerstore
- func NewPrivateKey(t *testing.T) crypto.PrivKey
- func NewSecret(t *testing.T) []byte
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // EncodedPK is a hex encoded key // to be reused across tests EncodedPK = "" /* 136-byte string literal not displayed */ )
Functions ¶
func NewDatastore ¶
NewDatastore is used to create a new in memory datastore
func NewKeystore ¶
NewKeystore is used to return a new in memory keystore
func NewLibp2pHostAndDHT ¶
func NewLibp2pHostAndDHT( ctx context.Context, t *testing.T, logger *zap.Logger, ds datastore.Batching, ps peerstore.Peerstore, pk crypto.PrivKey, addrs []multiaddr.Multiaddr, secret []byte) (host.Host, *dht.IpfsDHT)
NewLibp2pHostAndDHT is used to create a new libp2p host and an unbootstrapped dht
func NewLogger ¶
func NewLogger(t *testing.T) *zap.SugaredLogger
NewLogger is used to return a test zap logger
func NewMultiaddr ¶
NewMultiaddr is used to create a new multiaddress
func NewPeerstore ¶
NewPeerstore is ued to generate an in-memory peerstore
func NewPrivateKey ¶
NewPrivateKey is used to create a new private key for testing purposes
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.