kinesis_client v1.0.0-rc.0 KinesisClient.Stream.AppState View Source
The AppState is where the information about Stream shards are stored. ShardConsumers will
checkpoint the records, and the KinesisClient.Stream.Coordinator
will check here to determine
what shards to consume.
Link to this section Summary
Functions
Marks a ShardLease as completed.
Persists a new ShardInfo record. Returns an error if there is already a record for that shard_id
Get a KinesisClient.Stream.AppState.ShardInfo
struct by shard_id. If there is not an existing
record, returns :not_found
.
Renew lease. Increments :lease_count.
Update the checkpoint of the shard with the last sequence number that was processed by a
ShardConsumer. Will return {:error, :lead_invalid} if the lease
does not match what is in
ShardInfo
and the checkpoint will not be updated.
Link to this section Functions
Marks a ShardLease as completed.
This indicates that all records for the shard have been processed by the app. KinesisClient.Stream.Shard
processes will not be started for ShardLease's that are completed.
Persists a new ShardInfo record. Returns an error if there is already a record for that shard_id
Get a KinesisClient.Stream.AppState.ShardInfo
struct by shard_id. If there is not an existing
record, returns :not_found
.
Renew lease. Increments :lease_count.
take_lease(app_name, shard_id, new_owner, lease_count, opts \\ [])
View Sourceupdate_checkpoint(app_name, shard_id, lease, checkpoint, opts \\ [])
View SourceUpdate the checkpoint of the shard with the last sequence number that was processed by a
ShardConsumer. Will return {:error, :lead_invalid} if the lease
does not match what is in
ShardInfo
and the checkpoint will not be updated.