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

Method LookupIP

internal/utils/agents/manager.go:184–188  ·  view source on GitHub ↗

LookupIP 查询IP所属Agent

(ip string)

Source from the content-addressed store, hash-verified

182
183// LookupIP 查询IP所属Agent
184func (this *Manager) LookupIP(ip string) (agentCode string) {
185 this.locker.RLock()
186 defer this.locker.RUnlock()
187 return this.ipMap[ip]
188}
189
190// ContainsIP 检查是否有IP相关数据
191func (this *Manager) ContainsIP(ip string) bool {

Callers 4

TestNewManagerFunction · 0.80
FormatMethod · 0.80
checkWAFRequestMethod · 0.80
LoopMethod · 0.80

Calls 2

RLockMethod · 0.80
RUnlockMethod · 0.80

Tested by 1

TestNewManagerFunction · 0.64