mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-10 04:47:53 +00:00
remove last vestiges of passing URI via context
this chould be safe as context.WithValue doesn't seem to appear anywhere else in Pilosa
This commit is contained in:
parent
2738c92286
commit
420631e748
1 changed files with 1 additions and 11 deletions
12
client.go
12
client.go
|
|
@ -88,7 +88,7 @@ func (c *InternalHTTPClient) MaxInverseSliceByIndex(ctx context.Context) (map[st
|
|||
// maxSliceByIndex returns the number of slices on a server by index.
|
||||
func (c *InternalHTTPClient) maxSliceByIndex(ctx context.Context, inverse bool) (map[string]uint64, error) {
|
||||
// Execute request against the host.
|
||||
u := uriPathToURL(c.clientURI(ctx), "/slices/max")
|
||||
u := uriPathToURL(c.defaultURI, "/slices/max")
|
||||
|
||||
// Build request.
|
||||
req, err := http.NewRequest("GET", u.String(), nil)
|
||||
|
|
@ -1137,16 +1137,6 @@ func (c *InternalHTTPClient) SendMessage(ctx context.Context, uri *URI, pb proto
|
|||
return nil
|
||||
}
|
||||
|
||||
func (c *InternalHTTPClient) clientURI(ctx context.Context) *URI {
|
||||
clientURI := c.defaultURI
|
||||
if contextURI, ok := ctx.Value("uri").(*URI); ok {
|
||||
clientURI = contextURI
|
||||
} else if contextURI, ok := ctx.Value("uri").(URI); ok {
|
||||
clientURI = &contextURI
|
||||
}
|
||||
return clientURI
|
||||
}
|
||||
|
||||
// Bit represents the location of a single bit.
|
||||
type Bit struct {
|
||||
RowID uint64
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue