Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( InputMaxDelay = maxDelay InputMinDelay = minDelay InputMaxLossRate = maxLossRate Output = defaultOutput PrintNum = 10 )
Functions ¶
func ExportCsv ¶
func ExportCsv(data []CloudflareIPData)
func UpdateBandwidth ¶
func UpdateBandwidth(speed int64)
Types ¶
type CloudflareIPData ¶
type DelayGroup ¶
type DelayGroup struct {
// contains filtered or unexported fields
}
延迟分组,每组内延迟差距在 5ms 以内
type DownloadSpeedSet ¶
type DownloadSpeedSet []CloudflareIPData
下载速度排序
func (DownloadSpeedSet) Len ¶
func (s DownloadSpeedSet) Len() int
func (DownloadSpeedSet) Less ¶
func (s DownloadSpeedSet) Less(i, j int) bool
func (DownloadSpeedSet) Print ¶
func (s DownloadSpeedSet) Print()
func (DownloadSpeedSet) Swap ¶
func (s DownloadSpeedSet) Swap(i, j int)
type PingDelaySet ¶
type PingDelaySet []CloudflareIPData
延迟丢包排序
func (PingDelaySet) FilterLossRate ¶
func (s PingDelaySet) FilterLossRate() (data PingDelaySet)
丢包条件过滤
func (PingDelaySet) GroupAndShuffle ¶
func (s PingDelaySet) GroupAndShuffle() PingDelaySet
对延迟测速结果进行分组并随机化
func (PingDelaySet) Len ¶
func (s PingDelaySet) Len() int
func (PingDelaySet) Less ¶
func (s PingDelaySet) Less(i, j int) bool
func (PingDelaySet) Swap ¶
func (s PingDelaySet) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.