mirror of
https://github.com/matrix-org/pinecone.git
synced 2026-01-11 19:46:30 +00:00
Add TotalPeerCount to router api
This commit is contained in:
parent
56892e4ae5
commit
61850f0e63
1 changed files with 8 additions and 0 deletions
|
|
@ -277,3 +277,11 @@ func (r *Router) PeerCount(peertype int) (count int) {
|
|||
})
|
||||
return
|
||||
}
|
||||
|
||||
// TotalPeerCount returns the total number of nodes that are directly connected
|
||||
// to this Pinecone node.
|
||||
func (r *Router) TotalPeerCount() (count int) {
|
||||
// PeerCount treats values < 0 specially, returning the count of all connected
|
||||
// peers, regardless of type.
|
||||
return r.PeerCount(-1)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue