Skip to content

Commit

Permalink
improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
kobayurii committed Oct 2, 2024
1 parent 9ae9e69 commit 9471995
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,10 @@ extern crate derive_builder;
pub use near_indexer_primitives;

pub use aws_credential_types::Credentials;
pub use providers::fastnear::client as fastnear_client;
pub use providers::fastnear::types::{FastNearConfig, FastNearConfigBuilder};
pub use providers::s3::client as s3_client;
pub use providers::s3::types::{LakeConfig, LakeConfigBuilder};

pub mod providers;

pub(crate) const LAKE_FRAMEWORK: &str = "near_lake_framework";
Expand Down
4 changes: 2 additions & 2 deletions src/providers/fastnear/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ pub struct FastNearClient {
}

impl FastNearClient {
pub fn new(config: &types::FastNearConfig) -> Self {
pub fn new(endpoint: String) -> Self {
Self {
endpoint: config.endpoint.clone(),
endpoint,
client: reqwest::Client::new(),
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/providers/fastnear/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub async fn start(
blocks_sink: tokio::sync::mpsc::Sender<near_indexer_primitives::StreamerMessage>,
config: types::FastNearConfig,
) -> anyhow::Result<()> {
let client = client::FastNearClient::new(&config);
let client = client::FastNearClient::new(config.endpoint);
let max_num_threads = config.num_threads;
let next_sink_block =
std::sync::Arc::new(std::sync::atomic::AtomicU64::new(config.start_block_height));
Expand Down

0 comments on commit 9471995

Please sign in to comment.