SingleConfig (src/backend.rs)

hitbox · hitbox-redis/src/backend.rs · rust · MIT
database

Rust structs and enums for configuring single or cluster Redis connections in hitbox-redis.

// Source: https://github.com/hit-box/hitbox | License: MIT | Copyright 2019 Hitbox Contributors
// Provided via justclaw.it.com; keep this notice with the code.
//! Redis backend implementation.

use std::time::Duration;

use async_trait::async_trait;
use bytes::Bytes;
use chrono::{DateTime, Utc};
use hitbox::{BackendLabel, CacheKey, CacheValue, Raw};
use hitbox_backend::{
    Backend, BackendError, BackendResult, CacheKeyFormat, Compressor, DeleteStatus,
    PassthroughCompressor,
    format::{BincodeFormat, Format},
};
use redis::Client;
use redis::aio::ConnectionManager;
#[cfg(feature = "cluster")]
use redis::cluster_async::ClusterConnection;
use tokio::sync::OnceCell;

use crate::error::Error;

/// Configuration for a single Redis node connection.
///
/// # When You'll Encounter This


... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key