pubsub

package
v0.0.0-...-2824937 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2020 License: MIT, Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package pubsub is a generated protocol buffer package.

It is generated from these files:

google/pubsub/v1/pubsub.proto

It has these top-level messages:

Topic
PubsubMessage
GetTopicRequest
UpdateTopicRequest
PublishRequest
PublishResponse
ListTopicsRequest
ListTopicsResponse
ListTopicSubscriptionsRequest
ListTopicSubscriptionsResponse
DeleteTopicRequest
Subscription
PushConfig
ReceivedMessage
GetSubscriptionRequest
UpdateSubscriptionRequest
ListSubscriptionsRequest
ListSubscriptionsResponse
DeleteSubscriptionRequest
ModifyPushConfigRequest
PullRequest
PullResponse
ModifyAckDeadlineRequest
AcknowledgeRequest
StreamingPullRequest
StreamingPullResponse
CreateSnapshotRequest
UpdateSnapshotRequest
Snapshot
ListSnapshotsRequest
ListSnapshotsResponse
DeleteSnapshotRequest
SeekRequest
SeekResponse

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterPublisherServer

func RegisterPublisherServer(s *grpc.Server, srv PublisherServer)

func RegisterSubscriberServer

func RegisterSubscriberServer(s *grpc.Server, srv SubscriberServer)

Types

type AcknowledgeRequest

type AcknowledgeRequest struct {
	// The subscription whose message is being acknowledged.
	// Format is `projects/{project}/subscriptions/{sub}`.
	Subscription string `protobuf:"bytes,1,opt,name=subscription" json:"subscription,omitempty"`
	// The acknowledgment ID for the messages being acknowledged that was returned
	// by the Pub/Sub system in the `Pull` response. Must not be empty.
	AckIds []string `protobuf:"bytes,2,rep,name=ack_ids,json=ackIds" json:"ack_ids,omitempty"`
}

Request for the Acknowledge method.

func (*AcknowledgeRequest) Descriptor

func (*AcknowledgeRequest) Descriptor() ([]byte, []int)

func (*AcknowledgeRequest) GetAckIds

func (m *AcknowledgeRequest) GetAckIds() []string

func (*AcknowledgeRequest) GetSubscription

func (m *AcknowledgeRequest) GetSubscription() string

func (*AcknowledgeRequest) ProtoMessage

func (*AcknowledgeRequest) ProtoMessage()

func (*AcknowledgeRequest) Reset

func (m *AcknowledgeRequest) Reset()

func (*AcknowledgeRequest) String

func (m *AcknowledgeRequest) String() string

type CreateSnapshotRequest

type CreateSnapshotRequest struct {
	// Optional user-provided name for this snapshot.
	// If the name is not provided in the request, the server will assign a random
	// name for this snapshot on the same project as the subscription.
	// Note that for REST API requests, you must specify a name.
	// Format is `projects/{project}/snapshots/{snap}`.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// The subscription whose backlog the snapshot retains.
	// Specifically, the created snapshot is guaranteed to retain:
	//  (a) The existing backlog on the subscription. More precisely, this is
	//      defined as the messages in the subscription's backlog that are
	//      unacknowledged upon the successful completion of the
	//      `CreateSnapshot` request; as well as:
	//  (b) Any messages published to the subscription's topic following the
	//      successful completion of the CreateSnapshot request.
	// Format is `projects/{project}/subscriptions/{sub}`.
	Subscription string `protobuf:"bytes,2,opt,name=subscription" json:"subscription,omitempty"`
}

Request for the `CreateSnapshot` method.

func (*CreateSnapshotRequest) Descriptor

func (*CreateSnapshotRequest) Descriptor() ([]byte, []int)

func (*CreateSnapshotRequest) GetName

func (m *CreateSnapshotRequest) GetName() string

func (*CreateSnapshotRequest) GetSubscription

func (m *CreateSnapshotRequest) GetSubscription() string

func (*CreateSnapshotRequest) ProtoMessage

func (*CreateSnapshotRequest) ProtoMessage()

func (*CreateSnapshotRequest) Reset

func (m *CreateSnapshotRequest) Reset()

func (*CreateSnapshotRequest) String

func (m *CreateSnapshotRequest) String() string

type DeleteSnapshotRequest

type DeleteSnapshotRequest struct {
	// The name of the snapshot to delete.
	// Format is `projects/{project}/snapshots/{snap}`.
	Snapshot string `protobuf:"bytes,1,opt,name=snapshot" json:"snapshot,omitempty"`
}

Request for the `DeleteSnapshot` method.

func (*DeleteSnapshotRequest) Descriptor

func (*DeleteSnapshotRequest) Descriptor() ([]byte, []int)

func (*DeleteSnapshotRequest) GetSnapshot

func (m *DeleteSnapshotRequest) GetSnapshot() string

func (*DeleteSnapshotRequest) ProtoMessage

func (*DeleteSnapshotRequest) ProtoMessage()

func (*DeleteSnapshotRequest) Reset

func (m *DeleteSnapshotRequest) Reset()

func (*DeleteSnapshotRequest) String

func (m *DeleteSnapshotRequest) String() string

type DeleteSubscriptionRequest

type DeleteSubscriptionRequest struct {
	// The subscription to delete.
	// Format is `projects/{project}/subscriptions/{sub}`.
	Subscription string `protobuf:"bytes,1,opt,name=subscription" json:"subscription,omitempty"`
}

Request for the DeleteSubscription method.

func (*DeleteSubscriptionRequest) Descriptor

func (*DeleteSubscriptionRequest) Descriptor() ([]byte, []int)

func (*DeleteSubscriptionRequest) GetSubscription

func (m *DeleteSubscriptionRequest) GetSubscription() string

func (*DeleteSubscriptionRequest) ProtoMessage

func (*DeleteSubscriptionRequest) ProtoMessage()

func (*DeleteSubscriptionRequest) Reset

func (m *DeleteSubscriptionRequest) Reset()

func (*DeleteSubscriptionRequest) String

func (m *DeleteSubscriptionRequest) String() string

type DeleteTopicRequest

type DeleteTopicRequest struct {
	// Name of the topic to delete.
	// Format is `projects/{project}/topics/{topic}`.
	Topic string `protobuf:"bytes,1,opt,name=topic" json:"topic,omitempty"`
}

Request for the `DeleteTopic` method.

func (*DeleteTopicRequest) Descriptor

func (*DeleteTopicRequest) Descriptor() ([]byte, []int)

func (*DeleteTopicRequest) GetTopic

func (m *DeleteTopicRequest) GetTopic() string

func (*DeleteTopicRequest) ProtoMessage

func (*DeleteTopicRequest) ProtoMessage()

func (*DeleteTopicRequest) Reset

func (m *DeleteTopicRequest) Reset()

func (*DeleteTopicRequest) String

func (m *DeleteTopicRequest) String() string

type GetSubscriptionRequest

type GetSubscriptionRequest struct {
	// The name of the subscription to get.
	// Format is `projects/{project}/subscriptions/{sub}`.
	Subscription string `protobuf:"bytes,1,opt,name=subscription" json:"subscription,omitempty"`
}

Request for the GetSubscription method.

func (*GetSubscriptionRequest) Descriptor

func (*GetSubscriptionRequest) Descriptor() ([]byte, []int)

func (*GetSubscriptionRequest) GetSubscription

func (m *GetSubscriptionRequest) GetSubscription() string

func (*GetSubscriptionRequest) ProtoMessage

func (*GetSubscriptionRequest) ProtoMessage()

func (*GetSubscriptionRequest) Reset

func (m *GetSubscriptionRequest) Reset()

func (*GetSubscriptionRequest) String

func (m *GetSubscriptionRequest) String() string

type GetTopicRequest

type GetTopicRequest struct {
	// The name of the topic to get.
	// Format is `projects/{project}/topics/{topic}`.
	Topic string `protobuf:"bytes,1,opt,name=topic" json:"topic,omitempty"`
}

