Update Quobyte API

This commit is contained in:
Venkata Subbarao Chunduri
2017-10-26 15:09:37 +02:00
parent 58fd063a6c
commit d5778398e2
5 changed files with 133 additions and 21 deletions

View File

@@ -7,6 +7,7 @@ import (
"io"
"math/rand"
"net/http"
"reflect"
"strconv"
)
@@ -88,6 +89,11 @@ func decodeResponse(ioReader io.Reader, reply interface{}) error {
}
func (client QuobyteClient) sendRequest(method string, request interface{}, response interface{}) error {
etype := reflect.ValueOf(request).Elem()
field := etype.FieldByName("RetryPolicy")
if field.IsValid() {
field.SetString(client.GetAPIRetryPolicy())
}
message, err := encodeRequest(method, request)
if err != nil {
return err