Documentation: - Add detailed README files for all services (auth, character, database, launcher, packet, utils, world) - Create API documentation for the database service with detailed endpoint specifications - Document database schema and relationships - Add service architecture overviews and configuration instructions Unit Tests: - Implement comprehensive test suite for database repositories (user, character, session) - Add gRPC service tests for database interactions - Create tests for packet service components (bufferpool, connection, packets) - Add utility service tests (health check, logging, load balancer, redis cache, service discovery) - Implement auth service user tests - Add character service tests Code Structure: - Reorganize test files into a more consistent structure - Create a dedicated tests crate for integration testing - Add test helpers and mock implementations for easier testing
23 lines
817 B
Rust
23 lines
817 B
Rust
fn main() {
|
|
// gRPC Server code
|
|
tonic_build::configure()
|
|
.build_server(true) // Generate gRPC server code
|
|
.compile_well_known_types(true)
|
|
.type_attribute(".", "#[derive(serde::Serialize, serde::Deserialize)]")
|
|
.compile_protos(
|
|
&["../proto/character_common.proto", "../proto/character.proto"],
|
|
&["../proto"],
|
|
)
|
|
.unwrap_or_else(|e| panic!("Failed to compile protos {:?}", e));
|
|
|
|
// gRPC Client code
|
|
tonic_build::configure()
|
|
.build_server(false) // Generate gRPC client code
|
|
.compile_well_known_types(true)
|
|
.compile_protos(
|
|
&["../proto/character_db_api.proto", "../proto/auth.proto"],
|
|
&["../proto"],
|
|
)
|
|
.unwrap_or_else(|e| panic!("Failed to compile protos {:?}", e));
|
|
}
|