Request for the GetTopic method.

func (*GetTopicRequest) Descriptor

func (*GetTopicRequest) Descriptor() ([]byte, []int)

func (*GetTopicRequest) GetTopic

func (m *GetTopicRequest) GetTopic() string

func (*GetTopicRequest) ProtoMessage

func (*GetTopicRequest) ProtoMessage()

func (*GetTopicRequest) Reset

func (m *GetTopicRequest) Reset()

func (*GetTopicRequest) String

func (m *GetTopicRequest) String() string

type ListSnapshotsRequest

type ListSnapshotsRequest struct {
	// The name of the cloud project that snapshots belong to.
	// Format is `projects/{project}`.
	Project string `protobuf:"bytes,1,opt,name=project" json:"project,omitempty"`
	// Maximum number of snapshots to return.
	PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize" json:"page_size,omitempty"`
	// The value returned by the last `ListSnapshotsResponse`; indicates that this
	// is a continuation of a prior `ListSnapshots` call, and that the system
	// should return the next page of data.
	PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken" json:"page_token,omitempty"`
}

Request for the `ListSnapshots` method.

func (*ListSnapshotsRequest) Descriptor

func (*ListSnapshotsRequest) Descriptor() ([]byte, []int)

func (*ListSnapshotsRequest) GetPageSize

func (m *ListSnapshotsRequest) GetPageSize() int32

func (*ListSnapshotsRequest) GetPageToken

func (m *ListSnapshotsRequest) GetPageToken() string

func (*ListSnapshotsRequest) GetProject

func (m *ListSnapshotsRequest) GetProject() string

func (*ListSnapshotsRequest) ProtoMessage

func (*ListSnapshotsRequest) ProtoMessage()

func (*ListSnapshotsRequest) Reset

func (m *ListSnapshotsRequest) Reset()

func (*ListSnapshotsRequest) String

func (m *ListSnapshotsRequest) String() string

type ListSnapshotsResponse

type ListSnapshotsResponse struct {
	// The resulting snapshots.
	Snapshots []*Snapshot `protobuf:"bytes,1,rep,name=snapshots" json:"snapshots,omitempty"`
	// If not empty, indicates that there may be more snapshot that match the
	// request; this value should be passed in a new `ListSnapshotsRequest`.
	NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken" json:"next_page_token,omitempty"`
}

Response for the `ListSnapshots` method.

func (*ListSnapshotsResponse) Descriptor

func (*ListSnapshotsResponse) Descriptor() ([]byte, []int)

func (*ListSnapshotsResponse) GetNextPageToken

func (m *ListSnapshotsResponse) GetNextPageToken() string

func (*ListSnapshotsResponse) GetSnapshots

func (m *ListSnapshotsResponse) GetSnapshots() []*Snapshot

func (*ListSnapshotsResponse) ProtoMessage

func (*ListSnapshotsResponse) ProtoMessage()

func (*ListSnapshotsResponse) Reset

func (m *ListSnapshotsResponse) Reset()

func (*ListSnapshotsResponse) String

func (m *ListSnapshotsResponse) String() string

type ListSubscriptionsRequest

type ListSubscriptionsRequest struct {
	// The name of the cloud project that subscriptions belong to.
	// Format is `projects/{project}`.
	Project string `protobuf:"bytes,1,opt,name=project" json:"project,omitempty"`
	// Maximum number of subscriptions to return.
	PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize" json:"page_size,omitempty"`
	// The value returned by the last `ListSubscriptionsResponse`; indicates that
	// this is a continuation of a prior `ListSubscriptions` call, and that the
	// system should return the next page of data.
	PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken" json:"page_token,omitempty"`
}

Request for the `ListSubscriptions` method.

func (*ListSubscriptionsRequest) Descriptor

func (*ListSubscriptionsRequest) Descriptor() ([]byte, []int)

func (*ListSubscriptionsRequest) GetPageSize

func (m *ListSubscriptionsRequest) GetPageSize() int32

func (*ListSubscriptionsRequest) GetPageToken

func (m *ListSubscriptionsRequest) GetPageToken() string

func (*ListSubscriptionsRequest) GetProject

func (m *ListSubscriptionsRequest) GetProject() string

func (*ListSubscriptionsRequest) ProtoMessage

func (*ListSubscriptionsRequest) ProtoMessage()

func (*ListSubscriptionsRequest) Reset

func (m *ListSubscriptionsRequest) Reset()

func (*ListSubscriptionsRequest) String

func (m *ListSubscriptionsRequest) String() string

type ListSubscriptionsResponse

type ListSubscriptionsResponse struct {
	// The subscriptions that match the request.
	Subscriptions []*Subscription `protobuf:"bytes,1,rep,name=subscriptions" json:"subscriptions,omitempty"`
	// If not empty, indicates that there may be more subscriptions that match
	// the request; this value should be passed in a new
	// `ListSubscriptionsRequest` to get more subscriptions.
	NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken" json:"next_page_token,omitempty"`
}

Response for the `ListSubscriptions` method.

func (*ListSubscriptionsResponse) Descriptor

func (*ListSubscriptionsResponse) Descriptor() ([]byte, []int)

func (*ListSubscriptionsResponse) GetNextPageToken

func (m *ListSubscriptionsResponse) GetNextPageToken() string

func (*ListSubscriptionsResponse) GetSubscriptions

func (m *ListSubscriptionsResponse) GetSubscriptions() []*Subscription

func (*ListSubscriptionsResponse) ProtoMessage

func (*ListSubscriptionsResponse) ProtoMessage()

func (*ListSubscriptionsResponse) Reset

func (m *ListSubscriptionsResponse) Reset()

func (*ListSubscriptionsResponse) String

func (m *ListSubscriptionsResponse) String() string

type ListTopicSubscriptionsRequest

type ListTopicSubscriptionsRequest struct {
	// The name of the topic that subscriptions are attached to.
	// Format is `projects/{project}/topics/{topic}`.
	Topic string `protobuf:"bytes,1,opt,name=topic" json:"topic,omitempty"`
	// Maximum number of subscription names to return.
	PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize" json:"page_size,omitempty"`
	// The value returned by the last `ListTopicSubscriptionsResponse`; indicates
	// that this is a continuation of a prior `ListTopicSubscriptions` call, and
	// that the system should return the next page of data.
	PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken" json:"page_token,omitempty"`
}

Request for the `ListTopicSubscriptions` method.

func (*ListTopicSubscriptionsRequest) Descriptor

func (*ListTopicSubscriptionsRequest) Descriptor() ([]byte, []int)

func (*ListTopicSubscriptionsRequest) GetPageSize

func (m *ListTopicSubscriptionsRequest) GetPageSize() int32

func (*ListTopicSubscriptionsRequest) GetPageToken

func (m *ListTopicSubscriptionsRequest) GetPageToken() string

func (*ListTopicSubscriptionsRequest) GetTopic

func (m *ListTopicSubscriptionsRequest) GetTopic() string

func (*ListTopicSubscriptionsRequest) ProtoMessage

func (*ListTopicSubscriptionsRequest) ProtoMessage()

func (*ListTopicSubscriptionsRequest) Reset

func (m *ListTopicSubscriptionsRequest) Reset()

func (*ListTopicSubscriptionsRequest) String

type ListTopicSubscriptionsResponse

type ListTopicSubscriptionsResponse struct {
	// The names of the subscriptions that match the request.
	Subscriptions []string `protobuf:"bytes,1,rep,name=subscriptions" json:"subscriptions,omitempty"`
	// If not empty, indicates that there may be more subscriptions that match
	// the request; this value should be passed in a new
	// `ListTopicSubscriptionsRequest` to get more subscriptions.
	NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken" json:"next_page_token,omitempty"`
}

Response for the `ListTopicSubscriptions` method.

func (*ListTopicSubscriptionsResponse) Descriptor

