github.com/status-im/status-go@v1.1.0/discovery/discovery.go (about) 1 package discovery 2 3 import ( 4 "time" 5 6 "github.com/ethereum/go-ethereum/p2p/discv5" 7 ) 8 9 const ( 10 // EthereumV5 is kademlia-based discovery from go-ethereum repository. 11 EthereumV5 = "ethv5" 12 ) 13 14 // Discovery is an abstract interface for using different discovery providers. 15 type Discovery interface { 16 Running() bool 17 Start() error 18 Stop() error 19 Register(topic string, stop chan struct{}) error 20 Discover(topic string, period <-chan time.Duration, found chan<- *discv5.Node, lookup chan<- bool) error 21 }