Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Peers ¶
type Peers struct {
// contains filtered or unexported fields
}
func (*Peers) SelectBest ¶
SelectBest selects at most n peers sorted by responsiveness and latency.
SelectBest parametrized by N because sync protocol relies on receiving data from redundant connections to guarantee that it will get complete data set. If it doesn't get complete data set it will have to fallback into hash resolution, which is generally more expensive.
func (*Peers) SelectBestFrom ¶
SelectBest peer with preferences.
Click to show internal directories.
Click to hide internal directories.