github.com/status-im/status-go@v1.1.0/signal/events_discovery.go (about) 1 package signal 2 3 const ( 4 // EventDiscoveryStarted is sent when node discv5 was started. 5 EventDiscoveryStarted = "discovery.started" 6 // EventDiscoveryStopped is sent when discv5 server was stopped. 7 EventDiscoveryStopped = "discovery.stopped" 8 9 // EventDiscoverySummary is sent when peer is added or removed. 10 // it will be a map with capability=peer count k/v's. 11 EventDiscoverySummary = "discovery.summary" 12 ) 13 14 // SendDiscoveryStarted sends discovery.started signal. 15 func SendDiscoveryStarted() { 16 send(EventDiscoveryStarted, nil) 17 } 18 19 // SendDiscoveryStopped sends discovery.stopped signal. 20 func SendDiscoveryStopped() { 21 send(EventDiscoveryStopped, nil) 22 } 23 24 // SendDiscoverySummary sends discovery.summary signal. 25 func SendDiscoverySummary(summary interface{}) { 26 send(EventDiscoverySummary, summary) 27 }