improve docs and add coveralls badge

This commit is contained in:
2025-11-20 10:33:06 +00:00
parent 15a1563c59
commit 34e66307de
2 changed files with 5 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
# GubGub
[![Go Report Card](https://goreportcard.com/badge/github.com/nmoniz/gubgub)](https://goreportcard.com/report/github.com/nmoniz/gubgub)
[![Coverage Status](https://coveralls.io/repos/github/nmoniz/gubgub/badge.svg?branch=main)](https://coveralls.io/github/nmoniz/gubgub?branch=main)
Yet another in-memory Go PubSub library.
I started to develop what is now GubGub in one of my personal projects but I soon found myself using it in other completely unrelated projects and I thought it could be a nice thing to share.

View File

@@ -29,8 +29,11 @@ func NoOp[T any]() Subscriber[T] {
// available memory.
// This is useful if message publishing is surge prone and message processing is slow or
// unpredictable (for example: subscriber makes network request).
//
// IMPORTANT: messages are considered delivered even it they are still in the buffer which means
// that buffered subscribers are NOT COVERED by the publishing promise.
// that while the wrapper subscriber is covered by the publishing promise the inner subscriber is
// is not.
//
// Message average processing rate must still be higher than the average message publishing rate
// otherwise it will eventually lead to memory issues. You will need to find a better strategy to
// deal with such scenario.
@@ -89,7 +92,6 @@ func Buffered[T any](subscriber Subscriber[T]) Subscriber[T] {
idling = true
}
}
}
}()