Skip to content

gufo.liftbridge.api_pb2_grpc

Client and server classes corresponding to protobuf-defined services.

API

Bases: object

API is the main Liftbridge server interface clients interact with.

APIServicer

Bases: object

API is the main Liftbridge server interface clients interact with.

CreateStream(request, context)

CreateStream creates a new stream attached to a NATS subject. It returns an AlreadyExists status code if a stream with the given subject and name already exists.

DeleteStream(request, context)

DeleteStream deletes a stream.

FetchConsumerGroupAssignments(request, context)

FetchConsumerGroupAssignments retrieves the partition assignments for a consumer. This also acts as a heartbeat for the consumer so that the coordinator keeps the consumer active in the group.

NOTE: This is a beta endpoint and is subject to change. It is not included as part of Liftbridge's semantic versioning scheme.

FetchCursor(request, context)

FetchCursor retrieves a partition cursor position.

NOTE: This is a beta endpoint and is subject to change. It is not included as part of Liftbridge's semantic versioning scheme.

FetchMetadata(request, context)

FetchMetadata retrieves the latest cluster metadata, including stream broker information.

FetchPartitionMetadata(request, context)

FetchPartitionMetadata retrieves the latest partition metadata from partition leader The main interest is to retrieve Highest Watermark and Newest Offset

JoinConsumerGroup(request, context)

JoinConsumerGroup adds a consumer to a consumer group. If the group does not exist, it will create it first.

NOTE: This is a beta endpoint and is subject to change. It is not included as part of Liftbridge's semantic versioning scheme.

LeaveConsumerGroup(request, context)

LeaveConsumerGroup removes a consumer from a consumer group.

NOTE: This is a beta endpoint and is subject to change. It is not included as part of Liftbridge's semantic versioning scheme.

PauseStream(request, context)

PauseStream pauses a stream's partitions. If no partitions are specified, all of the stream's partitions will be paused. Partitions are resumed when they are published to via the Liftbridge Publish API.

Publish(request, context)

Publish a new message to a stream. If the AckPolicy is not NONE and a deadline is provided, this will synchronously block until the ack is received. If the ack is not received in time, a DeadlineExceeded status code is returned.

PublishAsync(request_iterator, context)

PublishAsync is used to asynchronously publish messages to a stream in a pipelined fashion. This returns a stream which will yield PublishResponses for messages whose AckPolicy is not NONE.

PublishToSubject(request, context)

Publish a Liftbridge message to a NATS subject. If the AckPolicy is not NONE and a deadline is provided, this will synchronously block until the first ack is received. If an ack is not received in time, a DeadlineExceeded status code is returned.

ReportConsumerGroupCoordinator(request, context)

ReportConsumerGroupCoordinator reports a consumer group coordinator as failed. If a majority of the group's members report the coordinator within a bounded period, the cluster will select a new coordinator.

NOTE: This is a beta endpoint and is subject to change. It is not included as part of Liftbridge's semantic versioning scheme.

SetCursor(request, context)

SetCursor stores a cursor position for a particular stream partition which is uniquely identified by an opaque string.

NOTE: This is a beta endpoint and is subject to change. It is not included as part of Liftbridge's semantic versioning scheme.

SetStreamReadonly(request, context)

SetStreamReadonly sets a read-only flag to a partition. Returns a NoSuchStream error code if the given stream or partition does not exist.

Subscribe(request, context)

Subscribe creates an ephemeral subscription for the given stream. It begins to receive messages starting at the given offset and waits for new messages when it reaches the end of the stream. Use the request context to close the subscription.

APIStub

Bases: object

API is the main Liftbridge server interface clients interact with.

__init__(channel)

Constructor.

Parameters:

Name Type Description Default
channel

A grpc.Channel.

required