OLD | NEW |
1 // Copyright 2015 The LUCI Authors. All rights reserved. | 1 // Copyright 2015 The LUCI Authors. All rights reserved. |
2 // Use of this source code is governed under the Apache License, Version 2.0 | 2 // Use of this source code is governed under the Apache License, Version 2.0 |
3 // that can be found in the LICENSE file. | 3 // that can be found in the LICENSE file. |
4 | 4 |
5 package gs | 5 package gs |
6 | 6 |
7 import ( | 7 import ( |
8 "io" | 8 "io" |
9 "time" | 9 "time" |
10 | 10 |
| 11 gs "cloud.google.com/go/storage" |
11 "github.com/luci/luci-go/common/errors" | 12 "github.com/luci/luci-go/common/errors" |
12 log "github.com/luci/luci-go/common/logging" | 13 log "github.com/luci/luci-go/common/logging" |
13 "github.com/luci/luci-go/common/retry" | 14 "github.com/luci/luci-go/common/retry" |
14 "golang.org/x/net/context" | 15 "golang.org/x/net/context" |
15 gs "google.golang.org/cloud/storage" | |
16 ) | 16 ) |
17 | 17 |
18 // Writer is an augmented io.WriteCloser instance. | 18 // Writer is an augmented io.WriteCloser instance. |
19 type Writer interface { | 19 type Writer interface { |
20 io.WriteCloser | 20 io.WriteCloser |
21 | 21 |
22 // Count returns the number of bytes written by the object. | 22 // Count returns the number of bytes written by the object. |
23 Count() int64 | 23 Count() int64 |
24 } | 24 } |
25 | 25 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 "delay": d, | 74 "delay": d, |
75 "bucket": w.bucket, | 75 "bucket": w.bucket, |
76 "path": w.relpath, | 76 "path": w.relpath, |
77 }.Warningf(w, "Transient error closing GS Writer. Retryi
ng...") | 77 }.Warningf(w, "Transient error closing GS Writer. Retryi
ng...") |
78 }) | 78 }) |
79 } | 79 } |
80 | 80 |
81 func (w *prodWriter) Count() int64 { | 81 func (w *prodWriter) Count() int64 { |
82 return w.count | 82 return w.count |
83 } | 83 } |
OLD | NEW |