Beispiel #1
0
// 登记蜘蛛的优先级
func (self *SrcManage) uIndex(spiderId int, priority int) {
	self.mutex[spiderId].Lock()
	defer self.mutex[spiderId].Unlock()

	self.index[spiderId] = append(self.index[spiderId], priority)

	// 从小到大排序
	util.QSortT(self.index[spiderId])
}
Beispiel #2
0
// 初始化输出方式列表collector.OutputLib
func init() {
	for out, _ := range collector.Output {
		collector.OutputLib = append(collector.OutputLib, out)
	}
	util.QSortT(collector.OutputLib)
}