This file contains hidden or 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
apm_config: | |
# This points the `trace-agent` at Vector's `datadog_agent` source. | |
apm_dd_url: http://localhost:8081 | |
# Set these to zero in order to avoid the Datadog Agent sampling traces before sending | |
# them to Vector, which will skew computed statistics like request count, or success vs | |
# error span count, etc. | |
max_traces_per_second: 0 | |
errors_per_second: 0 |
This file contains hidden or 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
extern crate tokio; // 0.1.8; | |
extern crate futures; // 0.1.24; | |
use futures::sync::mpsc; | |
use futures::{task, Async, Future, Sink, Stream}; | |
pub fn invoke_bpm_battle_warm_up( // this method is called from the poll parent method | |
receiver: &mut Option<mpsc::Receiver<bool>>, | |
msg: BattleWarmUp, | |
addr: Addr<Bpm>, |
This file contains hidden or 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
#!/usr/bin/env run-cargo-script | |
// cargo-deps: tokio, tokio-codec, tokio-io, futures-cpupool | |
extern crate tokio; | |
extern crate tokio_codec; | |
use tokio_codec::{Framed, LinesCodec}; | |
use tokio::net::TcpListener; | |
use tokio::prelude::*; |
This file contains hidden or 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
let pipeline = framed_reader | |
26 .map(move |b| { | |
25 let message: proto::Message = bincode::deserialize(&b).unwrap(); | |
24 let file; | |
23 match message { | |
22 proto::Message::Request(m) => { | |
21 file = m.file.clone(); | |
20 } | |
19 _ => { | |
18 panic!("Message incorrect") |