Module implementations

Source
Expand description

Module for publicly usable implementations of the traits

Structs§

CdnMetricsValue
CDN-specific metrics
CombinedNetworks
A communication channel with 2 networks, where we can fall back to the slower network if the primary fails
GossipConfig
Configuration for Libp2p’s Gossipsub
KeyPair
We encapsulate keys here to help readability.
Libp2pMetricsValue
Libp2p-specific metrics
Libp2pNetwork
Networking implementation that uses libp2p generic over M which is the message type
MasterMap
Shared state for in-memory mock networking.
MemoryNetwork
In memory only network simulator.
ProductionDef
The production run definition for the Push CDN. Uses the real protocols and a Redis discovery client.
PushCdnNetwork
A communication channel to the Push CDN, which is a collection of brokers and a marshal that helps organize them all. Is generic over both the type of key and the network protocol.
RequestResponseConfig
Configuration for Libp2p’s request-response
TestingDef
The testing run definition for the Push CDN. Uses the real protocols, but with an embedded discovery client.
UnderlyingCombinedNetworks
Wrapper for the tuple of PushCdnNetwork and Libp2pNetwork We need this so we can impl TestableNetworkingImplementation on the tuple
WrappedSignatureKey
A wrapped SignatureKey. We need to implement the Push CDN’s SignatureScheme trait in order to sign and verify messages to/from the CDN.

Enums§

CdnTopic
The enum for the topics we can subscribe to in the Push CDN

Functions§

derive_libp2p_keypair
Derive a Libp2p keypair from a given private key
derive_libp2p_multiaddr
Parse a Libp2p Multiaddr from a string. The input string should be in the format hostname:port or ip:port. This function derives a Multiaddr from the input string.
derive_libp2p_peer_id
Derive a Libp2p Peer ID from a given private key

Type Aliases§

PeerInfoVec
Type alias for a shared collection of peerid, multiaddrs