Skip to content

Commit

Permalink
Fix examples build/format
Browse files Browse the repository at this point in the history
  • Loading branch information
farnyser committed Mar 26, 2024
1 parent a52c31e commit 08f0ba5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
10 changes: 5 additions & 5 deletions connector/examples/combined_example_consumer.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![allow(unused_variables)]

use mango_feeds_connector::{
grpc_plugin_source, metrics, AccountWrite, EntityFilter, FilterConfig, GrpcSourceConfig,
grpc_plugin_source, metrics, EntityFilter, FeedWrite, FilterConfig, GrpcSourceConfig,
MetricsConfig, SlotUpdate, SnapshotSourceConfig, SourceConfig,
};
use std::sync::atomic::AtomicBool;
Expand Down Expand Up @@ -52,7 +52,7 @@ async fn main() -> anyhow::Result<()> {
};

let (account_write_queue_sender, account_write_queue_receiver) =
async_channel::unbounded::<AccountWrite>();
async_channel::unbounded::<FeedWrite>();

let (slot_queue_sender, slot_queue_receiver) = async_channel::unbounded::<SlotUpdate>();

Expand All @@ -66,7 +66,7 @@ async fn main() -> anyhow::Result<()> {
tokio::spawn(async move {
loop {
let next = account_write_queue_receiver.recv().await.unwrap();
println!("got account write: {:?}", next);
println!("got feed write: {:?}", next);
}
});

Expand Down Expand Up @@ -95,8 +95,8 @@ async fn main() -> anyhow::Result<()> {
let filter_config = filter_config1;

grpc_plugin_source::process_events(
&config,
&filter_config,
config,
filter_config,
account_write_queue_sender,
slot_queue_sender,
metrics_tx.clone(),
Expand Down
10 changes: 5 additions & 5 deletions connector/examples/geyser_example_consumer.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![allow(unused_variables)]

use mango_feeds_connector::{
grpc_plugin_source, metrics, AccountWrite, EntityFilter, FilterConfig, GrpcSourceConfig,
grpc_plugin_source, metrics, EntityFilter, FeedWrite, FilterConfig, GrpcSourceConfig,
MetricsConfig, SlotUpdate, SnapshotSourceConfig, SourceConfig,
};
use std::sync::atomic::AtomicBool;
Expand Down Expand Up @@ -52,7 +52,7 @@ async fn main() -> anyhow::Result<()> {
};

let (account_write_queue_sender, account_write_queue_receiver) =
async_channel::unbounded::<AccountWrite>();
async_channel::unbounded::<FeedWrite>();

let (slot_queue_sender, slot_queue_receiver) = async_channel::unbounded::<SlotUpdate>();

Expand All @@ -66,7 +66,7 @@ async fn main() -> anyhow::Result<()> {
tokio::spawn(async move {
loop {
let next = account_write_queue_receiver.recv().await.unwrap();
println!("got account write: {:?}", next);
println!("got feed write: {:?}", next);
}
});

Expand Down Expand Up @@ -95,8 +95,8 @@ async fn main() -> anyhow::Result<()> {
let filter_config = filter_config1;

grpc_plugin_source::process_events(
&config,
&filter_config,
config,
filter_config,
account_write_queue_sender,
slot_queue_sender,
metrics_tx.clone(),
Expand Down
8 changes: 4 additions & 4 deletions connector/examples/websocket_example_consumer.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![allow(unused_variables)]

use mango_feeds_connector::{
websocket_source, AccountWrite, EntityFilter, FilterConfig, SlotUpdate, SnapshotSourceConfig,
websocket_source, EntityFilter, FeedWrite, FilterConfig, SlotUpdate, SnapshotSourceConfig,
SourceConfig,
};

Expand Down Expand Up @@ -58,7 +58,7 @@ async fn main() -> anyhow::Result<()> {
let filter_config = filter_config1;

let (account_write_queue_sender, account_write_queue_receiver) =
async_channel::unbounded::<AccountWrite>();
async_channel::unbounded::<FeedWrite>();

let (slot_queue_sender, slot_queue_receiver) = async_channel::unbounded::<SlotUpdate>();

Expand All @@ -77,8 +77,8 @@ async fn main() -> anyhow::Result<()> {
});

websocket_source::process_events(
&config,
&filter_config,
config,
filter_config,
account_write_queue_sender,
slot_queue_sender,
)
Expand Down

0 comments on commit 08f0ba5

Please sign in to comment.