PureeLogStore

interface PureeLogStore

Stores the buffered logs for batched emissions. Implementations of this interface are guaranteed to be thread-safe (called from a single thread).

See also

Inheritors

Functions

Link copied to clipboard
abstract suspend fun add(outputId: String, bufferedLog: PureeBufferedLog)

Adds a new PureeBufferedLog to the store.

Link copied to clipboard
abstract suspend fun get(outputId: String, maxCount: Int): List<PureeBufferedLog>

Retrieves the logs from the store.

Link copied to clipboard
abstract suspend fun purgeLogsWithAge(outputId: String, now: Instant, age: Duration)

Deletes all the logs according the age of the log.

Link copied to clipboard
abstract suspend fun remove(outputId: String, bufferedLogs: List<PureeBufferedLog>)

Deletes the logs from the store.