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

Unified Diff: common/gcloud/gcps/pubsub.go

Issue 1610993002: LogDog: Add collector service implementation. (Closed) Base URL: https://github.com/luci/luci-go@master
Patch Set: Created 4 years, 11 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/gcloud/gcps/pubsub.go
diff --git a/common/gcloud/gcps/pubsub.go b/common/gcloud/gcps/pubsub.go
index 1e713b0cc04fce8481c25d922705ab108751c1f5..bb92b6620cf6bd5b51df87f5d0e962c43d9bccc5 100644
--- a/common/gcloud/gcps/pubsub.go
+++ b/common/gcloud/gcps/pubsub.go
@@ -5,6 +5,7 @@
package gcps
import (
+ "golang.org/x/net/context"
"google.golang.org/cloud/pubsub"
)
@@ -28,18 +29,18 @@ var (
// encountered error was transient.
type PubSub interface {
// TopicExists tests if a given Topic exists.
- TopicExists(Topic) (bool, error)
+ TopicExists(context.Context, Topic) (bool, error)
dnj (Google) 2016/01/21 04:36:24 All methods take context.Context now. This is beca
// SubscriptionExists tests if a given Subscription exists.
- SubExists(Subscription) (bool, error)
+ SubExists(context.Context, Subscription) (bool, error)
// Publish publishes a batch of Pub/Sub messages.
- Publish(Topic, ...*pubsub.Message) ([]string, error)
+ Publish(context.Context, Topic, ...*pubsub.Message) ([]string, error)
// Pull pulls messages from the subscription. It returns up the requested
// number of messages.
- Pull(Subscription, int) ([]*pubsub.Message, error)
+ Pull(context.Context, Subscription, int) ([]*pubsub.Message, error)
// Ack acknowledges one or more Pub/Sub message ACK IDs.
- Ack(Subscription, ...string) error
+ Ack(context.Context, Subscription, ...string) error
}

Powered by Google App Engine
This is Rietveld 408576698