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

Side by Side Diff: common/cloudlogging/client.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 cloudlogging 5 package cloudlogging
6 6
7 import ( 7 import (
8 "errors" 8 "errors"
9 "flag" 9 "flag"
10 "fmt" 10 "fmt"
11 "net/http" 11 "net/http"
12 "os" 12 "os"
13 13
14 "cloud.google.com/go/compute/metadata"
14 cloudlog "google.golang.org/api/logging/v1beta3" 15 cloudlog "google.golang.org/api/logging/v1beta3"
15 "google.golang.org/cloud/compute/metadata"
16 ) 16 )
17 17
18 // DefaultResourceType is used by NewClient if ClientOptions doesn't specify 18 // DefaultResourceType is used by NewClient if ClientOptions doesn't specify
19 // ResourceType. 19 // ResourceType.
20 const ( 20 const (
21 // GCEService is service name for GCE instances. 21 // GCEService is service name for GCE instances.
22 GCEService = "compute.googleapis.com" 22 GCEService = "compute.googleapis.com"
23 23
24 // DefaultResourceType is used as the ResourceType value if Options does n't 24 // DefaultResourceType is used as the ResourceType value if Options does n't
25 // specify a ResourceType. 25 // specify a ResourceType.
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 c.writeError(err.Error()) 216 c.writeError(err.Error())
217 } 217 }
218 return err 218 return err
219 } 219 }
220 220
221 func (c *clientImpl) writeError(f string, args ...interface{}) { 221 func (c *clientImpl) writeError(f string, args ...interface{}) {
222 if c.ErrorWriter != nil { 222 if c.ErrorWriter != nil {
223 c.ErrorWriter(fmt.Sprintf(f, args...)) 223 c.ErrorWriter(fmt.Sprintf(f, args...))
224 } 224 }
225 } 225 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698