github.com/aergoio/aergo@v1.3.1/p2p/p2pcommon/listmanager.go (about) 1 /* 2 * @file 3 * @copyright defined in aergo/LICENSE.txt 4 */ 5 6 package p2pcommon 7 8 import ( 9 "github.com/aergoio/aergo/types" 10 "time" 11 ) 12 13 // ListManager manages whitelist and blacklist 14 type ListManager interface { 15 Start() 16 Stop() 17 18 IsBanned(addr string, pid types.PeerID) (bool, time.Time) 19 20 // RefineList update white/blacklist 21 RefineList() 22 Summary() map[string]interface{} 23 } 24 //go:generate mockgen -source=listmanager.go -package=p2pmock -destination=../p2pmock/mock_listmanager.go 25