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

Unified Diff: common/tsmon/monitor/pubsub.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 side-by-side diff with in-line comments
Download patch
Index: common/tsmon/monitor/pubsub.go
diff --git a/common/tsmon/monitor/pubsub.go b/common/tsmon/monitor/pubsub.go
index 7345924c8efde41c8be5ba083547c472e8cd7cff..a08bf7e738486d3304d2ea7c428967e8adf1845b 100644
--- a/common/tsmon/monitor/pubsub.go
+++ b/common/tsmon/monitor/pubsub.go
@@ -7,10 +7,10 @@ package monitor
import (
"net/http"
+ "cloud.google.com/go/pubsub"
"github.com/golang/protobuf/proto"
"golang.org/x/net/context"
- "google.golang.org/cloud"
- "google.golang.org/cloud/pubsub"
+ "google.golang.org/api/option"
gcps "github.com/luci/luci-go/common/gcloud/pubsub"
"github.com/luci/luci-go/common/logging"
@@ -29,7 +29,7 @@ type pubSubMonitor struct {
func NewPubsubMonitor(ctx context.Context, client *http.Client, topic gcps.Topic) (Monitor, error) {
project, name := topic.Split()
- psClient, err := pubsub.NewClient(ctx, project, cloud.WithBaseHTTP(client))
+ psClient, err := pubsub.NewClient(ctx, project, option.WithHTTPClient(client))
if err != nil {
return nil, err
}

Powered by Google App Engine
This is Rietveld 408576698