use uint64 for replication lag from Patroni's member endpoint (#1893)

* use int64 for replication lag from Patroni's member endpoint
This commit is contained in:
Felix Kunde
2022-05-19 09:39:56 +02:00
committed by GitHub
parent 5dc963105c
commit 97be5ee1cb
4 changed files with 39 additions and 21 deletions
-9
View File
@@ -8,7 +8,6 @@ import (
"encoding/base64"
"encoding/hex"
"fmt"
"math"
"math/big"
"math/rand"
"reflect"
@@ -338,14 +337,6 @@ func Bool2Int(flag bool) int {
return 0
}
// Get int from IntOrString and return max int if string
func IntFromIntStr(intOrStr intstr.IntOrString) int {
if intOrStr.Type == 1 {
return math.MaxInt
}
return intOrStr.IntValue()
}
// MaxInt32 : Return maximum of two integers provided via pointers. If one value
// is not defined, return the other one. If both are not defined, result is also
// undefined, caller needs to check for that.