Electric.ShapeCache.ShapeStatus (electric v1.0.19)
View SourceKeeps track of shape state.
Can recover basic persisted shape metadata from shape storage to repopulate the in-memory cache.
The shape cache then loads this and starts processes (storage and consumer)
for each {shape_handle, %Shape{}}
pair. These then use their attached storage
to recover the status information for the shape (snapshot xmin and latest
offset).
The ETS metadata table name is part of the config because we need to be able to access the data in the ETS from anywhere, so there's an internal api, using the full state and an external api using just the table name.
Summary
Types
@type options() :: [option()]
@type shape_handle() :: Electric.ShapeCacheBehaviour.shape_handle()
@type t() :: %Electric.ShapeCache.ShapeStatus{ root: String.t(), shape_meta_table: table(), storage: Electric.ShapeCache.Storage.storage() }
@type xmin() :: Electric.ShapeCacheBehaviour.xmin()