MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / Push

Method Push

internal/utils/agents/queue.go:56–68  ·  view source on GitHub ↗

Push 将IP加入到处理队列

(ip string)

Source from the content-addressed store, hash-verified

54
55// Push 将IP加入到处理队列
56func (this *Queue) Push(ip string) {
57 // 是否在处理中
58 if this.cacheMap.Contains(ip) {
59 return
60 }
61 this.cacheMap.Add(ip)
62
63 // 加入到队列
64 select {
65 case this.c <- ip:
66 default:
67 }
68}
69
70// Process 处理IP
71func (this *Queue) Process(ip string) error {

Callers 8

openBFileMethod · 0.45
TestParseQueue_ProcessFunction · 0.45
IgnoreKeyMethod · 0.45
IgnoreKeyMethod · 0.45
PutMethod · 0.45
AddUserAgentMethod · 0.45

Calls 2

AddMethod · 0.65
ContainsMethod · 0.45

Tested by 1

TestParseQueue_ProcessFunction · 0.36