Closed ggrossetie closed 2 years ago
This also needs some docs
Yes. To avoid conflicts, I'm waiting on https://github.com/pinojs/pino-socket/pull/71 to be merged before adding documentation.
Documentation added.
I think we need to decide if we want to emit a warning or emit an event when an error occurred while writing data to the TCP socket. There are two cases where we write data to the TCP socket:
Thanks!
Introduce a recovery queue in order to store data when the connection is lost and send them when the connection is established again.
New options:
recovery
: Enable recovering data when reconnecting after the connection was dropped. Default:false
.recoveryQueueSizeCalculation
: Function used to calculate the size of stored elements. Default:element => element.data.length + element.encoding.length
.recoveryQueueMaxSize
: Positive integer to track the sizes of items added to the cache, and automatically evict items in order to stay below this size. Default:Infinity
This feature is disabled by default. Should we emit a warning if the user enables this feature without a max size?
Since I've updated the Readme.md in #71, I will add documentation for them once #71 is merged.
Resolves #72