View Source Electric.Client.Message.ResumeMessage (Electric Client v0.2.5)
Emitted by the synchronisation stream before terminating early. If passed
as an option to Client.stream/3
allows for
resuming a shape stream at the given point.
E.g.
# passing `live: false` means the stream will terminate once it receives an
# `up-to-date` message from the server
messages = Electric.Client.stream(client, "my_table", live: false) |> Enum.to_list()
%ResumeMessage{} = resume = List.last(messages)
# `stream` will resume from whatever point the initial one finished
stream = Electric.Client.stream(client, "my_table", resume: resume)
Summary
Types
@type t() :: %Electric.Client.Message.ResumeMessage{ offset: Electric.Client.Offset.t(), schema: Electric.Client.schema(), shape_handle: Electric.Client.shape_handle() }