add to MinTopicSize godoc re topic size

This commit is contained in:
rene 2021-12-22 12:55:26 +01:00 committed by vyzo
parent c6dd285c5d
commit 3b1c59c733

View File

@ -74,7 +74,8 @@ type discover struct {
}
// MinTopicSize returns a function that checks if a router is ready for publishing based on the topic size.
// The router ultimately decides the whether it is ready or not, the given size is just a suggestion.
// The router ultimately decides the whether it is ready or not, the given size is just a suggestion. Note
// that the topic size does not include the host in the count.
func MinTopicSize(size int) RouterReady {
return func(rt PubSubRouter, topic string) (bool, error) {
return rt.EnoughPeers(topic, size), nil