#[non_exhaustive]pub enum OffsetSpec {
Earliest,
Latest,
MaxTimestamp,
EarliestLocal,
LatestTiered,
EarliestPendingUpload,
Timestamp(TimestampSpec),
}Expand description
Specifies the desired offsets when using Admin::list_offsets.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Earliest
Retrieve the earliest offset of a partition.
Latest
Retrieve the latest offset of a partition.
MaxTimestamp
Retrieve the offset with the largest timestamp of a partition.
EarliestLocal
Retrieve the local log start offset.
LatestTiered
Retrieve the highest offset of data stored in remote storage.
EarliestPendingUpload
Retrieve the earliest offset of records pending upload to remote storage.
Timestamp(TimestampSpec)
Retrieve the earliest offset whose timestamp is greater than or equal to the given timestamp (in milliseconds).
Implementations§
Source§impl OffsetSpec
impl OffsetSpec
Sourcepub fn for_timestamp(timestamp: i64) -> Self
pub fn for_timestamp(timestamp: i64) -> Self
Used to retrieve the earliest offset whose timestamp is greater than or equal to the given timestamp (in milliseconds).
§Arguments
timestamp- in milliseconds
Sourcepub fn max_timestamp() -> Self
pub fn max_timestamp() -> Self
Used to retrieve the offset with the largest timestamp of a partition as message
timestamps can be specified client side this may not match the log end offset returned by
OffsetSpec::latest.
Sourcepub fn earliest_local() -> Self
pub fn earliest_local() -> Self
Used to retrieve the local log start offset. Local log start offset is the offset of a log above which reads are guaranteed to be served from the disk of the leader broker.
Note: When tiered Storage is not enabled, it behaves the same as retrieving the earliest timestamp offset.
Sourcepub fn latest_tiered() -> Self
pub fn latest_tiered() -> Self
Used to retrieve the highest offset of data stored in remote storage.
Note: When tiered storage is not enabled, we will return unknown offset.
Sourcepub fn earliest_pending_upload() -> Self
pub fn earliest_pending_upload() -> Self
Used to retrieve the earliest offset of records that are pending upload to remote storage.
Note: When tiered storage is not enabled, we will return unknown offset.
Trait Implementations§
Source§impl Clone for OffsetSpec
impl Clone for OffsetSpec
Source§fn clone(&self) -> OffsetSpec
fn clone(&self) -> OffsetSpec
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more