multitool-hg

Crates.iomultitool-hg
lib.rsmultitool-hg
version0.1.3
sourcesrc
created_at2024-10-24 19:39:27.37618
updated_at2024-11-09 10:53:48.342968
descriptionUseful module for creating services on Rust.
homepage
repositoryhttps://github.com/humangrass/multitool
max_upload_size
id1421642
size2,041,323
Human Grass (humangrass)

documentation

https://docs.rs/multitool-hg

README

Multitool

Useful module for creating services on Rust.

multitool

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 and on crates.io.

Testing

You can run tests for all modules using the full feature:

cargo test --features full

Checking the correctness of the build:

cargo build --features full
Commit count: 16

cargo fmt