Skip to content

Architecture: Configuration structs have confusing duplicate names #27

@drmingdrmer

Description

@drmingdrmer

Summary

Multiple configuration structs with identical names exist in different modules, causing confusion.

Locations

TlsConfig (two different structs):

  • crates/runtime-api/src/lib.rs:32 - Client TLS configuration
  • crates/service/src/configs/inner.rs:26 - Server TLS configuration

GrpcConfig (two different structs):

  • crates/types/src/grpc_config.rs:16 - Constants only
  • crates/service/src/configs/inner.rs:49 - Server settings

Problem

  • Confusion about which config to use where
  • Import ambiguity requiring explicit module paths
  • Difficult to understand the configuration hierarchy
  • Easy to use the wrong config type accidentally

Suggested Fix

Use more specific names:

// Instead of two TlsConfig
pub struct ClientTlsConfig { ... }  // in runtime-api
pub struct ServerTlsConfig { ... }  // in service

// Instead of two GrpcConfig
pub struct GrpcLimits { ... }       // in types (constants)
pub struct GrpcServerConfig { ... } // in service

Priority

P2 - Developer experience

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions