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

Side by Side Diff: common/gcloud/gs/writer.go

Issue 2219023003: Update APIs to use new Google cloud paths. (Closed) Base URL: https://github.com/luci/luci-go@master
Patch Set: Created 4 years, 4 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
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698