Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Replace unreleased InitialSubscribeRequest initial_cursor field with initial_location #150

Merged
merged 1 commit into from Jun 5, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 9 additions & 9 deletions google/cloud/pubsublite_v1/types/subscriber.py
Expand Up @@ -50,18 +50,16 @@ class InitialSubscribeRequest(proto.Message):
The partition from which to receive messages. Partitions are
zero indexed, so ``partition`` must be in the range [0,
topic.num_partitions).
initial_cursor (google.cloud.pubsublite_v1.types.Cursor):
Optional. Initial stream delivery cursor,
pointing to anywhere in the topic partition.
Cursors past head result in stream breakage. If
not set, messages will be delivered from the
commit cursor for the given subscription and
partition.
initial_location (google.cloud.pubsublite_v1.types.SeekRequest):
Optional. Initial target location within the
message backlog. If not set, messages will be
delivered from the commit cursor for the given
subscription and partition.
"""

subscription = proto.Field(proto.STRING, number=1,)
partition = proto.Field(proto.INT64, number=2,)
initial_cursor = proto.Field(proto.MESSAGE, number=3, message=common.Cursor,)
initial_location = proto.Field(proto.MESSAGE, number=4, message="SeekRequest",)


class InitialSubscribeResponse(proto.Message):
Expand All @@ -79,9 +77,11 @@ class InitialSubscribeResponse(proto.Message):
class SeekRequest(proto.Message):
r"""Request to update the stream's delivery cursor based on the
given target. Resets the server available tokens to 0.
SeekRequests past head result in stream breakage.

SeekRequests may not be sent while another SeekRequest is
outstanding (i.e., has not received a SeekResponse) on the same
stream. SeekRequests past head result in stream breakage.
stream.

Attributes:
named_target (google.cloud.pubsublite_v1.types.SeekRequest.NamedTarget):
Expand Down