feat grpc模块

This commit is contained in:
2026-01-19 10:53:13 +08:00
parent 22d48542a8
commit a47557920c
3 changed files with 47 additions and 10 deletions

View File

@@ -53,11 +53,7 @@ type RedisConfig struct {
}
type ServeConfig struct {
Grpc *struct {
Address string `yaml:"address"`
Port int32 `yaml:"port"`
TTL int64 `yaml:"ttl"`
} `yaml:"grpc"`
Grpc *GrpcConfig `yaml:"grpc"`
Socket *struct {
Web *AddressConfig `yaml:"web"`
Raw *AddressConfig `yaml:"raw"`
@@ -65,6 +61,12 @@ type ServeConfig struct {
Http *AddressConfig `yaml:"http"`
}
type GrpcConfig struct {
Address string `yaml:"address"`
Port int32 `yaml:"port"`
TTL int64 `yaml:"ttl"`
}
type AddressConfig struct {
Address string `yaml:"address"`
Port int32 `yaml:"port"`