Added configuration to fail on a non-temporary error. This is reverting to the original behavior of the retry mechanism. However, this allows the user to opt to fail in a non-temporary error.
This commit is contained in:
parent
11db9daa3b
commit
a00eb4ff39
5 changed files with 137 additions and 91 deletions
5
util.go
5
util.go
|
@ -8,6 +8,8 @@ import (
|
|||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
const apiPath = "/api"
|
||||
|
||||
var ActiveStates = make(map[aurora.ScheduleStatus]bool)
|
||||
var SlaveAssignedStates = make(map[aurora.ScheduleStatus]bool)
|
||||
var LiveStates = make(map[aurora.ScheduleStatus]bool)
|
||||
|
@ -67,7 +69,8 @@ func validateAuroraURL(urlStr string) (string, error) {
|
|||
return "", errors.Errorf("only protocols http and https are supported %v\n", u.Scheme)
|
||||
}
|
||||
|
||||
if u.Path != APIPath {
|
||||
// This could theoretically be elsewhwere but we'll be strict for the sake of simplicty
|
||||
if u.Path != apiPath {
|
||||
return "", errors.Errorf("expected /api path %v\n", u.Path)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue