Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(319)

Side by Side Diff: client/isolatedclient/isolatedclient.go

Issue 1159563002: Move retry and lhttp packages from client/internal to common/. (Closed) Base URL: git@github.com:luci/luci-go@master
Patch Set: move-retry-http Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « client/internal/retry/retry_test.go ('k') | client/swarming/swarming.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package isolatedclient 5 package isolatedclient
6 6
7 import ( 7 import (
8 "errors" 8 "errors"
9 "io" 9 "io"
10 "io/ioutil" 10 "io/ioutil"
11 "net/http" 11 "net/http"
12 "strconv" 12 "strconv"
13 "strings" 13 "strings"
14 14
15 "github.com/luci/luci-go/client/internal/lhttp"
16 "github.com/luci/luci-go/client/internal/retry"
17 "github.com/luci/luci-go/client/internal/tracer" 15 "github.com/luci/luci-go/client/internal/tracer"
18 "github.com/luci/luci-go/common/isolated" 16 "github.com/luci/luci-go/common/isolated"
17 "github.com/luci/luci-go/common/lhttp"
18 "github.com/luci/luci-go/common/retry"
19 ) 19 )
20 20
21 // IsolateServer is the low-level client interface to interact with an Isolate 21 // IsolateServer is the low-level client interface to interact with an Isolate
22 // server. 22 // server.
23 type IsolateServer interface { 23 type IsolateServer interface {
24 ServerCapabilities() (*isolated.ServerCapabilities, error) 24 ServerCapabilities() (*isolated.ServerCapabilities, error)
25 // Contains looks up cache presence on the server of multiple items. 25 // Contains looks up cache presence on the server of multiple items.
26 // 26 //
27 // The returned list is in the same order as 'items', with entries nil f or 27 // The returned list is in the same order as 'items', with entries nil f or
28 // items that were present. 28 // items that were present.
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 // TODO(maruel): For relatively small file, set request.ContentLength so the 164 // TODO(maruel): For relatively small file, set request.ContentLength so the
165 // TCP connection can be reused. 165 // TCP connection can be reused.
166 resp, err6 := client.Do(request) 166 resp, err6 := client.Do(request)
167 if err6 != nil { 167 if err6 != nil {
168 return err6 168 return err6
169 } 169 }
170 _, err = io.Copy(ioutil.Discard, resp.Body) 170 _, err = io.Copy(ioutil.Discard, resp.Body)
171 _ = resp.Body.Close() 171 _ = resp.Body.Close()
172 return 172 return
173 } 173 }
OLDNEW
« no previous file with comments | « client/internal/retry/retry_test.go ('k') | client/swarming/swarming.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698