Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateNetwork ¶
GenerateNetwork creates a P2P network from the given graph. nodeLatency and edgeLatency are functions that generate latencies for nodes and edges respectively.
func LogNormalRand ¶
LogNormalRand generates a log-normally distributed random number with given mu and sigma parameters.
func RunNetworkSimulation ¶
RunNetworkSimulation starts the message handling routines for all nodes in the network.
Types ¶
type Node ¶
type Node struct {
ID ID
Latency float64
Edges map[ID]Edge
RecvFrom map[string]map[ID]struct{} // content -> set of senders
SentTo map[string]map[ID]struct{} // content -> set of targets
SeenAt map[string]time.Time // content -> first arrival time
// contains filtered or unexported fields
}
Node represents a node in the P2P network.
Click to show internal directories.
Click to hide internal directories.