Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollectHeadersToLog

func CollectHeadersToLog(headerGroups ...[]string) []string

    CollectHeadersToLog returns an ordered slice of slices of headers to be logged and returns a unique, ordered slice of headers to be logged

    func NewProxyResponseWriter

    func NewProxyResponseWriter(w http.ResponseWriter) *proxyResponseWriter

    func ReadResponseWithTimeout

    func ReadResponseWithTimeout(r *bufio.Reader, req *http.Request, timeout time.Duration) (*http.Response, error)

      ReadResponseWithTimeout extends http.ReadResponse but it utilizes a timeout

      func TLSConfigWithServerName

      func TLSConfigWithServerName(newServerName string, template *tls.Config) *tls.Config

      Types

      type AddHeaderIfNotPresentRewriter

      type AddHeaderIfNotPresentRewriter struct {
      	Header http.Header
      }

        AddHeaderIfNotPresentRewriter: Adds headers only if they are not present in the current http.Header. The http.Header must be built using the method Add() to canonalize the keys

        func (*AddHeaderIfNotPresentRewriter) RewriteHeader

        func (i *AddHeaderIfNotPresentRewriter) RewriteHeader(header http.Header)

        type HeaderRewriter

        type HeaderRewriter interface {
        	RewriteHeader(http.Header)
        }

        type ProxyResponseWriter

        type ProxyResponseWriter interface {
        	Header() http.Header
        	Hijack() (net.Conn, *bufio.ReadWriter, error)
        	Write(b []byte) (int, error)
        	WriteHeader(s int)
        	Done()
        	Flush()
        	Status() int
        	SetStatus(status int)
        	Size() int
        	CloseNotify() <-chan bool
        	AddHeaderRewriter(HeaderRewriter)
        }

        type ReadResponseResult

        type ReadResponseResult struct {
        	// contains filtered or unexported fields
        }

        type RemoveHeaderRewriter

        type RemoveHeaderRewriter struct {
        	Header http.Header
        }

          RemoveHeaderRewriter: Removes any value associated to a header The http.Header must be built using the method Add() to canonalize the keys

          func (*RemoveHeaderRewriter) RewriteHeader

          func (i *RemoveHeaderRewriter) RewriteHeader(header http.Header)

          type TimeoutError

          type TimeoutError struct{}

          func (TimeoutError) Error

          func (t TimeoutError) Error() string