]> git.giacomolli.uk - onehouse/blobdiff - driver/alamo/http_client.go
Share the Alamo gateway request budget
[onehouse] / driver / alamo / http_client.go
index ac00dfc67fad978effb5b41cb08dea674c0a3e46..717912402c8f306cde39ac2031f5c66755ae06dd 100644 (file)
@@ -14,8 +14,8 @@ import (
 )
 
 const (
 )
 
 const (
-       gatewayRequestTimeout = 5 * time.Second
-       gatewayResponseLimit  = 64 * 1024
+       httpRequestTimeout   = 5 * time.Second
+       gatewayResponseLimit = 64 * 1024
 )
 
 // HTTPClient exchanges bounded GET requests with one HTTP gateway origin. Each
 )
 
 // HTTPClient exchanges bounded GET requests with one HTTP gateway origin. Each
@@ -96,7 +96,7 @@ func (c *HTTPClient) Action(ctx context.Context, mac string, action Action) (Sta
 }
 
 func (c *HTTPClient) exchange(ctx context.Context, path string, query url.Values) (states []State, err error) {
 }
 
 func (c *HTTPClient) exchange(ctx context.Context, path string, query url.Values) (states []State, err error) {
-       ctx, cancel := context.WithTimeout(ctx, gatewayRequestTimeout)
+       ctx, cancel := context.WithTimeout(ctx, httpRequestTimeout)
        defer cancel()
 
        address := c.origin + path
        defer cancel()
 
        address := c.origin + path