GrpcCheckpointStreamInterface
type GrpcCheckpointStreamInterface
A stream of checkpoints returned by [`GrpcClient::checkpoints_stream`].
Call `next` in a loop to receive items; it returns `None` once the stream is exhausted or `cancel` has been called.
type GrpcCheckpointStreamInterface interface {
// Cancel the stream, dropping the connection and unblocking a pending `next`.
//
// Idempotent, and safe to call while `next` is pending — the pending call drops the
// connection on its way out.
//
// Named `cancel` rather than `close` because a `close` method collides with the
// disposal method uniffi generates for objects in some languages.
Cancel()
// Whether the stream has been canceled.
IsCanceled() bool
// Get the next item from the stream.
//
// Returns `None` once the stream is exhausted or has been canceled. Concurrent calls
// are serialized; there is no ordering guarantee between them.
//
// An error from the connection or the server ends the stream: there is no reconnect,
// so every later call returns `None`, and a caller that wants to resume must open a
// new stream from the last sequence number it received. An error converting a single
// item, such as a BCS decode failure, only affects that item; the next call continues
// with the following one.
Next() (*GrpcCheckpointResponse, error)
}