Add Count method to stream

This commit is contained in:
Alexandre Iooss 2020-10-17 13:03:49 +02:00
parent b8ee60ce9f
commit 5b85eed646
No known key found for this signature in database
GPG Key ID: 6C79278F3FCDCC02
1 changed files with 5 additions and 0 deletions

View File

@ -75,3 +75,8 @@ func (s *Stream) Unregister(output chan []byte) {
close(output)
}
}
// Count number of outputs
func (s *Stream) Count() int {
return len(s.outputs)
}