Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultTTL = time.Hour * 24
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiscoveryService ¶
type DiscoveryService struct {
NS NamespaceProvider
Info *peer.AddrInfo
Topo Topology
// contains filtered or unexported fields
}
type HostFactory ¶
func (*HostFactory) NewHost ¶
NewHost assembles and creates a new libp2p host that uses the simulation's network.
Env configures hosts to use an in-process network and therefore overrides the following options:
- libp2p.Transport - libp2p.NoTransports - libp2p.ListenAddr - libp2p.ListenAddrStrings - libp2p.NoListenAddrs
Users SHOULD NOT pass any of the above options to NewHost.
type NamespaceProvider ¶
type SelectAll ¶
type SelectAll struct {
// contains filtered or unexported fields
}
type SelectRandom ¶
type SelectRing ¶
type SelectRing struct {
// K specifies the cardinality of each ring node. For example:
//
// - K = 1 will create a ring such that each node connects to its
// right-hand neighbor, resulting two connections per node.
//
// - K = 2 will create a ring such that each node connects to its
// right-hand neighbor AND *its* right-hand neighbor, resulting
// in *four* connections per node.
K int
SelectAll
}
Click to show internal directories.
Click to hide internal directories.