WIP on get channel info for arch app

This commit is contained in:
Dominik Werder
2021-07-05 23:29:42 +02:00
parent b737b9bd99
commit a8f15da101
56 changed files with 956 additions and 692 deletions

View File

@@ -1,8 +1,3 @@
use chrono::{DateTime, TimeZone, Utc};
use err::Error;
use futures_core::Stream;
use futures_util::StreamExt;
use serde::{Deserialize, Serialize};
use std::cmp::Ordering;
use std::collections::BTreeMap;
use std::fmt::{self, Debug, Display, Formatter};
@@ -13,11 +8,19 @@ use std::pin::Pin;
use std::str::FromStr;
use std::task::{Context, Poll};
use std::time::Duration;
use timeunits::*;
use chrono::{DateTime, TimeZone, Utc};
use futures_core::Stream;
use futures_util::StreamExt;
use serde::{Deserialize, Serialize};
#[allow(unused_imports)]
use tracing::{debug, error, info, trace, warn};
use url::Url;
use err::Error;
use timeunits::*;
pub mod query;
pub mod status;
pub mod streamext;
@@ -1057,3 +1060,15 @@ impl AppendToUrl for ChannelConfigQuery {
g.append_pair("channelName", &self.channel.name);
}
}
#[derive(Serialize, Deserialize)]
pub struct EventQueryJsonStringFrame(pub String);
/**
Provide basic information about a channel, especially it's shape.
*/
#[derive(Serialize, Deserialize)]
pub struct ChannelInfo {
pub shape: Shape,
pub msg: String,
}

13
netpod/src/query.rs Normal file
View File

@@ -0,0 +1,13 @@
use crate::{AggKind, Channel, NanoRange};
use serde::{Deserialize, Serialize};
/**
Query parameters to request (optionally) X-processed, but not T-processed events.
*/
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct RawEventsQuery {
pub channel: Channel,
pub range: NanoRange,
pub agg_kind: AggKind,
pub disk_io_buffer_size: usize,
}