status-go/discovery/discovery.go
Dmitry eeca435064 Add rendezvous implementation for discovery interface
Update vendor

Integrate rendezvous into status node

Add a test with failover using rendezvous

Use multiple servers in client

Use discovery V5 by default and test that node can be started with rendezvous discovet

Fix linter

Update rendezvous client to one with instrumented stream

Address feedback

Fix test with updated topic limits

Apply several suggestions

Change log to debug for request errors because we continue execution

Remove web3js after rebase

Update rendezvous package
2018-07-25 15:10:57 +03:00

24 lines
599 B
Go

package discovery
import (
"time"
"github.com/ethereum/go-ethereum/p2p/discv5"
)
const (
// EthereumV5 is kademlia-based discovery from go-ethereum repository.
EthereumV5 = "ethv5"
// RendezvousV1 is req/rep based discovery that uses ENR for records.
RendezvousV1 = "ethvousv1"
)
// Discovery is an abstract interface for using different discovery providers.
type Discovery interface {
Running() bool
Start() error
Stop() error
Register(topic string, stop chan struct{}) error
Discover(topic string, period <-chan time.Duration, found chan<- *discv5.Node, lookup chan<- bool) error
}