AddItem 执行添加IP动作
(listType IPListType, item *pb.IPItem)
| 117 | |
| 118 | // AddItem 执行添加IP动作 |
| 119 | func (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动作 |
| 132 | func (this *ActionManager) DeleteItem(listType IPListType, item *pb.IPItem) { |