func (*ListTopicSubscriptionsResponse) Descriptor() ([]byte, []int)

func (*ListTopicSubscriptionsResponse) GetNextPageToken

func (m *ListTopicSubscriptionsResponse) GetNextPageToken() string

func (*ListTopicSubscriptionsResponse) GetSubscriptions

func (m *ListTopicSubscriptionsResponse) GetSubscriptions() []string

func (*ListTopicSubscriptionsResponse) ProtoMessage

func (*ListTopicSubscriptionsResponse) ProtoMessage()

func (*ListTopicSubscriptionsResponse) Reset

func (m *ListTopicSubscriptionsResponse) Reset()

func (*ListTopicSubscriptionsResponse) String

type ListTopicsRequest

type ListTopicsRequest struct {
	// The name of the cloud project that topics belong to.
	// Format is `projects/{project}`.
	Project string `protobuf:"bytes,1,opt,name=project" json:"project,omitempty"`
	// Maximum number of topics to return.
	PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize" json:"page_size,omitempty"`
	// The value returned by the last `ListTopicsResponse`; indicates that this is
	// a continuation of a prior `ListTopics` call, and that the system should
	// return the next page of data.
	PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken" json:"page_token,omitempty"`
}

Request for the `ListTopics` method.

func (*ListTopicsRequest) Descriptor

func (*ListTopicsRequest) Descriptor() ([]byte, []int)

func (*ListTopicsRequest) GetPageSize

func (m *ListTopicsRequest) GetPageSize() int32

func (*ListTopicsRequest) GetPageToken

func (m *ListTopicsRequest) GetPageToken() string

func (*ListTopicsRequest) GetProject

func (m *ListTopicsRequest) GetProject() string

func (*ListTopicsRequest) ProtoMessage

func (*ListTopicsRequest) ProtoMessage()

func (*ListTopicsRequest) Reset

func (m *ListTopicsRequest) Reset()

func (*ListTopicsRequest) String

func (m *ListTopicsRequest) String() string

type ListTopicsResponse

type ListTopicsResponse struct {
	// The resulting topics.
	Topics []*Topic `protobuf:"bytes,1,rep,name=topics" json:"topics,omitempty"`
	// If not empty, indicates that there may be more topics that match the
	// request; this value should be passed in a new `ListTopicsRequest`.
	NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken" json:"next_page_token,omitempty"`
}

Response for the `ListTopics` method.

func (*ListTopicsResponse) Descriptor

func (*ListTopicsResponse) Descriptor() ([]byte, []int)

func (*ListTopicsResponse) GetNextPageToken

func (m *ListTopicsResponse) GetNextPageToken() string

func (*ListTopicsResponse) GetTopics

func (m *ListTopicsResponse) GetTopics() []*Topic

func (*ListTopicsResponse) ProtoMessage

func (*ListTopicsResponse) ProtoMessage()

func (*ListTopicsResponse) Reset

func (m *ListTopicsResponse) Reset()

func (*ListTopicsResponse) String

func (m *ListTopicsResponse) String() string

type ModifyAckDeadlineRequest

type ModifyAckDeadlineRequest struct {
	// The name of the subscription.
	// Format is `projects/{project}/subscriptions/{sub}`.
	Subscription string `protobuf:"bytes,1,opt,name=subscription" json:"subscription,omitempty"`
	// List of acknowledgment IDs.
	AckIds []string `protobuf:"bytes,4,rep,name=ack_ids,json=ackIds" json:"ack_ids,omitempty"`
	// The new ack deadline with respect to the time this request was sent to
	// the Pub/Sub system. For example, if the value is 10, the new
	// ack deadline will expire 10 seconds after the `ModifyAckDeadline` call
	// was made. Specifying zero may immediately make the message available for
	// another pull request.
	// The minimum deadline you can specify is 0 seconds.
	// The maximum deadline you can specify is 600 seconds (10 minutes).
	AckDeadlineSeconds int32 `protobuf:"varint,3,opt,name=ack_deadline_seconds,json=ackDeadlineSeconds" json:"ack_deadline_seconds,omitempty"`
}

Request for the ModifyAckDeadline method.

func (*ModifyAckDeadlineRequest) Descriptor

func (*ModifyAckDeadlineRequest) Descriptor() ([]byte, []int)

func (*ModifyAckDeadlineRequest) GetAckDeadlineSeconds

func (m *ModifyAckDeadlineRequest) GetAckDeadlineSeconds() int32

func (*ModifyAckDeadlineRequest) GetAckIds

func (m *ModifyAckDeadlineRequest) GetAckIds() []string

func (*ModifyAckDeadlineRequest) GetSubscription

func (m *ModifyAckDeadlineRequest) GetSubscription() string

func (*ModifyAckDeadlineRequest) ProtoMessage

func (*ModifyAckDeadlineRequest) ProtoMessage()

func (*ModifyAckDeadlineRequest) Reset

func (m *ModifyAckDeadlineRequest) Reset()

func (*ModifyAckDeadlineRequest) String

func (m *ModifyAckDeadlineRequest) String() string

type ModifyPushConfigRequest

type ModifyPushConfigRequest struct {
	// The name of the subscription.
	// Format is `projects/{project}/subscriptions/{sub}`.
	Subscription string `protobuf:"bytes,1,opt,name=subscription" json:"subscription,omitempty"`
	// The push configuration for future deliveries.
	//
	// An empty `pushConfig` indicates that the Pub/Sub system should
	// stop pushing messages from the given subscription and allow
	// messages to be pulled and acknowledged - effectively pausing
	// the subscription if `Pull` is not called.
	PushConfig *PushConfig `protobuf:"bytes,2,opt,name=push_config,json=pushConfig" json:"push_config,omitempty"`
}

Request for the ModifyPushConfig method.

func (*ModifyPushConfigRequest) Descriptor

func (*ModifyPushConfigRequest) Descriptor() ([]byte, []int)

func (*ModifyPushConfigRequest) GetPushConfig

func (m *ModifyPushConfigRequest) GetPushConfig() *PushConfig

func (*ModifyPushConfigRequest) GetSubscription

func (m *ModifyPushConfigRequest) GetSubscription() string

func (*ModifyPushConfigRequest) ProtoMessage

func (*ModifyPushConfigRequest) ProtoMessage()

func (*ModifyPushConfigRequest) Reset

func (m *ModifyPushConfigRequest) Reset()

func (*ModifyPushConfigRequest) String

func (m *ModifyPushConfigRequest) String() string

type PublishRequest

type PublishRequest struct {
	// The messages in the request will be published on this topic.
	// Format is `projects/{project}/topics/{topic}`.
	Topic string `protobuf:"bytes,1,opt,name=topic" json:"topic,omitempty"`
	// The messages to publish.
	Messages []*PubsubMessage `protobuf:"bytes,2,rep,name=messages" json:"messages,omitempty"`
}

Request for the Publish method.

func (*PublishRequest) Descriptor

func (*PublishRequest) Descriptor() ([]byte, []int)

func (*PublishRequest) GetMessages

func (m *PublishRequest) GetMessages() []*PubsubMessage

func (*PublishRequest) GetTopic

func (m *PublishRequest) GetTopic() string

func (*PublishRequest) ProtoMessage

func (*PublishRequest) ProtoMessage()

func (*PublishRequest) Reset

func (m *PublishRequest) Reset()

func (*PublishRequest) String

func (m *PublishRequest) String() string

type PublishResponse

type PublishResponse struct {
	// The server-assigned ID of each published message, in the same order as
	// the messages in the request. IDs are guaranteed to be unique within
	// the topic.
	MessageIds []string `protobuf:"bytes,1,rep,name=message_ids,json=messageIds" json:"message_ids,omitempty"`
}

Response for the `Publish` method.

func (*PublishResponse) Descriptor

func (*PublishResponse) Descriptor() ([]byte, []int)

