Skip to content

Commit

Permalink
Add ContextDialer to Aggregator Client Connection Configuration (#4290)
Browse files Browse the repository at this point in the history
  • Loading branch information
shaan420 authored Aug 5, 2024
1 parent d0b7d6e commit 493ffef
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/aggregator/client/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import (
"github.com/m3db/m3/src/x/clock"
"github.com/m3db/m3/src/x/instrument"
xio "github.com/m3db/m3/src/x/io"
"github.com/m3db/m3/src/x/net"
"github.com/m3db/m3/src/x/pool"
"github.com/m3db/m3/src/x/retry"

Expand Down Expand Up @@ -217,6 +218,7 @@ type ConnectionConfiguration struct {
ReconnectThresholdMultiplier int `yaml:"reconnectThresholdMultiplier"`
MaxReconnectDuration *time.Duration `yaml:"maxReconnectDuration"`
WriteRetries *retry.Configuration `yaml:"writeRetries"`
ContextDialerFn net.ContextDialerFn `yaml:"-"`
}

// NewConnectionOptions creates new connection options.
Expand Down Expand Up @@ -247,6 +249,9 @@ func (c *ConnectionConfiguration) NewConnectionOptions(scope tally.Scope) Connec
retryOpts := c.WriteRetries.NewOptions(scope)
opts = opts.SetWriteRetryOptions(retryOpts)
}
if c.ContextDialerFn != nil {
opts = opts.SetContextDialer(c.ContextDialerFn)
}
return opts
}

Expand Down

0 comments on commit 493ffef

Please sign in to comment.