Documentation ¶
Index ¶
Constants ¶
View Source
const AllNodesRun string = "AllNodesRun"
View Source
const Backlog string = "Backlog"
View Source
const Bias string = "Bias"
View Source
const ChokerStrategy string = "ChokerStrategy"
View Source
const InPeers string = "InPeers"
View Source
const Interval string = "Interval"
View Source
const LeaderPercent string = "LeaderPercent"
View Source
const MinNodes string = "MinNodes"
View Source
const Multi string = "Multi"
View Source
const Optimistics string = "Optimistics"
View Source
const OutPeers string = "OutPeers"
*
- Constant values to pass to "config.NewConst".
View Source
const PieceSize string = "PieceSize"
View Source
const Pieces string = "Pieces"
View Source
const Random string = "Random"
View Source
const Seeds string = "Seeds"
View Source
const StoragePieces string = "StoragePieces"
View Source
const TitForTat string = "TitForTat"
Choker strategies
View Source
const Uploads string = "Uploads"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conf ¶
type Conf struct { // BitTorrent OutPeers int `json:"outPeers"` // maximum number of outbound peers InPeers int `json:"inPeers"` // maximum number of inbound peers MinNodes int `json:"minNodes"` // minimum number of nodes in a Torrent Seeds int `json:"seeds"` // number of seed nodes PieceSize int `json:"pieceSize"` // the piece size Pieces int `json:"pieces"` // number of pieces in a Torrent Uploads int `json:"uploads"` // number of Uploads (without Optimistics) // chosen by a Choker Optimistics int `json:"optimistics"` // number of Optimistics // chosen by a Choker Interval int `json:"interval"` // milliseconds Backlog int `json:"backlog"` // number of pieces requested at a time // Extension LeaderPercent int `json:"leaderPercent"` // the percent of leaders in an AS // Biased Tracker extension Bias int `json:"bias"` // the number of connections to peers in different AS // Misc // Simulation parameters TransitDomains int `json:"transitDomains"` TransitDomainSize int `json:"transitDomainSize"` StubDomains int `json:"stubDomains"` StubDomainSize int `json:"stubDomainSize"` TransferInterval int `json:"transferInterval"` CapacityNodes []NodeConf `json:"capacityNodes"` // Progress properties AllNodesRun *WGProgress AllNodesRunInterval int `json:allNodesRunInterval` // Latency support Latency bool // Run the simulator's event queue with support for parallel events. Parallel bool // Multi-Torrent extension Multi int StoragePieces int // Choker strategy(e.g. TitForTat, Random) ChokerStrategy string }
var Config *Conf
func JSONConfig ¶
func (*Conf) WithParams ¶
Usage:
c := NewConf(). WithParams(func(c *Conf) { c.OutPeers = 5 c.MinNodes = 10 })
type WGProgress ¶
type WGProgress struct {
// contains filtered or unexported fields
}
func NewWGProgress ¶
func NewWGProgress(start int) *WGProgress
func (*WGProgress) Add ¶
func (p *WGProgress) Add()
func (*WGProgress) Advance ¶
func (p *WGProgress) Advance()
func (*WGProgress) Progress ¶
func (p *WGProgress) Progress(id string)
Click to show internal directories.
Click to hide internal directories.