Changing the signature for some API. Specifically, result objects that hold a single variable are now returning that variable instead of a result object. Tests have been refcatored to use new v2 API. All tests are currently passing.
This commit is contained in:
parent
59e3a7065e
commit
54378b2d8a
4 changed files with 178 additions and 172 deletions
37
util.go
Normal file
37
util.go
Normal file
|
@ -0,0 +1,37 @@
|
|||
package realis
|
||||
|
||||
import (
|
||||
"github.com/paypal/gorealis/gen-go/apache/aurora"
|
||||
)
|
||||
|
||||
var ActiveStates = make(map[aurora.ScheduleStatus]bool)
|
||||
var SlaveAssignedStates = make(map[aurora.ScheduleStatus]bool)
|
||||
var LiveStates = make(map[aurora.ScheduleStatus]bool)
|
||||
var TerminalStates = make(map[aurora.ScheduleStatus]bool)
|
||||
var ActiveJobUpdateStates = make(map[aurora.JobUpdateStatus]bool)
|
||||
var AwaitingPulseJobUpdateStates = make(map[aurora.JobUpdateStatus]bool)
|
||||
|
||||
func init() {
|
||||
for _, status := range aurora.ACTIVE_STATES {
|
||||
ActiveStates[status] = true
|
||||
}
|
||||
|
||||
for _, status := range aurora.SLAVE_ASSIGNED_STATES {
|
||||
SlaveAssignedStates[status] = true
|
||||
}
|
||||
|
||||
for _, status := range aurora.LIVE_STATES {
|
||||
LiveStates[status] = true
|
||||
}
|
||||
|
||||
for _, status := range aurora.TERMINAL_STATES {
|
||||
TerminalStates[status] = true
|
||||
}
|
||||
|
||||
for _, status := range aurora.ACTIVE_JOB_UPDATE_STATES {
|
||||
ActiveJobUpdateStates[status] = true
|
||||
}
|
||||
for _, status := range aurora.AWAITNG_PULSE_JOB_UPDATE_STATES {
|
||||
AwaitingPulseJobUpdateStates[status] = true
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue