mononoke/gotham_ext: move content_encoding to its own top level module

Summary:
We have a module called "content" that contains two completely unrelated
things: some enums for content encodings (+ associated parsing), and our output
streams.

I'd like to add more of said output streams, so let's clean this up.

Reviewed By: HarveyHunt

Differential Revision: D27964046

fbshipit-source-id: b42e56aa3fadaf9b93a44216977da19d950a16b9
This commit is contained in:
Thomas Orozco 2021-04-27 08:08:53 -07:00 committed by Facebook GitHub Bot
parent e5cc9a1f3d
commit 47654a9d51
6 changed files with 6 additions and 8 deletions

View File

@ -5,8 +5,6 @@
* GNU General Public License version 2.
*/
pub mod encoding;
pub mod stream;
pub use encoding::{ContentCompression, ContentEncoding};
pub use stream::{CompressedContentStream, ContentMeta, ContentStream};

View File

@ -18,7 +18,7 @@ use pin_project::pin_project;
use crate::stream_ext::{EndOnErr, ForwardErr};
use super::encoding::{ContentCompression, ContentEncoding};
use crate::content_encoding::{ContentCompression, ContentEncoding};
pub trait ContentMeta {
/// Provide the content (i.e. Content-Encoding) for the underlying content. This will be sent

View File

@ -7,6 +7,7 @@
pub mod body_ext;
pub mod content;
pub mod content_encoding;
pub mod error;
pub mod handler;
pub mod middleware;

View File

@ -18,10 +18,8 @@ use hyper::{
};
use mime::Mime;
use crate::content::{
encoding::{ContentCompression, ContentEncoding},
stream::ContentMeta,
};
use crate::content::stream::ContentMeta;
use crate::content_encoding::{ContentCompression, ContentEncoding};
use crate::error::HttpError;
use crate::middleware::PostRequestCallbacks;
use crate::signal_stream::SignalStream;

View File

@ -16,7 +16,8 @@ use slog::error;
use filestore::{self, Alias, FetchKey, Range};
use gotham_ext::{
content::{CompressedContentStream, ContentEncoding, ContentStream},
content::{CompressedContentStream, ContentStream},
content_encoding::ContentEncoding,
error::HttpError,
middleware::ScubaMiddlewareState,
response::{StreamBody, TryIntoResponse},