func (*PublishResponse) GetMessageIds

func (m *PublishResponse) GetMessageIds() []string

func (*PublishResponse) ProtoMessage

func (*PublishResponse) ProtoMessage()

func (*PublishResponse) Reset

func (m *PublishResponse) Reset()

func (*PublishResponse) String

func (m *PublishResponse) String() string

type PublisherClient

type PublisherClient interface {
	// Creates the given topic with the given name.
	CreateTopic(ctx context.Context, in *Topic, opts ...grpc.CallOption) (*Topic, error)
	// Updates an existing topic. Note that certain properties of a topic are not
	// modifiable.  Options settings follow the style guide:
	// NOTE:  The style guide requires body: "topic" instead of body: "*".
	// Keeping the latter for internal consistency in V1, however it should be
	// corrected in V2.  See
	// https://cloud.google.com/apis/design/standard_methods#update for details.
	UpdateTopic(ctx context.Context, in *UpdateTopicRequest, opts ...grpc.CallOption) (*Topic, error)
	// Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic
	// does not exist. The message payload must not be empty; it must contain
	//  either a non-empty data field, or at least one attribute.
	Publish(ctx context.Context, in *PublishRequest, opts ...grpc.CallOption) (*PublishResponse, error)
	// Gets the configuration of a topic.
	GetTopic(ctx context.Context, in *GetTopicRequest, opts ...grpc.CallOption) (*Topic, error)
	// Lists matching topics.
	ListTopics(ctx context.Context, in *ListTopicsRequest, opts ...grpc.CallOption) (*ListTopicsResponse, error)
	// Lists the name of the subscriptions for this topic.
	ListTopicSubscriptions(ctx context.Context, in *ListTopicSubscriptionsRequest, opts ...grpc.CallOption) (*ListTopicSubscriptionsResponse, error)
	// Deletes the topic with the given name. Returns `NOT_FOUND` if the topic
	// does not exist. After a topic is deleted, a new topic may be created with
	// the same name; this is an entirely new topic with none of the old
	// configuration or subscriptions. Existing subscriptions to this topic are
	// not deleted, but their `topic` field is set to `_deleted-topic_`.
	DeleteTopic(ctx context.Context, in *DeleteTopicRequest, opts ...grpc.CallOption) (*google_protobuf2.Empty, error)
}

func NewPublisherClient

func NewPublisherClient(cc *grpc.ClientConn) PublisherClient

type PublisherServer

type PublisherServer interface {
	// Creates the given topic with the given name.
	CreateTopic(context.Context, *Topic) (*Topic, error)
	// Updates an existing topic. Note that certain properties of a topic are not
	// modifiable.  Options settings follow the style guide:
	// NOTE:  The style guide requires body: "topic" instead of body: "*".
	// Keeping the latter for internal consistency in V1, however it should be
	// corrected in V2.  See
	// https://cloud.google.com/apis/design/standard_methods#update for details.
	UpdateTopic(context.Context, *UpdateTopicRequest) (*Topic, error)
	// Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic
	// does not exist. The message payload must not be empty; it must contain
	//  either a non-empty data field, or at least one attribute.
	Publish(context.Context, *PublishRequest) (*PublishResponse, error)
	// Gets the configuration of a topic.
	GetTopic(context.Context, *GetTopicRequest) (*Topic, error)
	// Lists matching topics.
	ListTopics(context.Context, *ListTopicsRequest) (*ListTopicsResponse, error)
	// Lists the name of the subscriptions for this topic.
	ListTopicSubscriptions(context.Context, *ListTopicSubscriptionsRequest) (*ListTopicSubscriptionsResponse, error)
	// Deletes the topic with the given name. Returns `NOT_FOUND` if the topic
	// does not exist. After a topic is deleted, a new topic may be created with
	// the same name; this is an entirely new topic with none of the old
	// configuration or subscriptions. Existing subscriptions to this topic are
	// not deleted, but their `topic` field is set to `_deleted-topic_`.
	DeleteTopic(context.Context, *DeleteTopicRequest) (*google_protobuf2.Empty, error)
}

type PubsubMessage

type PubsubMessage struct {
	// The message payload.
	Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// Optional attributes for this message.
	Attributes map[string]string `` /* 140-byte string literal not displayed */
	// ID of this message, assigned by the server when the message is published.
	// Guaranteed to be unique within the topic. This value may be read by a
	// subscriber that receives a `PubsubMessage` via a `Pull` call or a push
	// delivery. It must not be populated by the publisher in a `Publish` call.
	MessageId string `protobuf:"bytes,3,opt,name=message_id,json=messageId" json:"message_id,omitempty"`
	// The time at which the message was published, populated by the server when
	// it receives the `Publish` call. It must not be populated by the
	// publisher in a `Publish` call.
	PublishTime *google_protobuf4.Timestamp `protobuf:"bytes,4,opt,name=publish_time,json=publishTime" json:"publish_time,omitempty"`
}

A message data and its attributes. The message payload must not be empty; it must contain either a non-empty data field, or at least one attribute.

func (*PubsubMessage) Descriptor

func (*PubsubMessage) Descriptor() ([]byte, []int)

func (*PubsubMessage) GetAttributes

func (m *PubsubMessage) GetAttributes() map[string]string

func (*PubsubMessage) GetData

func (m *PubsubMessage) GetData() []byte

func (*PubsubMessage) GetMessageId

func (m *PubsubMessage) GetMessageId() string

func (*PubsubMessage) GetPublishTime

func (m *PubsubMessage) GetPublishTime() *google_protobuf4.Timestamp

func (*PubsubMessage) ProtoMessage

func (*PubsubMessage) ProtoMessage()

func (*PubsubMessage) Reset

func (m *PubsubMessage) Reset()

func (*PubsubMessage) String

func (m *PubsubMessage) String() string

type PullRequest

type PullRequest struct {
	// The subscription from which messages should be pulled.
	// Format is `projects/{project}/subscriptions/{sub}`.
	Subscription string `protobuf:"bytes,1,opt,name=subscription" json:"subscription,omitempty"`
	// If this field set to true, the system will respond immediately even if
	// it there are no messages available to return in the `Pull` response.
	// Otherwise, the system may wait (for a bounded amount of time) until at
	// least one message is available, rather than returning no messages. The
	// client may cancel the request if it does not wish to wait any longer for
	// the response.
	ReturnImmediately bool `protobuf:"varint,2,opt,name=return_immediately,json=returnImmediately" json:"return_immediately,omitempty"`
	// The maximum number of messages returned for this request. The Pub/Sub
	// system may return fewer than the number specified.
	MaxMessages int32 `protobuf:"varint,3,opt,name=max_messages,json=maxMessages" json:"max_messages,omitempty"`
}

Request for the `Pull` method.

func (*PullRequest) Descriptor

func (*PullRequest) Descriptor() ([]byte, []int)

func (*PullRequest) GetMaxMessages

func (m *PullRequest) GetMaxMessages() int32

func (*PullRequest) GetReturnImmediately

func (m *PullRequest) GetReturnImmediately() bool

func (*PullRequest) GetSubscription

func (m *PullRequest) GetSubscription() string

func (*PullRequest) ProtoMessage

func (*PullRequest) ProtoMessage()

func (*PullRequest) Reset

func (m *PullRequest) Reset()

func (*PullRequest) String

func (m *PullRequest) String() string

type PullResponse

type PullResponse struct {
	// Received Pub/Sub messages. The Pub/Sub system will return zero messages if
	// there are no more available in the backlog. The Pub/Sub system may return
	// fewer than the `maxMessages` requested even if there are more messages
	// available in the backlog.
	ReceivedMessages []*ReceivedMessage `protobuf:"bytes,1,rep,name=received_messages,json=receivedMessages" json:"received_messages,omitempty"`
}

Response for the `Pull` method.

func (*PullResponse) Descriptor

func (*PullResponse) Descriptor() ([]byte, []int)

