-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Users may want to use the Kubernetes reader to pull pod logs and process the raw content elsewhere. This adds a new raw renderer that outputs the original input. Note that storing the original message content will increase memory usage somewhat, though presumably not massively (expect less than 50 MiB per 100k messages). See also, #42
- Loading branch information
1 parent
3819a2c
commit 31b212d
Showing
10 changed files
with
38 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// (C) Copyright 2019 Hewlett Packard Enterprise Development LP | ||
|
||
use std::sync::Arc; | ||
use std::sync::mpsc::Receiver; | ||
use std::thread::{self, JoinHandle}; | ||
|
||
use crate::config::Config; | ||
use crate::renderer::types::*; | ||
|
||
pub fn raw_renderer(_: Arc<Config>, rx: Receiver<LogEntry>) -> JoinHandle<()> { | ||
thread::Builder::new().name("raw_renderer".to_string()).spawn(move || { | ||
for entry in rx { | ||
if entry.eof.is_some() { | ||
break; | ||
} | ||
|
||
if let Some(message) = entry.message { | ||
println!("{}", message.message.raw); | ||
} | ||
} | ||
}).unwrap() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters