Update quobyte client API to v0.1.8
This update picks up https://github.com/quobyte/api/pull/19 which adds the needed `SetTransport` option. With this update, we can add the IP deny list into quobyte operations.
This commit is contained in:
8
vendor/github.com/quobyte/api/rpc_client.go
generated
vendored
8
vendor/github.com/quobyte/api/rpc_client.go
generated
vendored
@@ -4,6 +4,7 @@ import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"math/rand"
|
||||
@@ -112,7 +113,12 @@ func (client QuobyteClient) sendRequest(method string, request interface{}, resp
|
||||
defer resp.Body.Close()
|
||||
|
||||
if resp.StatusCode < 200 || resp.StatusCode > 299 {
|
||||
log.Printf("Warning: HTTP status code for request is %s\n", strconv.Itoa(resp.StatusCode))
|
||||
log.Printf("Warning: HTTP status code for request is %s\n",
|
||||
strconv.Itoa(resp.StatusCode))
|
||||
if resp.StatusCode == 401 {
|
||||
return errors.New("Unable to authenticate with Quobyte API service")
|
||||
}
|
||||
return fmt.Errorf("JsonRPC failed with error code %d", resp.StatusCode)
|
||||
}
|
||||
return decodeResponse(resp.Body, &response)
|
||||
}
|
||||
|
Reference in New Issue
Block a user