Skip to content

Add support for custom dialer#373

Merged
n8mgr merged 1 commit intomasterfrom
chris/dialer
Dec 11, 2025
Merged

Add support for custom dialer#373
n8mgr merged 1 commit intomasterfrom
chris/dialer

Conversation

@ChrisSchinnerl
Copy link
Member

Required by SiaFoundation/hostd#889 to monitor and rate limit the outgoing bandwidth usage of the syncer.

@ChrisSchinnerl ChrisSchinnerl self-assigned this Dec 11, 2025
Copilot AI review requested due to automatic review settings December 11, 2025 08:48
@chatgpt-codex-connector
Copy link

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for custom dialers in the Syncer to enable monitoring and rate limiting of outgoing bandwidth usage. The implementation allows users to provide a custom dialer through a new WithDialer configuration option.

Key Changes:

  • Introduced a Dialer interface for custom network connection handling
  • Added WithDialer option to configure a custom dialer (defaults to &net.Dialer{})
  • Updated the Connect method to use the configured dialer instead of a hardcoded net.Dialer

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
syncer/syncer.go Adds Dialer interface, configuration option, and integrates custom dialer into connection logic
.changeset/allow_for_passing_a_custom_dialer_to_the_syncer.md Documents the feature addition as a minor version change

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@n8mgr n8mgr merged commit 445d074 into master Dec 11, 2025
13 checks passed
@n8mgr n8mgr deleted the chris/dialer branch December 11, 2025 20:04
@github-project-automation github-project-automation bot moved this from In Progress to Done in Sia Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants