Skip to content

Commit

Permalink
formatting and spelling errors and what not
Browse files Browse the repository at this point in the history
Signed-off-by: Toby Lawrence <[email protected]>
  • Loading branch information
tobz committed Sep 24, 2021
1 parent 55f8062 commit 45d95cd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
16 changes: 2 additions & 14 deletions src/sinks/s3_common/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,17 @@ use futures::{future::BoxFuture, stream};
use md5::Digest;
use rusoto_core::{ByteStream, RusotoError};
use rusoto_s3::{PutObjectError, PutObjectOutput, PutObjectRequest, S3Client, S3};
use std::{
io::{self, Write},
task::{Context, Poll},
};
use std::task::{Context, Poll};
use tower::Service;
use tracing_futures::Instrument;
use vector_core::{
buffers::Ackable,
event::{Event, EventFinalizers, EventStatus, Finalizable},
event::{EventFinalizers, EventStatus, Finalizable},
};

use super::config::S3Options;
use crate::{internal_events::aws_s3::sink::S3EventsSent, serde::to_string};

/// Generalized interface for defining how a batch of events will be turned into an S3 request.
pub trait S3RequestBuilder {
/// Builds an `S3Request` for the given batch of events, and their partition key.
fn build_request(&self, key: String, batch: Vec<Event>) -> S3Request;

/// Encodes an individual event to the provided writer.
fn encode_event(&self, event: Event, writer: &mut dyn Write) -> io::Result<()>;
}

#[derive(Debug, Clone)]
pub struct S3Request {
pub body: Bytes,
Expand Down
2 changes: 1 addition & 1 deletion src/sinks/util/encoding/codec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ mod tests {
let result = encode_event(log_event, encoding).expect("should not have failed");
let encoded = std::str::from_utf8(&result).expect("result should be valid UTF-8");

// We havce to hard-code the transformation of the timestamp here, as `chrono::DateTime`
// We have to hard-code the transformation of the timestamp here, as `chrono::DateTime`
// uses a more timezone-explicit format in its `Display` implementation, while its
// `Serialize` implementation uses RFC3339.
let expected = format!(
Expand Down

0 comments on commit 45d95cd

Please sign in to comment.