Skip to content

Migrate value constants to configuration #138

@Bathtor

Description

@Bathtor

We currently have a lot of internal constants or default parameters that are deep within components and modules and are difficult or impossible to change, certainly after compilation.

We should migrate as many as possible of these to use our HOCON configuration, so that users can actually customise their instances without having to recompile.

In order to do so, I think we should have a mechanism to produce hierarchical keys internally that is compile time evaluated. I'm imagining something like pub const MY_KEY: &str = config_key!(PARENT_KEY, "my-key"), which we then expose in the docs (gotta make sure these modules are always public) with explanations of what the key does. Perhaps we could even let the macro generate the rust-doc as well.
I tried something like this with just simple concat!(), but that doesn't let me use constants. So maybe we need to use something like the const_format crate.

Status

  1. Decide on key mechanism (@Bathtor completed in Configuration Entry Mechanism #145 )
  2. Convert configuration parameters (@adamhass )

Must Convert

  • dispatch::lookup::gc::defaults
  • buffer config (at least top level and network level, individual components might be trickier)
  • blocklist/allowlist

This list is woefully incomplete. Please edit whenever you find something that should be here.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions