fengling-gateway/src/Config/RedisConfig.cs
movingsam d7007d0d7f config: improve Redis configuration and credentials management
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-28 18:38:07 +08:00

25 lines
710 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

namespace YarpGateway.Config;
/// <summary>
/// Redis 连接配置
/// 注意ConnectionString 应从环境变量或密钥管理服务获取,不要硬编码凭据
/// </summary>
public class RedisConfig
{
/// <summary>
/// Redis 连接字符串
/// 从环境变量 REDIS_CONNECTION_STRING 读取,或从配置文件获取
/// 格式: host:port,password=xxx
/// </summary>
public string ConnectionString { get; set; } = string.Empty;
/// <summary>
/// Redis 数据库编号
/// </summary>
public int Database { get; set; } = 0;
/// <summary>
/// 实例名称前缀
/// </summary>
public string InstanceName { get; set; } = "YarpGateway";
}