|
@@ -1,19 +1,34 @@
|
|
|
use {
|
|
use {
|
|
|
crate::{
|
|
crate::{
|
|
|
api::{
|
|
api::{
|
|
|
- rest::{validate_price_ids, RestError},
|
|
|
|
|
|
|
+ rest::{
|
|
|
|
|
+ validate_price_ids,
|
|
|
|
|
+ RestError,
|
|
|
|
|
+ },
|
|
|
types::{
|
|
types::{
|
|
|
- BinaryUpdate, EncodingType, ParsedPriceUpdate, PriceIdInput, PriceUpdate,
|
|
|
|
|
|
|
+ BinaryUpdate,
|
|
|
|
|
+ EncodingType,
|
|
|
|
|
+ ParsedPriceUpdate,
|
|
|
|
|
+ PriceIdInput,
|
|
|
|
|
+ PriceUpdate,
|
|
|
RpcPriceIdentifier,
|
|
RpcPriceIdentifier,
|
|
|
},
|
|
},
|
|
|
ApiState,
|
|
ApiState,
|
|
|
},
|
|
},
|
|
|
- state::aggregate::{Aggregates, AggregationEvent, RequestTime},
|
|
|
|
|
|
|
+ state::aggregate::{
|
|
|
|
|
+ Aggregates,
|
|
|
|
|
+ AggregationEvent,
|
|
|
|
|
+ RequestTime,
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
anyhow::Result,
|
|
anyhow::Result,
|
|
|
axum::{
|
|
axum::{
|
|
|
extract::State,
|
|
extract::State,
|
|
|
- response::sse::{Event, KeepAlive, Sse},
|
|
|
|
|
|
|
+ response::sse::{
|
|
|
|
|
+ Event,
|
|
|
|
|
+ KeepAlive,
|
|
|
|
|
+ Sse,
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
futures::Stream,
|
|
futures::Stream,
|
|
|
pyth_sdk::PriceIdentifier,
|
|
pyth_sdk::PriceIdentifier,
|
|
@@ -21,7 +36,10 @@ use {
|
|
|
serde_qs::axum::QsQuery,
|
|
serde_qs::axum::QsQuery,
|
|
|
std::convert::Infallible,
|
|
std::convert::Infallible,
|
|
|
tokio::sync::broadcast,
|
|
tokio::sync::broadcast,
|
|
|
- tokio_stream::{wrappers::BroadcastStream, StreamExt as _},
|
|
|
|
|
|
|
+ tokio_stream::{
|
|
|
|
|
+ wrappers::BroadcastStream,
|
|
|
|
|
+ StreamExt as _,
|
|
|
|
|
+ },
|
|
|
utoipa::IntoParams,
|
|
utoipa::IntoParams,
|
|
|
};
|
|
};
|
|
|
|
|
|