file_source/
internal_events.rs1use std::{io::Error, path::Path, time::Duration};
2
3use bytes::BytesMut;
4
5pub trait FileSourceInternalEvents: Send + Sync + Clone + 'static {
8 fn emit_file_added(&self, path: &Path);
9
10 fn emit_file_resumed(&self, path: &Path, file_position: u64);
11
12 fn emit_file_watch_error(&self, path: &Path, error: Error);
13
14 fn emit_file_unwatched(&self, path: &Path, reached_eof: bool);
15
16 fn emit_file_deleted(&self, path: &Path);
17
18 fn emit_file_delete_error(&self, path: &Path, error: Error);
19
20 fn emit_file_fingerprint_read_error(&self, path: &Path, error: Error);
21
22 fn emit_file_checkpointed(&self, count: usize, duration: Duration);
23
24 fn emit_file_checksum_failed(&self, path: &Path);
25
26 fn emit_file_checkpoint_write_error(&self, error: Error);
27
28 fn emit_files_open(&self, count: usize);
29
30 fn emit_path_globbing_failed(&self, path: &Path, error: &Error);
31
32 fn emit_file_line_too_long(
33 &self,
34 truncated_bytes: &BytesMut,
35 configured_limit: usize,
36 encountered_size_so_far: usize,
37 );
38}