Created
September 13, 2020 16:14
-
-
Save jayhuang75/2b9340ecc75af140d5867b0a2766672a to your computer and use it in GitHub Desktop.
Build a Realtime Data Pipeline During the Weekend in Rust
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
// Load Env Config | |
let config = config::Config::new().unwrap_or_else(|err| { | |
panic!("Load Environment variable failed: {}", err); | |
}); | |
// Init the GRPC server | |
let addr = "[::0]:50051".parse().unwrap(); | |
let mut player_serivce = MyPlayerService::default(); | |
player_serivce.config = config; | |
info!("[server.rs] PlayerServer listening on {}", addr); | |
// Start the Server | |
Server::builder() | |
.add_service(PlayerServiceServer::new(player_serivce)) | |
.serve(addr) | |
.await?; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment