pub struct LockFileOffsetStore { /* private fields */ }Expand description
File-based offset store with lock file protection
Stores offsets in individual files under a base directory:
{base_dir}/{consumer_name}/
├── topic-{topic_id}-consumer-{consumer_id}.offset
└── ...Uses file locking (flock on Unix, LockFile on Windows) to ensure safe concurrent access from multiple processes.
Implementations§
Source§impl LockFileOffsetStore
impl LockFileOffsetStore
Sourcepub fn consumer_name(&self) -> &str
pub fn consumer_name(&self) -> &str
Get the consumer name
Trait Implementations§
Source§impl Debug for LockFileOffsetStore
impl Debug for LockFileOffsetStore
Source§impl OffsetStore for LockFileOffsetStore
impl OffsetStore for LockFileOffsetStore
Source§fn load(
&self,
topic_id: u32,
consumer_id: u64,
) -> Result<Option<u64>, ClientError>
fn load( &self, topic_id: u32, consumer_id: u64, ) -> Result<Option<u64>, ClientError>
Load the stored offset for a topic and consumer Read more
Source§fn save(
&self,
topic_id: u32,
consumer_id: u64,
offset: u64,
) -> Result<(), ClientError>
fn save( &self, topic_id: u32, consumer_id: u64, offset: u64, ) -> Result<(), ClientError>
Save the current offset for a topic and consumer Read more
Auto Trait Implementations§
impl !Freeze for LockFileOffsetStore
impl RefUnwindSafe for LockFileOffsetStore
impl Send for LockFileOffsetStore
impl Sync for LockFileOffsetStore
impl Unpin for LockFileOffsetStore
impl UnsafeUnpin for LockFileOffsetStore
impl UnwindSafe for LockFileOffsetStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request