status-go/signal/events_discovery.go

28 lines
804 B
Go
Raw Permalink Normal View History

2018-05-03 07:35:58 +00:00
package signal
const (
// EventDiscoveryStarted is sent when node discv5 was started.
EventDiscoveryStarted = "discovery.started"
// EventDiscoveryStopped is sent when discv5 server was stopped.
EventDiscoveryStopped = "discovery.stopped"
// EventDiscoverySummary is sent when peer is added or removed.
// it will be a map with capability=peer count k/v's.
EventDiscoverySummary = "discovery.summary"
)
// SendDiscoveryStarted sends discovery.started signal.
func SendDiscoveryStarted() {
send(EventDiscoveryStarted, nil)
}
// SendDiscoveryStopped sends discovery.stopped signal.
func SendDiscoveryStopped() {
send(EventDiscoveryStopped, nil)
}
// SendDiscoverySummary sends discovery.summary signal.
2018-05-15 07:48:40 +00:00
func SendDiscoverySummary(summary interface{}) {
2018-05-03 07:35:58 +00:00
send(EventDiscoverySummary, summary)
}