func (*PullResponse) GetReceivedMessages

func (m *PullResponse) GetReceivedMessages() []*ReceivedMessage

func (*PullResponse) ProtoMessage

func (*PullResponse) ProtoMessage()

func (*PullResponse) Reset

func (m *PullResponse) Reset()

func (*PullResponse) String

func (m *PullResponse) String() string

type PushConfig

type PushConfig struct {
	// A URL locating the endpoint to which messages should be pushed.
	// For example, a Webhook endpoint might use "https://example.com/push".
	PushEndpoint string `protobuf:"bytes,1,opt,name=push_endpoint,json=pushEndpoint" json:"push_endpoint,omitempty"`
	// Endpoint configuration attributes.
	//
	// Every endpoint has a set of API supported attributes that can be used to
	// control different aspects of the message delivery.
	//
	// The currently supported attribute is `x-goog-version`, which you can
	// use to change the format of the pushed message. This attribute
	// indicates the version of the data expected by the endpoint. This
	// controls the shape of the pushed message (i.e., its fields and metadata).
	// The endpoint version is based on the version of the Pub/Sub API.
	//
	// If not present during the `CreateSubscription` call, it will default to
	// the version of the API used to make such call. If not present during a
	// `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
	// calls will always return a valid version, even if the subscription was
	// created without this attribute.
	//
	// The possible values for this attribute are:
	//
	// * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
	// * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
	Attributes map[string]string `` /* 140-byte string literal not displayed */
}

Configuration for a push delivery endpoint.

func (*PushConfig) Descriptor

func (*PushConfig) Descriptor() ([]byte, []int)

func (*PushConfig) GetAttributes

func (m *PushConfig) GetAttributes() map[string]string

func (*PushConfig) GetPushEndpoint

func (m *PushConfig) GetPushEndpoint() string

func (*PushConfig) ProtoMessage

func (*PushConfig) ProtoMessage()

func (*PushConfig) Reset

func (m *PushConfig) Reset()

func (*PushConfig) String

func (m *PushConfig) String() string

type ReceivedMessage

type ReceivedMessage struct {
	// This ID can be used to acknowledge the received message.
	AckId string `protobuf:"bytes,1,opt,name=ack_id,json=ackId" json:"ack_id,omitempty"`
	// The message.
	Message *PubsubMessage `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"`
}

A message and its corresponding acknowledgment ID.

func (*ReceivedMessage) Descriptor

func (*ReceivedMessage) Descriptor() ([]byte, []int)

func (*ReceivedMessage) GetAckId

func (m *ReceivedMessage) GetAckId() string

func (*ReceivedMessage) GetMessage

func (m *ReceivedMessage) GetMessage() *PubsubMessage

func (*ReceivedMessage) ProtoMessage

func (*ReceivedMessage) ProtoMessage()

func (*ReceivedMessage) Reset

func (m *ReceivedMessage) Reset()

func (*ReceivedMessage) String

func (m *ReceivedMessage) String() string

type SeekRequest

type SeekRequest struct {
	// The subscription to affect.
	Subscription string `protobuf:"bytes,1,opt,name=subscription" json:"subscription,omitempty"`
	// Types that are valid to be assigned to Target:
	//	*SeekRequest_Time
	//	*SeekRequest_Snapshot
	Target isSeekRequest_Target `protobuf_oneof:"target"`
}

Request for the `Seek` method.

func (*SeekRequest) Descriptor

func (*SeekRequest) Descriptor() ([]byte, []int)

func (*SeekRequest) GetSnapshot

func (m *SeekRequest) GetSnapshot() string

func (*SeekRequest) GetSubscription

func (m *SeekRequest) GetSubscription() string

func (*SeekRequest) GetTarget

func (m *SeekRequest) GetTarget() isSeekRequest_Target

func (*SeekRequest) GetTime

func (m *SeekRequest) GetTime() *google_protobuf4.Timestamp

func (*SeekRequest) ProtoMessage

func (*SeekRequest) ProtoMessage()

func (*SeekRequest) Reset

func (m *SeekRequest) Reset()

func (*SeekRequest) String

func (m *SeekRequest) String() string

func (*SeekRequest) XXX_OneofFuncs

