Chromium Code Reviews| 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 |
| } |