目录
gaius

Enhance dynconfig with local fallback, static addresses, and health checks (#1944)

  • feat(dynconfig): support local file fallback when manager not configured
  • Make manager config optional; use local file fallback when absent
  • Extract remote (manager) logic into remote.rs and add new local.rs for file-based dynconfig with DNS scheduler discovery
  • Introduce Source enum to dispatch between remote and local refresh
  • Local source reads dynconfig.yaml from config dir, resolves schedulers via DNS, and controls its own refresh interval
  • Add serde_yaml and humantime-serde dependencies for local config

Signed-off-by: Gaius gaius.qi@gmail.com

  • feat(dynconfig): add static scheduler addrs and default config gen
  • Add addrs field to SchedulerConfig for static IP list; takes precedence over DNS-based addr when non-empty
  • Add parse_schedulers to resolve static addresses, deduplicating and sorting for stable selection
  • Add generate_default_if_absent to write default config file if none exists; called during initialization
  • Derive Serialize on config types to support YAML generation
  • Add tests covering static addrs, precedence, invalid input, and default file generation

Signed-off-by: Gaius gaius.qi@gmail.com

  • refactor(dynconfig): rename Source to Backend, expose path as CLI arg
  • Rename Source enum to Backend and update all references/comments
  • Move default helpers (refresh_interval, scheduler_addr) to dragonfly_client_config::dfdaemon for broader reuse
  • Add --dynconfig CLI arg (with env var) instead of deriving path from config file location
  • Rename generate_default_if_absent to generate_default and update test names for clarity
  • Remove DEFAULT_DYNCONFIG_FILENAME constant; add default_dfdaemon_dynconfig_path() to config crate

Signed-off-by: Gaius gaius.qi@gmail.com

  • fix(dynconfig): change scheduler addrs field from Vec to Option
  • Change addrs field type from Vec<String> to Option<Vec<String>>
  • Default value is now None instead of empty Vec
  • Update match logic to fall back to DNS resolution when addrs is None or empty
  • Update serde skip condition accordingly

Signed-off-by: Gaius gaius.qi@gmail.com

  • refactor(dynconfig): rename LocalConfig/SchedulerConfig to Config/`Scheduler
  • Rename LocalConfigConfig and SchedulerConfigScheduler in local.rs
  • Alias Scheduler from manager API as ManagerScheduler to avoid name clash
  • Update all internal usages, defaults, and test assertions accordingly

Signed-off-by: Gaius gaius.qi@gmail.com

  • refactor(dynconfig): move empty addr check to caller, add skip_serializing_if
  • Move empty addr check from resolve_schedulers to its call site
  • Add skip_serializing_if = "Option::is_none" to skip_verify and ca fields
  • Clarify comments for client_config and seed_client_config fields
  • Minor formatting fixes (blank lines)

Signed-off-by: Gaius gaius.qi@gmail.com

  • feat(dynconfig): add scheduler health check filtering in local backend
  • Perform health checks on schedulers in local backend, filtering out unhealthy ones
  • Return error if no healthy schedulers are available after filtering
  • Increase default local dynconfig refresh interval from 5s to 60s
  • Pass DfdaemonConfig to Local to access TLS settings for health checks
  • Add tests for unhealthy scheduler filtering and failure cases
  • Refactor Dynconfig::new to extract backend() helper; switch to interval-based refresh loop

Signed-off-by: Gaius gaius.qi@gmail.com

  • refactor(grpc): pass Manager reference directly to ManagerClient::new
  • Replace Arc<Config> with &Manager in ManagerClient::new signature
  • Remove indirection through config.manager option unwrap
  • Call config.load_client_tls_config directly on the Manager ref
  • Update call site and tests accordingly

Signed-off-by: Gaius gaius.qi@gmail.com

  • style: use inline format args in dynconfig local tests

Replace positional {} placeholders with inline variable references in format! calls, improving readability and reducing argument lists.

Signed-off-by: Gaius gaius.qi@gmail.com


Signed-off-by: Gaius gaius.qi@gmail.com

2天前1668次提交

Dragonfly Client

GitHub release CI Coverage Open Source Helpers Discussions Twitter LICENSE FOSSA Status

Dragonfly client written in Rust. It can serve as both a peer and a seed peer.

Documentation

You can find the full documentation on the d7y.io.

Community

Join the conversation and help the community grow. Here are the ways to get involved:

Contributing

You should check out our CONTRIBUTING and develop the project together.

邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802047560号