docker匿名Token缓存
This commit is contained in:
@@ -47,6 +47,12 @@ type AppConfig struct {
|
||||
|
||||
// 新增:Registry映射配置
|
||||
Registries map[string]RegistryMapping `toml:"registries"`
|
||||
|
||||
// Token缓存配置
|
||||
TokenCache struct {
|
||||
Enabled bool `toml:"enabled"` // 是否启用token缓存
|
||||
DefaultTTL string `toml:"defaultTTL"` // 默认缓存时间
|
||||
} `toml:"tokenCache"`
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -118,6 +124,13 @@ func DefaultConfig() *AppConfig {
|
||||
Enabled: true,
|
||||
},
|
||||
},
|
||||
TokenCache: struct {
|
||||
Enabled bool `toml:"enabled"`
|
||||
DefaultTTL string `toml:"defaultTTL"`
|
||||
}{
|
||||
Enabled: true, // docker认证的匿名Token缓存配置,用于提升性能
|
||||
DefaultTTL: "20m",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user