-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Indexer-Grpc-V2] Create two new folders for new binaries. (#15690)
- Loading branch information
Showing
10 changed files
with
162 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
24 changes: 24 additions & 0 deletions
24
ecosystem/indexer-grpc/indexer-grpc-data-service-v2/Cargo.toml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
[package] | ||
name = "aptos-indexer-grpc-data-service-v2" | ||
description = "Aptos Indexer gRPC data service to serve the data from in-memory cache and file store." | ||
version = "1.0.0" | ||
|
||
# Workspace inherited keys | ||
authors = { workspace = true } | ||
edition = { workspace = true } | ||
homepage = { workspace = true } | ||
license = { workspace = true } | ||
publish = { workspace = true } | ||
repository = { workspace = true } | ||
rust-version = { workspace = true } | ||
|
||
[dependencies] | ||
anyhow = { workspace = true } | ||
aptos-indexer-grpc-server-framework = { workspace = true } | ||
async-trait = { workspace = true } | ||
clap = { workspace = true } | ||
serde = { workspace = true } | ||
tokio = { workspace = true } | ||
|
||
[target.'cfg(unix)'.dependencies] | ||
jemallocator = { workspace = true } |
21 changes: 21 additions & 0 deletions
21
ecosystem/indexer-grpc/indexer-grpc-data-service-v2/src/config.rs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright © Aptos Foundation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
use anyhow::Result; | ||
use aptos_indexer_grpc_server_framework::RunnableConfig; | ||
use serde::{Deserialize, Serialize}; | ||
|
||
#[derive(Clone, Debug, Deserialize, Serialize)] | ||
#[serde(deny_unknown_fields)] | ||
pub struct IndexerGrpcDataServiceConfig {} | ||
|
||
#[async_trait::async_trait] | ||
impl RunnableConfig for IndexerGrpcDataServiceConfig { | ||
async fn run(&self) -> Result<()> { | ||
Ok(()) | ||
} | ||
|
||
fn get_server_name(&self) -> String { | ||
"indexer_grpc_data_service_v2".to_string() | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
ecosystem/indexer-grpc/indexer-grpc-data-service-v2/src/lib.rs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// Copyright © Aptos Foundation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
pub mod config; |
17 changes: 17 additions & 0 deletions
17
ecosystem/indexer-grpc/indexer-grpc-data-service-v2/src/main.rs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright © Aptos Foundation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
use anyhow::Result; | ||
use aptos_indexer_grpc_data_service_v2::config::IndexerGrpcDataServiceConfig; | ||
use aptos_indexer_grpc_server_framework::ServerArgs; | ||
use clap::Parser; | ||
|
||
#[cfg(unix)] | ||
#[global_allocator] | ||
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc; | ||
|
||
#[tokio::main] | ||
async fn main() -> Result<()> { | ||
let args = ServerArgs::parse(); | ||
args.run::<IndexerGrpcDataServiceConfig>().await | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
[package] | ||
name = "aptos-indexer-grpc-manager" | ||
description = "Aptos Indexer gRPC Manager" | ||
version = "1.0.0" | ||
|
||
# Workspace inherited keys | ||
authors = { workspace = true } | ||
edition = { workspace = true } | ||
homepage = { workspace = true } | ||
license = { workspace = true } | ||
publish = { workspace = true } | ||
repository = { workspace = true } | ||
rust-version = { workspace = true } | ||
|
||
[dependencies] | ||
anyhow = { workspace = true } | ||
aptos-indexer-grpc-server-framework = { workspace = true } | ||
async-trait = { workspace = true } | ||
clap = { workspace = true } | ||
serde = { workspace = true } | ||
tokio = { workspace = true } | ||
|
||
[target.'cfg(unix)'.dependencies] | ||
jemallocator = { workspace = true } |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright © Aptos Foundation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
use anyhow::Result; | ||
use aptos_indexer_grpc_server_framework::RunnableConfig; | ||
use serde::{Deserialize, Serialize}; | ||
|
||
#[derive(Clone, Debug, Deserialize, Serialize)] | ||
#[serde(deny_unknown_fields)] | ||
pub struct IndexerGrpcManagerConfig {} | ||
|
||
#[async_trait::async_trait] | ||
impl RunnableConfig for IndexerGrpcManagerConfig { | ||
async fn run(&self) -> Result<()> { | ||
Ok(()) | ||
} | ||
|
||
fn get_server_name(&self) -> String { | ||
"grpc_manager".to_string() | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// Copyright © Aptos Foundation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
pub mod config; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright © Aptos Foundation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
use anyhow::Result; | ||
use aptos_indexer_grpc_manager::config::IndexerGrpcManagerConfig; | ||
use aptos_indexer_grpc_server_framework::ServerArgs; | ||
use clap::Parser; | ||
|
||
#[cfg(unix)] | ||
#[global_allocator] | ||
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc; | ||
|
||
#[tokio::main] | ||
async fn main() -> Result<()> { | ||
let args = ServerArgs::parse(); | ||
args.run::<IndexerGrpcManagerConfig>().await | ||
} |