Expand description
Module for publicly usable implementations of the traits
Structs§
- CdnMetrics
Value - CDN-specific metrics
- Combined
Networks - A communication channel with 2 networks, where we can fall back to the slower network if the primary fails
- Gossip
Config - Configuration for Libp2p’s Gossipsub
- KeyPair
- We encapsulate keys here to help readability.
- Libp2p
Metrics Value - Libp2p-specific metrics
- Libp2p
Network - Networking implementation that uses libp2p
generic over
M
which is the message type - Master
Map - Shared state for in-memory mock networking.
- Memory
Network - In memory only network simulator.
- Production
Def - The production run definition for the Push CDN. Uses the real protocols and a Redis discovery client.
- Push
CdnNetwork - 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.
- Request
Response Config - Configuration for Libp2p’s request-response
- Testing
Def - The testing run definition for the Push CDN. Uses the real protocols, but with an embedded discovery client.
- Underlying
Combined Networks - Wrapper for the tuple of
PushCdnNetwork
andLibp2pNetwork
We need this so we can implTestableNetworkingImplementation
on the tuple - Wrapped
Signature Key - A wrapped
SignatureKey
. We need to implement the Push CDN’sSignatureScheme
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
orip:port
. This function derives aMultiaddr
from the input string. - derive_
libp2p_ peer_ id - Derive a Libp2p Peer ID from a given private key
Type Aliases§
- Peer
Info Vec - Type alias for a shared collection of peerid, multiaddrs