mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-08 20:07:51 +00:00
remove unused NodeID method on InternalClient
This commit is contained in:
parent
bba472f012
commit
b3f529cb1b
1 changed files with 0 additions and 25 deletions
25
client.go
25
client.go
|
|
@ -1142,30 +1142,6 @@ func (c *InternalHTTPClient) clientURI(ctx context.Context) *URI {
|
|||
return clientURI
|
||||
}
|
||||
|
||||
func (c *InternalHTTPClient) NodeID(uri *URI) (string, error) {
|
||||
u := uriPathToURL(uri, "/id")
|
||||
req, err := http.NewRequest("GET", u.String(), nil)
|
||||
resp, err := c.HTTPClient.Do(req)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("executing http request: %v", err)
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
// Read body.
|
||||
body, err := ioutil.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("reading response body: %v", err)
|
||||
}
|
||||
|
||||
// Return error if status is not OK.
|
||||
switch resp.StatusCode {
|
||||
case http.StatusOK: // ok
|
||||
default:
|
||||
return "", fmt.Errorf("unexpected response status code: %d: %s", resp.StatusCode, body)
|
||||
}
|
||||
return string(body), nil
|
||||
}
|
||||
|
||||
// Bit represents the location of a single bit.
|
||||
type Bit struct {
|
||||
RowID uint64
|
||||
|
|
@ -1362,5 +1338,4 @@ type InternalClient interface {
|
|||
ColumnAttrDiff(ctx context.Context, index string, blks []AttrBlock) (map[uint64]map[string]interface{}, error)
|
||||
RowAttrDiff(ctx context.Context, index, frame string, blks []AttrBlock) (map[uint64]map[string]interface{}, error)
|
||||
SendMessage(ctx context.Context, pb proto.Message) error
|
||||
NodeID(uri *URI) (string, error)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue