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

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

Issue 1838303002: Use native Pub/Sub library primitives. (Closed) Base URL: https://github.com/luci/luci-go@logdog-go1.6
Patch Set: Use "Topic" instead of "NewTopic" ... don't want to create :) Created 4 years, 9 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
« no previous file with comments | « common/gcloud/pubsub/ackbuffer/ackbuffer_test.go ('k') | common/gcloud/pubsub/connection_impl.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: common/gcloud/pubsub/connection.go
diff --git a/common/gcloud/pubsub/connection.go b/common/gcloud/pubsub/connection.go
deleted file mode 100644
index 305251913662c11488c76762086e5fb50bd76b09..0000000000000000000000000000000000000000
--- a/common/gcloud/pubsub/connection.go
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-package pubsub
-
-import (
- "golang.org/x/net/context"
- "google.golang.org/cloud/pubsub"
-)
-
-var (
- // PublisherScopes is the set of OAuth2 scopes needed for a publisher to
- // publish messages.
- PublisherScopes = []string{
- pubsub.ScopePubSub,
- }
-
- // SubscriberScopes is the set of OAuth2 scopes needed for a subscriber to
- // pull and acknowledge messages.
- SubscriberScopes = []string{
- pubsub.ScopePubSub,
- }
-)
-
-// Connection is an interface to a Pub/Sub connection.
-//
-// Any method may return an errors.TransientError to indicate that the
-// encountered error was transient.
-type Connection interface {
- // TopicExists tests if a given Topic exists.
- TopicExists(context.Context, Topic) (bool, error)
-
- // SubscriptionExists tests if a given Subscription exists.
- SubExists(context.Context, Subscription) (bool, error)
-
- // Publish publishes a batch of Pub/Sub messages.
- Publish(context.Context, Topic, ...*Message) ([]string, error)
-
- // Pull pulls messages from the subscription. It returns up the requested
- // number of messages.
- Pull(context.Context, Subscription, int) ([]*Message, error)
-
- // Ack acknowledges one or more Pub/Sub message ACK IDs.
- Ack(context.Context, Subscription, ...string) error
-}
« no previous file with comments | « common/gcloud/pubsub/ackbuffer/ackbuffer_test.go ('k') | common/gcloud/pubsub/connection_impl.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698