Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotEnoughData = fmt.Errorf("数据不足") ErrWrongNumOfPeers = fmt.Errorf("预期的对等节点数量错误") )
View Source
var ( MaxMeasurementAge = 2 * time.Hour // 测量数据的最大有效期 MinMeasurementsThreshold = 5 // 最小测量数据阈值 MaxMeasurementsThreshold = 150 // 最大测量数据阈值 )
Functions ¶
Types ¶
type Estimator ¶
type Estimator struct {
// contains filtered or unexported fields
}
Estimator 网络规模估计器
func NewEstimator ¶
NewEstimator 创建新的网络规模估计器 参数:
- localID: peer.ID 本地节点ID
- rt: *kbucket.RoutingTable 路由表
- bucketSize: int 桶大小
返回值:
- *Estimator 网络规模估计器实例
Click to show internal directories.
Click to hide internal directories.