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

Side by Side Diff: client/swarming/swarming.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/isolatedclient/isolatedclient.go ('k') | common/lhttp/client.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 swarming 5 package swarming
6 6
7 import ( 7 import (
8 "errors" 8 "errors"
9 "net/http" 9 "net/http"
10 "strings" 10 "strings"
11 "time" 11 "time"
12 12
13 » "github.com/luci/luci-go/client/internal/lhttp" 13 » "github.com/luci/luci-go/common/lhttp"
14 » "github.com/luci/luci-go/client/internal/retry" 14 » "github.com/luci/luci-go/common/retry"
15 ) 15 )
16 16
17 // TaskID is a unique reference to a Swarming task. 17 // TaskID is a unique reference to a Swarming task.
18 type TaskID string 18 type TaskID string
19 19
20 // Swarming defines a Swarming client. 20 // Swarming defines a Swarming client.
21 type Swarming struct { 21 type Swarming struct {
22 host string 22 host string
23 } 23 }
24 24
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 User string `json:"user"` 90 User string `json:"user"`
91 } 91 }
92 92
93 // Duration returns the total duration of a task. 93 // Duration returns the total duration of a task.
94 func (s *TaskResult) Duration() (out time.Duration) { 94 func (s *TaskResult) Duration() (out time.Duration) {
95 for _, d := range s.Durations { 95 for _, d := range s.Durations {
96 out += time.Duration(d) * time.Second 96 out += time.Duration(d) * time.Second
97 } 97 }
98 return 98 return
99 } 99 }
OLDNEW
« no previous file with comments | « client/isolatedclient/isolatedclient.go ('k') | common/lhttp/client.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698