mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-19 15:31:37 +02:00
fixed healthchecker start even if disabled, simplified label parsing
This commit is contained in:
@@ -19,8 +19,6 @@ type Entry interface {
|
||||
}
|
||||
|
||||
func ValidateEntry(m *RawEntry) (Entry, E.Error) {
|
||||
m.FillMissingFields()
|
||||
|
||||
scheme, err := T.NewScheme(m.Scheme)
|
||||
if err != nil {
|
||||
return nil, E.From(err)
|
||||
@@ -36,6 +34,9 @@ func ValidateEntry(m *RawEntry) (Entry, E.Error) {
|
||||
if errs.HasError() {
|
||||
return nil, errs.Error()
|
||||
}
|
||||
if !UseHealthCheck(entry) && (UseLoadBalance(entry) || UseIdleWatcher(entry)) {
|
||||
return nil, E.New("healthCheck.disable cannot be true when loadbalancer or idlewatcher is enabled")
|
||||
}
|
||||
return entry, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user