Files
kratos-bootstrap/api/protos/conf/v1/kratos_conf_middleware.proto
2024-05-06 08:02:26 +08:00

39 lines
943 B
Protocol Buffer
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.

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 秘钥
}
// 限流器
message RateLimiter {
string name = 1; // 限流器名字支持bbr。
}
// 性能指标
message Metrics {
bool histogram = 1; // 直方图
bool counter = 2; // 计数器
bool gauge = 3; // 仪表盘
bool summary = 4; // 摘要
}
bool enable_logging = 1; // 日志开关
bool enable_recovery = 2; // 异常恢复
bool enable_tracing = 3; // 链路追踪开关
bool enable_validate = 4; // 参数校验开关
bool enable_circuit_breaker = 5; // 熔断器
RateLimiter limiter = 6;
Metrics metrics = 7;
Auth auth = 8;
}