GrpcCheckpointStream
type GrpcCheckpointStream
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 GrpcCheckpointStream struct {
// contains filtered or unexported fields
}
func LiftFromExternalGrpcCheckpointStream
func LiftFromExternalGrpcCheckpointStream(handle uint64) *GrpcCheckpointStream
func (*GrpcCheckpointStream) Cancel
func (_self *GrpcCheckpointStream) Cancel()
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.
func (*GrpcCheckpointStream) Destroy
func (object *GrpcCheckpointStream) Destroy()
func (*GrpcCheckpointStream) IsCanceled
func (_self *GrpcCheckpointStream) IsCanceled() bool
Whether the stream has been canceled.
func (*GrpcCheckpointStream) Next
func (_self *GrpcCheckpointStream) Next() (*GrpcCheckpointResponse, error)
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.