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

Method AddItem

internal/iplibrary/action_manager.go:119–129  ·  view source on GitHub ↗

AddItem 执行添加IP动作

(listType IPListType, item *pb.IPItem)

Source from the content-addressed store, hash-verified

117
118// AddItem 执行添加IP动作
119func (this *ActionManager) AddItem(listType IPListType, item *pb.IPItem) {
120 instances, ok := this.eventMap[item.EventLevel]
121 if ok {
122 for _, instance := range instances {
123 err := instance.AddItem(listType, item)
124 if err != nil {
125 remotelogs.Error("IPLIBRARY/ACTION_MANAGER", "add item '"+fmt.Sprintf("%d", item.Id)+"': "+err.Error())
126 }
127 }
128 }
129}
130
131// DeleteItem 执行删除IP动作
132func (this *ActionManager) DeleteItem(listType IPListType, item *pb.IPItem) {

Callers

nothing calls this directly

Calls 3

ErrorFunction · 0.92
AddItemMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected