syntax = "proto3"; package conf; option go_package = "github.com/tx7do/kratos-bootstrap/api/gen/go/conf/v1;conf"; import "google/protobuf/duration.proto"; // 中间件 message Middleware { // JWT校验 message Auth { string method = 1; // JWT签名的算法,支持算法:HS256 string key = 2; // JWT 秘钥 optional google.protobuf.Duration access_token_expires = 3; // 访问令牌过期时间 optional google.protobuf.Duration refresh_token_expires = 4; // 刷新令牌过期时间 optional string access_token_key_prefix = 5; // 访问令牌键前缀 optional string refresh_token_key_prefix = 6; // 刷新令牌键前缀 } // 限流器 message RateLimiter { string name = 1; // 限流器名字,支持:bbr。 } // 性能指标 message Metrics { bool histogram = 1; // 直方图 bool counter = 2; // 计数器 bool gauge = 3; // 仪表盘 bool summary = 4; // 摘要 } RateLimiter limiter = 1; Metrics metrics = 2; Auth auth = 3; bool enable_logging = 10; // 日志开关 bool enable_recovery = 11; // 异常恢复 bool enable_tracing = 12; // 链路追踪开关 bool enable_validate = 13; // 参数校验开关 bool enable_circuit_breaker = 14; // 熔断器 bool enable_metadata = 15; // 元数据 }