mirror of
https://github.com/status-im/status-go.git
synced 2025-01-09 06:12:55 +00:00
eeca435064
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
24 lines
599 B
Go
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
|
|
}
|