github.com/blend/go-sdk@v1.20240719.1/r2/opt_dial_keepalive.go (about) 1 /* 2 3 Copyright (c) 2024 - Present. Blend Labs, Inc. All rights reserved 4 Use of this source code is governed by a MIT license that can be found in the LICENSE file. 5 6 */ 7 8 package r2 9 10 import ( 11 "net" 12 "time" 13 14 "github.com/blend/go-sdk/webutil" 15 ) 16 17 // OptDialKeepAlive sets the dial keep alive duration. 18 // Only use this if you know what you're doing, the defaults are typically sufficient. 19 func OptDialKeepAlive(d time.Duration) DialOption { 20 return func(dialer *net.Dialer) { 21 webutil.OptDialKeepAlive(d)(dialer) 22 } 23 }