func (*SeekRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

type SeekRequest_Snapshot

type SeekRequest_Snapshot struct {
	Snapshot string `protobuf:"bytes,3,opt,name=snapshot,oneof"`
}

type SeekRequest_Time

type SeekRequest_Time struct {
	Time *google_protobuf4.Timestamp `protobuf:"bytes,2,opt,name=time,oneof"`
}

type SeekResponse

type SeekResponse struct {
}

func (*SeekResponse) Descriptor

func (*SeekResponse) Descriptor() ([]byte, []int)

func (*SeekResponse) ProtoMessage

func (*SeekResponse) ProtoMessage()

func (*SeekResponse) Reset

func (m *SeekResponse) Reset()

func (*SeekResponse) String

func (m *SeekResponse) String() string

type Snapshot

type Snapshot struct {
	// The name of the snapshot.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// The name of the topic from which this snapshot is retaining messages.
	Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"`
	// The snapshot is guaranteed to exist up until this time.
	// A newly-created snapshot expires no later than 7 days from the time of its
	// creation. Its exact lifetime is determined at creation by the existing
	// backlog in the source subscription. Specifically, the lifetime of the
	// snapshot is `7 days - (age of oldest unacked message in the subscription)`.
	// For example, consider a subscription whose oldest unacked message is 3 days
	// old. If a snapshot is created from this subscription, the snapshot -- which
	// will always capture this 3-day-old backlog as long as the snapshot
	// exists -- will expire in 4 days.
	ExpireTime *google_protobuf4.Timestamp `protobuf:"bytes,3,opt,name=expire_time,json=expireTime" json:"expire_time,omitempty"`
	// User labels.
	Labels map[string]string `` /* 132-byte string literal not displayed */
}

A snapshot resource.

func (*Snapshot) Descriptor

func (*Snapshot) Descriptor() ([]byte, []int)

func (*Snapshot) GetExpireTime

func (m *Snapshot) GetExpireTime() *google_protobuf4.Timestamp

func (*Snapshot) GetLabels

func (m *Snapshot) GetLabels() map[string]string

func (*Snapshot) GetName

func (m *Snapshot) GetName() string

func (*Snapshot) GetTopic

func (m *Snapshot) GetTopic() string

func (*Snapshot) ProtoMessage

func (*Snapshot) ProtoMessage()

func (*Snapshot) Reset

func (m *Snapshot) Reset()

func (*Snapshot) String

func (m *Snapshot) String() string

type StreamingPullRequest

type StreamingPullRequest struct {
	// The subscription for which to initialize the new stream. This must be
	// provided in the first request on the stream, and must not be set in
	// subsequent requests from client to server.
	// Format is `projects/{project}/subscriptions/{sub}`.
	Subscription string `protobuf:"bytes,1,opt,name=subscription" json:"subscription,omitempty"`
	// List of acknowledgement IDs for acknowledging previously received messages
	// (received on this stream or a different stream). If an ack ID has expired,
	// the corresponding message may be redelivered later. Acknowledging a message
	// more than once will not result in an error. If the acknowledgement ID is
	// malformed, the stream will be aborted with status `INVALID_ARGUMENT`.
	AckIds []string `protobuf:"bytes,2,rep,name=ack_ids,json=ackIds" json:"ack_ids,omitempty"`
	// The list of new ack deadlines for the IDs listed in
	// `modify_deadline_ack_ids`. The size of this list must be the same as the
	// size of `modify_deadline_ack_ids`. If it differs the stream will be aborted
	// with `INVALID_ARGUMENT`. Each element in this list is applied to the
	// element in the same position in `modify_deadline_ack_ids`. The new ack
	// deadline is with respect to the time this request was sent to the Pub/Sub
	// system. Must be >= 0. For example, if the value is 10, the new ack deadline
	// will expire 10 seconds after this request is received. If the value is 0,
	// the message is immediately made available for another streaming or
	// non-streaming pull request. If the value is < 0 (an error), the stream will
	// be aborted with status `INVALID_ARGUMENT`.
	ModifyDeadlineSeconds []int32 `` /* 127-byte string literal not displayed */
	// List of acknowledgement IDs whose deadline will be modified based on the
	// corresponding element in `modify_deadline_seconds`. This field can be used
	// to indicate that more time is needed to process a message by the
	// subscriber, or to make the message available for redelivery if the
	// processing was interrupted.
	ModifyDeadlineAckIds []string `protobuf:"bytes,4,rep,name=modify_deadline_ack_ids,json=modifyDeadlineAckIds" json:"modify_deadline_ack_ids,omitempty"`
	// The ack deadline to use for the stream. This must be provided in the
	// first request on the stream, but it can also be updated on subsequent
	// requests from client to server. The minimum deadline you can specify is 10
	// seconds. The maximum deadline you can specify is 600 seconds (10 minutes).
	StreamAckDeadlineSeconds int32 `` /* 131-byte string literal not displayed */
}

Request for the `StreamingPull` streaming RPC method. This request is used to establish the initial stream as well as to stream acknowledgements and ack deadline modifications from the client to the server.

func (*StreamingPullRequest) Descriptor

func (*StreamingPullRequest) Descriptor() ([]byte, []int)

func (*StreamingPullRequest) GetAckIds

func (m *StreamingPullRequest) GetAckIds() []string

func (*StreamingPullRequest) GetModifyDeadlineAckIds

func (m *StreamingPullRequest) GetModifyDeadlineAckIds() []string

func (*StreamingPullRequest) GetModifyDeadlineSeconds

func (m *StreamingPullRequest) GetModifyDeadlineSeconds() []int32

func (*StreamingPullRequest) GetStreamAckDeadlineSeconds

func (m *StreamingPullRequest) GetStreamAckDeadlineSeconds() int32

func (*StreamingPullRequest) GetSubscription

func (m *StreamingPullRequest) GetSubscription() string

func (*StreamingPullRequest) ProtoMessage

func (*StreamingPullRequest) ProtoMessage()

func (*StreamingPullRequest) Reset

func (m *StreamingPullRequest) Reset()

func (*StreamingPullRequest) String

func (m *StreamingPullRequest) String() string

type StreamingPullResponse

type StreamingPullResponse struct {
	// Received Pub/Sub messages. This will not be empty.
	ReceivedMessages []*ReceivedMessage `protobuf:"bytes,1,rep,name=received_messages,json=receivedMessages" json:"received_messages,omitempty"`
}

Response for the `StreamingPull` method. This response is used to stream messages from the server to the client.

func (*StreamingPullResponse) Descriptor

func (*StreamingPullResponse) Descriptor() ([]byte, []int)

func (*StreamingPullResponse) GetReceivedMessages

func (m *StreamingPullResponse) GetReceivedMessages() []*ReceivedMessage

func (*StreamingPullResponse) ProtoMessage

func (*StreamingPullResponse) ProtoMessage()

func (*StreamingPullResponse) Reset

func (m *StreamingPullResponse) Reset()

func (*StreamingPullResponse) String

func (m *StreamingPullResponse) String() string

type SubscriberClient

type SubscriberClient interface {
	// Creates a subscription to a given topic.
	// If the subscription already exists, returns `ALREADY_EXISTS`.
	// If the corresponding topic doesn't exist, returns `NOT_FOUND`.
	//
	// If the name is not provided in the request, the server will assign a random
	// name for this subscription on the same project as the topic, conforming
	// to the
	// [resource name format](https://cloud.google.com/pubsub/docs/overview#names).
	// The generated name is populated in the returned Subscription object.
	// Note that for REST API requests, you must specify a name in the request.
	CreateSubscription(ctx context.Context, in *Subscription, opts ...grpc.CallOption) (*Subscription, error)
	// Gets the configuration details of a subscription.
	GetSubscription(ctx context.Context, in *GetSubscriptionRequest, opts ...grpc.CallOption) (*Subscription, error)
	// Updates an existing subscription. Note that certain properties of a
	// subscription, such as its topic, are not modifiable.
	// NOTE:  The style guide requires body: "subscription" instead of body: "*".
	// Keeping the latter for internal consistency in V1, however it should be
	// corrected in V2.  See
	// https://cloud.google.com/apis/design/standard_methods#update for details.
	UpdateSubscription(ctx context.Context, in *UpdateSubscriptionRequest, opts ...grpc.CallOption) (*Subscription, error)
	// Lists matching subscriptions.
	ListSubscriptions(ctx context.Context, in *ListSubscriptionsRequest, opts ...grpc.CallOption) (*ListSubscriptionsResponse, error)
	// Deletes an existing subscription. All messages retained in the subscription
	// are immediately dropped. Calls to `Pull` after deletion will return
	// `NOT_FOUND`. After a subscription is deleted, a new one may be created with
	// the same name, but the new one has no association with the old
	// subscription or its topic unless the same topic is specified.
	DeleteSubscription(ctx context.Context, in *DeleteSubscriptionRequest, opts ...grpc.CallOption) (*google_protobuf2.Empty, error)
	// Modifies the ack deadline for a specific message. This method is useful
	// to indicate that more time is needed to process a message by the
	// subscriber, or to make the message available for redelivery if the
	// processing was interrupted. Note that this does not modify the
	// subscription-level `ackDeadlineSeconds` used for subsequent messages.
	ModifyAckDeadline(ctx context.Context, in *ModifyAckDeadlineRequest, opts ...grpc.CallOption) (*google_protobuf2.Empty, error)
	// Acknowledges the messages associated with the `ack_ids` in the
	// `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages
	// from the subscription.
	//
	// Acknowledging a message whose ack deadline has expired may succeed,
	// but such a message may be redelivered later. Acknowledging a message more
	// than once will not result in an error.
	Acknowledge(ctx context.Context, in *AcknowledgeRequest, opts ...grpc.CallOption) (*google_protobuf2.Empty, error)
	// Pulls messages from the server. Returns an empty list if there are no
	// messages available in the backlog. The server may return `UNAVAILABLE` if
	// there are too many concurrent pull requests pending for the given
	// subscription.
	Pull(ctx context.Context, in *PullRequest, opts ...grpc.CallOption) (*PullResponse, error)
	// (EXPERIMENTAL) StreamingPull is an experimental feature. This RPC will
	// respond with UNIMPLEMENTED errors unless you have been invited to test
	// this feature. Contact cloud-pubsub@google.com with any questions.
	//
	// Establishes a stream with the server, which sends messages down to the
	// client. The client streams acknowledgements and ack deadline modifications
	// back to the server. The server will close the stream and return the status
	// on any error. The server may close the stream with status `OK` to reassign
	// server-side resources, in which case, the client should re-establish the
	// stream. `UNAVAILABLE` may also be returned in the case of a transient error
	// (e.g., a server restart). These should also be retried by the client. Flow
	// control can be achieved by configuring the underlying RPC channel.
	StreamingPull(ctx context.Context, opts ...grpc.CallOption) (Subscriber_StreamingPullClient, error)
	// Modifies the `PushConfig` for a specified subscription.
	//
	// This may be used to change a push subscription to a pull one (signified by
	// an empty `PushConfig`) or vice versa, or change the endpoint URL and other
	// attributes of a push subscription. Messages will accumulate for delivery
	// continuously through the call regardless of changes to the `PushConfig`.
	ModifyPushConfig(ctx context.Context, in *ModifyPushConfigRequest, opts ...grpc.CallOption) (*google_protobuf2.Empty, error)
	// Lists the existing snapshots.
	ListSnapshots(ctx context.Context, in *ListSnapshotsRequest, opts ...grpc.CallOption) (*ListSnapshotsResponse, error)
	// Creates a snapshot from the requested subscription.
	// If the snapshot already exists, returns `ALREADY_EXISTS`.
	// If the requested subscription doesn't exist, returns `NOT_FOUND`.
	//
	// If the name is not provided in the request, the server will assign a random
	// name for this snapshot on the same project as the subscription, conforming
	// to the
	// [resource name format](https://cloud.google.com/pubsub/docs/overview#names).
	// The generated name is populated in the returned Snapshot object.
	// Note that for REST API requests, you must specify a name in the request.
	CreateSnapshot(ctx context.Context, in *CreateSnapshotRequest, opts ...grpc.CallOption) (*Snapshot, error)
	// Updates an existing snapshot. Note that certain properties of a snapshot
	// are not modifiable.
	// NOTE:  The style guide requires body: "snapshot" instead of body: "*".
	// Keeping the latter for internal consistency in V1, however it should be
	// corrected in V2.  See
	// https://cloud.google.com/apis/design/standard_methods#update for details.
	UpdateSnapshot(ctx context.Context, in *UpdateSnapshotRequest, opts ...grpc.CallOption) (*Snapshot, error)
	// Removes an existing snapshot. All messages retained in the snapshot
	// are immediately dropped. After a snapshot is deleted, a new one may be
	// created with the same name, but the new one has no association with the old
	// snapshot or its subscription, unless the same subscription is specified.
	DeleteSnapshot(ctx context.Context, in *DeleteSnapshotRequest, opts ...grpc.CallOption) (*google_protobuf2.Empty, error)
	// Seeks an existing subscription to a point in time or to a given snapshot,
	// whichever is provided in the request.
	Seek(ctx context.Context, in *SeekRequest, opts ...grpc.CallOption) (*SeekResponse, error)
}

func NewSubscriberClient

func NewSubscriberClient(cc *grpc.ClientConn) SubscriberClient

type SubscriberServer

type SubscriberServer interface {
	// Creates a subscription to a given topic.
	// If the subscription already exists, returns `ALREADY_EXISTS`.
	// If the corresponding topic doesn't exist, returns `NOT_FOUND`.
	//
	// If the name is not provided in the request, the server will assign a random
	// name for this subscription on the same project as the topic, conforming
	// to the
	// [resource name format](https://cloud.google.com/pubsub/docs/overview#names).
	// The generated name is populated in the returned Subscription object.
	// Note that for REST API requests, you must specify a name in the request.
	CreateSubscription(context.Context, *Subscription) (*Subscription, error)
	// Gets the configuration details of a subscription.
	GetSubscription(context.Context, *GetSubscriptionRequest) (*Subscription, error)
	// Updates an existing subscription. Note that certain properties of a
	// subscription, such as its topic, are not modifiable.
	// NOTE:  The style guide requires body: "subscription" instead of body: "*".
	// Keeping the latter for internal consistency in V1, however it should be
	// corrected in V2.  See
	// https://cloud.google.com/apis/design/standard_methods#update for details.
	UpdateSubscription(context.Context, *UpdateSubscriptionRequest) (*Subscription, error)
	// Lists matching subscriptions.
	ListSubscriptions(context.Context, *ListSubscriptionsRequest) (*ListSubscriptionsResponse, error)
	// Deletes an existing subscription. All messages retained in the subscription
	// are immediately dropped. Calls to `Pull` after deletion will return
	// `NOT_FOUND`. After a subscription is deleted, a new one may be created with
	// the same name, but the new one has no association with the old
	// subscription or its topic unless the same topic is specified.
	DeleteSubscription(context.Context, *DeleteSubscriptionRequest) (*google_protobuf2.Empty, error)
	// Modifies the ack deadline for a specific message. This method is useful
	// to indicate that more time is needed to process a message by the
	// subscriber, or to make the message available for redelivery if the
	// processing was interrupted. Note that this does not modify the
	// subscription-level `ackDeadlineSeconds` used for subsequent messages.
	ModifyAckDeadline(context.Context, *ModifyAckDeadlineRequest) (*google_protobuf2.Empty, error)
	// Acknowledges the messages associated with the `ack_ids` in the
	// `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages
	// from the subscription.
	//
	// Acknowledging a message whose ack deadline has expired may succeed,
	// but such a message may be redelivered later. Acknowledging a message more
	// than once will not result in an error.
	Acknowledge(context.Context, *AcknowledgeRequest) (*google_protobuf2.Empty, error)
	// Pulls messages from the server. Returns an empty list if there are no
	// messages available in the backlog. The server may return `UNAVAILABLE` if
	// there are too many concurrent pull requests pending for the given
	// subscription.
	Pull(context.Context, *PullRequest) (*PullResponse, error)
	// (EXPERIMENTAL) StreamingPull is an experimental feature. This RPC will
	// respond with UNIMPLEMENTED errors unless you have been invited to test
	// this feature. Contact cloud-pubsub@google.com with any questions.
	//
	// Establishes a stream with the server, which sends messages down to the
	// client. The client streams acknowledgements and ack deadline modifications
	// back to the server. The server will close the stream and return the status
	// on any error. The server may close the stream with status `OK` to reassign
	// server-side resources, in which case, the client should re-establish the
	// stream. `UNAVAILABLE` may also be returned in the case of a transient error
	// (e.g., a server restart). These should also be retried by the client. Flow
	// control can be achieved by configuring the underlying RPC channel.
	StreamingPull(Subscriber_StreamingPullServer) error
	// Modifies the `PushConfig` for a specified subscription.
	//
	// This may be used to change a push subscription to a pull one (signified by
	// an empty `PushConfig`) or vice versa, or change the endpoint URL and other
	// attributes of a push subscription. Messages will accumulate for delivery
	// continuously through the call regardless of changes to the `PushConfig`.
	ModifyPushConfig(context.Context, *ModifyPushConfigRequest) (*google_protobuf2.Empty, error)
	// Lists the existing snapshots.
	ListSnapshots(context.Context, *ListSnapshotsRequest) (*ListSnapshotsResponse, error)
	// Creates a snapshot from the requested subscription.
	// If the snapshot already exists, returns `ALREADY_EXISTS`.
	// If the requested subscription doesn't exist, returns `NOT_FOUND`.
	//
	// If the name is not provided in the request, the server will assign a random
	// name for this snapshot on the same project as the subscription, conforming
	// to the
	// [resource name format](https://cloud.google.com/pubsub/docs/overview#names).
	// The generated name is populated in the returned Snapshot object.
	// Note that for REST API requests, you must specify a name in the request.
	CreateSnapshot(context.Context, *CreateSnapshotRequest) (*Snapshot, error)
	// Updates an existing snapshot. Note that certain properties of a snapshot
	// are not modifiable.
	// NOTE:  The style guide requires body: "snapshot" instead of body: "*".
	// Keeping the latter for internal consistency in V1, however it should be
	// corrected in V2.  See
	// https://cloud.google.com/apis/design/standard_methods#update for details.
	UpdateSnapshot(context.Context, *UpdateSnapshotRequest) (*Snapshot, error)
	// Removes an existing snapshot. All messages retained in the snapshot
	// are immediately dropped. After a snapshot is deleted, a new one may be
	// created with the same name, but the new one has no association with the old
	// snapshot or its subscription, unless the same subscription is specified.
	DeleteSnapshot(context.Context, *DeleteSnapshotRequest) (*google_protobuf2.Empty, error)
	// Seeks an existing subscription to a point in time or to a given snapshot,
	// whichever is provided in the request.
	Seek(context.Context, *SeekRequest) (*SeekResponse, error)
}

type Subscriber_StreamingPullClient

type Subscriber_StreamingPullClient interface {
	Send(*StreamingPullRequest) error
	Recv() (*StreamingPullResponse, error)
	grpc.ClientStream
}

type Subscriber_StreamingPullServer

type Subscriber_StreamingPullServer interface {
	Send(*StreamingPullResponse) error
	Recv() (*StreamingPullRequest, error)
	grpc.ServerStream
}

type Subscription

type Subscription struct {
	// The name of the subscription. It must have the format
	// `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
	// start with a letter, and contain only letters (`[A-Za-z]`), numbers
	// (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
	// plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
	// in length, and it must not start with `"goog"`.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// The name of the topic from which this subscription is receiving messages.
	// Format is `projects/{project}/topics/{topic}`.
	// The value of this field will be `_deleted-topic_` if the topic has been
	// deleted.
	Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"`
	// If push delivery is used with this subscription, this field is
	// used to configure it. An empty `pushConfig` signifies that the subscriber
	// will pull and ack messages using API methods.
	PushConfig *PushConfig `protobuf:"bytes,4,opt,name=push_config,json=pushConfig" json:"push_config,omitempty"`
	// This value is the maximum time after a subscriber receives a message
	// before the subscriber should acknowledge the message. After message
	// delivery but before the ack deadline expires and before the message is
	// acknowledged, it is an outstanding message and will not be delivered
	// again during that time (on a best-effort basis).
	//
	// For pull subscriptions, this value is used as the initial value for the ack
	// deadline. To override this value for a given message, call
	// `ModifyAckDeadline` with the corresponding `ack_id` if using
	// pull.
	// The minimum custom deadline you can specify is 10 seconds.
	// The maximum custom deadline you can specify is 600 seconds (10 minutes).
	// If this parameter is 0, a default value of 10 seconds is used.
	//
	// For push delivery, this value is also used to set the request timeout for
	// the call to the push endpoint.
	//
	// If the subscriber never acknowledges the message, the Pub/Sub
	// system will eventually redeliver the message.
	AckDeadlineSeconds int32 `protobuf:"varint,5,opt,name=ack_deadline_seconds,json=ackDeadlineSeconds" json:"ack_deadline_seconds,omitempty"`
	// Indicates whether to retain acknowledged messages. If true, then
	// messages are not expunged from the subscription's backlog, even if they are
	// acknowledged, until they fall out of the `message_retention_duration`
	// window.
	RetainAckedMessages bool `protobuf:"varint,7,opt,name=retain_acked_messages,json=retainAckedMessages" json:"retain_acked_messages,omitempty"`
	// How long to retain unacknowledged messages in the subscription's backlog,
	// from the moment a message is published.
	// If `retain_acked_messages` is true, then this also configures the retention
	// of acknowledged messages, and thus configures how far back in time a `Seek`
	// can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10
	// minutes.
	MessageRetentionDuration *google_protobuf1.Duration `` /* 128-byte string literal not displayed */
	// User labels.
	Labels map[string]string `` /* 132-byte string literal not displayed */
}

A subscription resource.

func (*Subscription) Descriptor

func (*Subscription) Descriptor() ([]byte, []int)

func (*Subscription) GetAckDeadlineSeconds

func (m *Subscription) GetAckDeadlineSeconds() int32

func (*Subscription) GetLabels

func (m *Subscription) GetLabels() map[string]string

func (*Subscription) GetMessageRetentionDuration

func (m *Subscription) GetMessageRetentionDuration() *google_protobuf1.Duration

func (*Subscription) GetName

func (m *Subscription) GetName() string

func (*Subscription) GetPushConfig

func (m *Subscription) GetPushConfig() *PushConfig

func (*Subscription) GetRetainAckedMessages

func (m *Subscription) GetRetainAckedMessages() bool

func (*Subscription) GetTopic

func (m *Subscription) GetTopic() string

func (*Subscription) ProtoMessage

func (*Subscription) ProtoMessage()

func (*Subscription) Reset

func (m *Subscription) Reset()

func (*Subscription) String

func (m *Subscription) String() string

type Topic

type Topic struct {
	// The name of the topic. It must have the format
	// `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
	// and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
	// underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
	// signs (`%`). It must be between 3 and 255 characters in length, and it
	// must not start with `"goog"`.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// User labels.
	Labels map[string]string `` /* 132-byte string literal not displayed */
}

A topic resource.

func (*Topic) Descriptor

func (*Topic) Descriptor() ([]byte, []int)

func (*Topic) GetLabels

func (m *Topic) GetLabels() map[string]string

func (*Topic) GetName

func (m *Topic) GetName() string

func (*Topic) ProtoMessage

func (*Topic) ProtoMessage()

func (*Topic) Reset

func (m *Topic) Reset()

func (*Topic) String

func (m *Topic) String() string

type UpdateSnapshotRequest

type UpdateSnapshotRequest struct {
	// The updated snpashot object.
	Snapshot *Snapshot `protobuf:"bytes,1,opt,name=snapshot" json:"snapshot,omitempty"`
	// Indicates which fields in the provided snapshot to update.
	// Must be specified and non-empty.
	UpdateMask *google_protobuf3.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask" json:"update_mask,omitempty"`
}

Request for the UpdateSnapshot method.

func (*UpdateSnapshotRequest) Descriptor

func (*UpdateSnapshotRequest) Descriptor() ([]byte, []int)

func (*UpdateSnapshotRequest) GetSnapshot

func (m *UpdateSnapshotRequest) GetSnapshot() *Snapshot

func (*UpdateSnapshotRequest) GetUpdateMask

func (m *UpdateSnapshotRequest) GetUpdateMask() *google_protobuf3.FieldMask

func (*UpdateSnapshotRequest) ProtoMessage

func (*UpdateSnapshotRequest) ProtoMessage()

func (*UpdateSnapshotRequest) Reset

func (m *UpdateSnapshotRequest) Reset()

func (*UpdateSnapshotRequest) String

func (m *UpdateSnapshotRequest) String() string

type UpdateSubscriptionRequest

type UpdateSubscriptionRequest struct {
	// The updated subscription object.
	Subscription *Subscription `protobuf:"bytes,1,opt,name=subscription" json:"subscription,omitempty"`
	// Indicates which fields in the provided subscription to update.
	// Must be specified and non-empty.
	UpdateMask *google_protobuf3.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask" json:"update_mask,omitempty"`
}

Request for the UpdateSubscription method.

func (*UpdateSubscriptionRequest) Descriptor

func (*UpdateSubscriptionRequest) Descriptor() ([]byte, []int)

func (*UpdateSubscriptionRequest) GetSubscription

func (m *UpdateSubscriptionRequest) GetSubscription() *Subscription

func (*UpdateSubscriptionRequest) GetUpdateMask

func (*UpdateSubscriptionRequest) ProtoMessage

func (*UpdateSubscriptionRequest) ProtoMessage()

func (*UpdateSubscriptionRequest) Reset

func (m *UpdateSubscriptionRequest) Reset()

func (*UpdateSubscriptionRequest) String

func (m *UpdateSubscriptionRequest) String() string

type UpdateTopicRequest

type UpdateTopicRequest struct {
	// The topic to update.
	Topic *Topic `protobuf:"bytes,1,opt,name=topic" json:"topic,omitempty"`
	// Indicates which fields in the provided topic to update.
	// Must be specified and non-empty.
	UpdateMask *google_protobuf3.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask" json:"update_mask,omitempty"`
}

Request for the UpdateTopic method.

func (*UpdateTopicRequest) Descriptor

func (*UpdateTopicRequest) Descriptor() ([]byte, []int)

func (*UpdateTopicRequest) GetTopic

func (m *UpdateTopicRequest) GetTopic() *Topic

func (*UpdateTopicRequest) GetUpdateMask

func (m *UpdateTopicRequest) GetUpdateMask() *google_protobuf3.FieldMask

func (*UpdateTopicRequest) ProtoMessage

func (*UpdateTopicRequest) ProtoMessage()

func (*UpdateTopicRequest) Reset

func (m *UpdateTopicRequest) Reset()

func (*UpdateTopicRequest) String

func (m *UpdateTopicRequest) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL