github.com/status-im/status-go@v1.1.0/peers/README.md (about) 1 Peer pool signals 2 ================= 3 4 Peer pool sends 3 types of signals. 5 6 Discovery started signal will be sent once discovery server is started. 7 And every time node will have to re-start discovery server because peer number dropped too low. 8 9 ```json 10 { 11 "type": "discovery.started", 12 "event": null 13 } 14 ``` 15 16 17 Discovery stopped signal will be sent once discovery found max limit of peers 18 for every registered topic. 19 20 ```json 21 { 22 "type": "discovery.stopped", 23 "event": null 24 } 25 ``` 26 27 28 Discovery summary signal will be sent every time new peer is added or removed 29 from a cluster. It will contain a map with capability as a key and total numbers 30 of peers with that capability as a value. 31 32 ```json 33 { 34 "type": "discovery.summary", 35 "event": [ 36 { 37 "id": "339c84c816b5f17a622c8d7ab9498f9998e942a274f70794af934bf5d3d02e14db8ddca2170e4edccede29ea6d409b154c141c34c01006e76c95e17672a27454", 38 "name": "peer-0/v1.0/darwin/go1.10.1", 39 "caps": [ 40 "shh/6" 41 ], 42 "network": { 43 "localAddress": "127.0.0.1:61049", 44 "remoteAddress": "127.0.0.1:33732", 45 "inbound": false, 46 "trusted": false, 47 "static": true 48 }, 49 "protocols": { 50 "shh": "unknown" 51 } 52 } 53 ] 54 } 55 ``` 56 57 Or if we don't have any peers: 58 59 ```json 60 { 61 "type": "discovery.summary", 62 "event": [] 63 } 64 ```