https://github.com/humangrass/multitool
Useful module for creating services on Rust
https://github.com/humangrass/multitool
logging postgresql redis rust sqlx
Last synced: 5 months ago
JSON representation
Useful module for creating services on Rust
- Host: GitHub
- URL: https://github.com/humangrass/multitool
- Owner: humangrass
- Created: 2024-10-23T23:58:18.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-09T10:53:30.000Z (over 1 year ago)
- Last Synced: 2025-08-23T21:40:23.525Z (10 months ago)
- Topics: logging, postgresql, redis, rust, sqlx
- Language: Rust
- Homepage:
- Size: 1.93 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Multitool
Useful module for creating services on Rust.

# Features
### 1. Database
The `database` module provides functionality for working with PostgreSQL using asynchronous connection pooling
via `sqlx`. This module includes:
- Database connection settings via `DatabaseConfig`.
- Connection pooling functionality for PostgreSQL.
- `TODO: mysql`
To enable PostgreSQL support, use the `full` or `database` feature. Available by default.
### 2. Logger
The `logger` module provides a logging system based on `tracing-subscriber` and supports different logging
levels (`Info`, `Debug`, `Error`, etc.). You can configure logging levels via `LogLevel` and use them to output
structured logs.
To enable logging, use the `full` or `logger` feature. Available by default.
### 3. Rediska
The `rediska` module provides functionality for working with Redis using asynchronous connection pooling via `bb8`. This
module includes:
- Redis connection settings via `RedisConfig`.
- Connection pooling for Redis.
- Convenient methods for setting and getting values in Redis.
The `RedisConfig` allows you to configure parameters like the host, port, username, password, database, connection
timeout, and pool size. If you’re working with Redis clusters or socket connections, you can specify a connection_url
directly.
To enable Redis support, use the `full` or `rediska` features. Available by default.
# Usage
Documentation is available [here](https://docs.rs/multitool-hg/latest/multitool_hg/) and
on [crates.io](https://crates.io/crates/multitool-hg).
# Testing
You can run tests for all modules using the `full` feature:
```bash
cargo test --features full
```
Checking the correctness of the build:
```bash
cargo build --features full
```