MCPcopy Create free account
hub / github.com/Invisv-Privacy/masque / sanitizeOptionsWithDefaults

Function sanitizeOptionsWithDefaults

http3/client.go:152–164  ·  view source on GitHub ↗

sanitizeOptionsWithDefaults sets the default values for ProxyOptions.

(opt ClientConfig)

Source from the content-addressed store, hash-verified

150
151// sanitizeOptionsWithDefaults sets the default values for ProxyOptions.
152func sanitizeOptionsWithDefaults(opt ClientConfig) (ClientConfig, error) {
153 if opt.MaxIncomingStreams == 0 {
154 opt.MaxIncomingStreams = defaultMaxIncomingStreams
155 }
156 if opt.MaxIdleTimeout == 0 {
157 opt.MaxIdleTimeout = defaultMaxIdleTimeout
158 }
159 if opt.ConnectTimeout == 0 {
160 opt.ConnectTimeout = defaultConnectTimeout
161 }
162
163 return opt, nil
164}
165
166// NewClient provides a method that returns a new Client object, creating
167// a new http3.RoundTripper object dedicated to be used with the provided proxy address.

Callers 1

NewClientFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected