Documentation ¶
Index ¶
- Constants
- type Option
- func WithBufferCount(i int) Option
- func WithBufferSizeBytes(i int) Option
- func WithExpectContinueTimeout(t time.Duration) Option
- func WithFlushInterval(t time.Duration) Option
- func WithIdleConnTimeout(t time.Duration) Option
- func WithKeepAlive(t time.Duration) Option
- func WithMaxIdsConns(i int) Option
- func WithTLSHandshakeTimeout(t time.Duration) Option
- func WithTimeout(t time.Duration) Option
- type Proxy
Constants ¶
const ( // DefaultBufferCount is the default value for the maximum size of the buffer pool for the reverse proxy. DefaultBufferCount = 2 * 1024 // DefaultBufferSizeBytes is the default value for the length of the buffers in the buffer pool for the reverse proxy. DefaultBufferSizeBytes = 32 * 1024 // DefaultFlushInterval is the default value for the flush interval of reverse proxy to flush to the client while copying the response body. DefaultFlushInterval = time.Duration(-1) )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option overrides behavior of Proxy.
func WithBufferCount ¶
WithBufferCount sets the buffer count option for the reverse proxy.
func WithBufferSizeBytes ¶
WithBufferSizeBytes sets the buffer size bytes option for the reverse proxy.
func WithExpectContinueTimeout ¶
WithExpectContinueTimeout sets the max expected continue timeout duration for the underlying reverse proxy transport.
func WithFlushInterval ¶
WithFlushInterval sets the flush interval option for the reverse proxy.
func WithIdleConnTimeout ¶
WithIdleConnTimeout sets the idle timeout duration for the underlying reverse proxy transport.
func WithKeepAlive ¶
WithKeepAlive sets the keep alive duration for the underlying reverse proxy connection.
func WithMaxIdsConns ¶
WithMaxIdsConns sets the max idle conns for the underlying reverse proxy transport.
func WithTLSHandshakeTimeout ¶
WithTLSHandshakeTimeout sets the max TLS handshake timeout duration for the underlying reverse proxy transport.
func WithTimeout ¶
WithTimeout sets the timeout duration for the underlying reverse proxy connection.