mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
Final changes to config sub-system (#8600)
- Introduces changes such as certain types of errors that can be ignored or which need to go into safe mode. - Update help text as per the review
This commit is contained in:
committed by
kannappanr
parent
794eb54da8
commit
c9940d8c3f
@@ -58,8 +58,8 @@ const (
|
||||
var (
|
||||
DefaultKVS = config.KVS{
|
||||
config.KV{
|
||||
Key: config.State,
|
||||
Value: config.StateOff,
|
||||
Key: config.Enable,
|
||||
Value: config.EnableOff,
|
||||
},
|
||||
config.KV{
|
||||
Key: Endpoint,
|
||||
@@ -72,8 +72,8 @@ var (
|
||||
}
|
||||
DefaultAuditKVS = config.KVS{
|
||||
config.KV{
|
||||
Key: config.State,
|
||||
Value: config.StateOff,
|
||||
Key: config.Enable,
|
||||
Value: config.EnableOff,
|
||||
},
|
||||
config.KV{
|
||||
Key: Endpoint,
|
||||
@@ -153,7 +153,7 @@ func LookupConfig(scfg config.Config) (Config, error) {
|
||||
return cfg, err
|
||||
}
|
||||
|
||||
enabled, err := config.ParseBool(kv.Get(config.State))
|
||||
enabled, err := config.ParseBool(kv.Get(config.Enable))
|
||||
if err != nil {
|
||||
return cfg, err
|
||||
}
|
||||
@@ -185,7 +185,7 @@ func LookupConfig(scfg config.Config) (Config, error) {
|
||||
return cfg, err
|
||||
}
|
||||
|
||||
enabled, err := config.ParseBool(kv.Get(config.State))
|
||||
enabled, err := config.ParseBool(kv.Get(config.Enable))
|
||||
if err != nil {
|
||||
return cfg, err
|
||||
}
|
||||
|
||||
@@ -23,18 +23,18 @@ var (
|
||||
Help = config.HelpKVS{
|
||||
config.HelpKV{
|
||||
Key: Endpoint,
|
||||
Description: `HTTP logger endpoint eg: "http://localhost:8080/minio/logs/server"`,
|
||||
Description: `HTTP logger endpoint e.g. "http://localhost:8080/minio/logs/server"`,
|
||||
Type: "url",
|
||||
},
|
||||
config.HelpKV{
|
||||
Key: AuthToken,
|
||||
Description: "Authorization token for logger endpoint",
|
||||
Description: "authorization token for logger endpoint",
|
||||
Optional: true,
|
||||
Type: "string",
|
||||
},
|
||||
config.HelpKV{
|
||||
Key: config.Comment,
|
||||
Description: "A comment to describe the HTTP logger setting",
|
||||
Description: config.DefaultComment,
|
||||
Optional: true,
|
||||
Type: "sentence",
|
||||
},
|
||||
@@ -43,18 +43,18 @@ var (
|
||||
HelpAudit = config.HelpKVS{
|
||||
config.HelpKV{
|
||||
Key: Endpoint,
|
||||
Description: `HTTP Audit logger endpoint eg: "http://localhost:8080/minio/logs/audit"`,
|
||||
Description: `HTTP Audit logger endpoint e.g. "http://localhost:8080/minio/logs/audit"`,
|
||||
Type: "url",
|
||||
},
|
||||
config.HelpKV{
|
||||
Key: AuthToken,
|
||||
Description: "Authorization token for logger endpoint",
|
||||
Description: "authorization token for audit logger endpoint",
|
||||
Optional: true,
|
||||
Type: "string",
|
||||
},
|
||||
config.HelpKV{
|
||||
Key: config.Comment,
|
||||
Description: "A comment to describe the HTTP Audit logger setting",
|
||||
Description: config.DefaultComment,
|
||||
Optional: true,
|
||||
Type: "sentence",
|
||||
},
|
||||
|
||||
@@ -31,8 +31,8 @@ func SetLoggerHTTPAudit(scfg config.Config, k string, args HTTP) {
|
||||
}
|
||||
scfg[config.AuditWebhookSubSys][k] = config.KVS{
|
||||
config.KV{
|
||||
Key: config.State,
|
||||
Value: config.StateOn,
|
||||
Key: config.Enable,
|
||||
Value: config.EnableOn,
|
||||
},
|
||||
config.KV{
|
||||
Key: Endpoint,
|
||||
@@ -54,8 +54,8 @@ func SetLoggerHTTP(scfg config.Config, k string, args HTTP) {
|
||||
|
||||
scfg[config.LoggerWebhookSubSys][k] = config.KVS{
|
||||
config.KV{
|
||||
Key: config.State,
|
||||
Value: config.StateOn,
|
||||
Key: config.Enable,
|
||||
Value: config.EnableOn,
|
||||
},
|
||||
config.KV{
|
||||
Key: Endpoint,
|
||||
|
||||
Reference in New Issue
Block a user