package
0.0.0-20240107182258-17bc252a4bb9
Repository: https://github.com/matthiasbt/monitoring.git
Documentation: pkg.go.dev
# Functions
NewDBKeeper creates and returns a new DBKeeper instance with the provided database, logger, and retrier.
NewFileKeeper creates and returns a new FileKeeper instance with the provided configuration, logger, and retrier.
NewMemStorage creates and returns a new MemStorage instance.
OpenDB opens a database connection.
# Structs
DBKeeper is a struct that manages database operations and holds a SQL database connection, a logger for logging operations, a retrier for handling retry logic, and a mutex for synchronizing operations.
FileKeeper is a struct that manages file operations and holds a logger, the path to the file storage, a retrier for handling retry logic, and a mutex for synchronizing operations.
MemStorage is a struct that manages in-memory storage operations, periodic flushing to external storage, and logging.
State represents the in-memory storage state containing metrics and a mutex for synchronization.