add configurable VRF interface and user-timeout (#17108)

This commit is contained in:
Harshavardhana
2023-05-03 14:12:25 -07:00
committed by GitHub
parent 90e2cc3d4c
commit 9571b0825e
16 changed files with 258 additions and 152 deletions

View File

@@ -30,8 +30,10 @@ import (
// TODO: if possible implement for non-linux platforms, not a priority at the moment
//
//nolint:unused
func setTCPParameters(string, string, syscall.RawConn) error {
return nil
func setTCPParametersFn(opts TCPOptions) func(network, address string, c syscall.RawConn) error {
return func(network, address string, c syscall.RawConn) error {
return nil
}
}
// DialContext is a function to make custom Dial for internode communications
@@ -41,7 +43,7 @@ type DialContext func(ctx context.Context, network, address string) (net.Conn, e
var NewInternodeDialContext = NewCustomDialContext
// NewCustomDialContext configures a custom dialer for internode communications
func NewCustomDialContext(dialTimeout time.Duration) DialContext {
func NewCustomDialContext(dialTimeout time.Duration, _ TCPOptions) DialContext {
return func(ctx context.Context, network, addr string) (net.Conn, error) {
dialer := &net.Dialer{
Timeout: dialTimeout,