Skip to content

Commit c382dd5

Browse files
apollo_storage: add new fn for ServerConfig
1 parent f046009 commit c382dd5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

crates/apollo_storage/src/storage_reader_server.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ pub struct ServerConfig {
1919
enable: bool,
2020
}
2121

22+
impl ServerConfig {
23+
/// Creates a new server configuration.
24+
pub fn new(socket: SocketAddr, max_concurrency: usize, enable: bool) -> Self {
25+
Self { socket, max_concurrency, enable }
26+
}
27+
}
28+
2229
#[async_trait]
2330
/// Handler trait for processing storage reader requests.
2431
pub trait StorageReaderServerHandler<Request, Response> {

0 commit comments

Comments
 (0)