Struct cloudwatch_logs_upload::BatchUploader
source · pub struct BatchUploader { /* private fields */ }
Expand description
Main interface for uploading logs in batches to AWS CloudWatch Logs.
This can be safely used from multiple threads by cloning it.
Implementations§
source§impl BatchUploader
impl BatchUploader
sourcepub fn new(client: CloudWatchLogsClient, target: UploadTarget) -> BatchUploader
pub fn new(client: CloudWatchLogsClient, target: UploadTarget) -> BatchUploader
Create a new BatchUploader
.
sourcepub fn add_event(&self, event: InputLogEvent) -> Result<(), Error>
pub fn add_event(&self, event: InputLogEvent) -> Result<(), Error>
Add a new event.
There are a couple AWS limits not enforced yet:
-
None of the log events in the batch can be more than 2 hours in the future
-
None of the log events in the batch can be older than 14 days or older than the retention period of the log group
sourcepub fn start_background_thread(&self) -> Result<JoinHandle<()>, Error>
pub fn start_background_thread(&self) -> Result<JoinHandle<()>, Error>
Start a background thread for uploading batches of events.
Trait Implementations§
source§impl Clone for BatchUploader
impl Clone for BatchUploader
source§fn clone(&self) -> BatchUploader
fn clone(&self) -> BatchUploader
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for BatchUploader
impl RefUnwindSafe for BatchUploader
impl Send for BatchUploader
impl Sync for BatchUploader
impl Unpin for BatchUploader
impl UnwindSafe for BatchUploader
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