Skip to content

Instantly share code, notes, and snippets.

@jayhuang75
Created September 13, 2020 16:14
Show Gist options
  • Save jayhuang75/2b9340ecc75af140d5867b0a2766672a to your computer and use it in GitHub Desktop.
Save jayhuang75/2b9340ecc75af140d5867b0a2766672a to your computer and use it in GitHub Desktop.
Build a Realtime Data Pipeline During the Weekend in Rust
// 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