Versions in this module Expand all Collapse all v1 v1.3.2 Sep 5, 2019 v1.3.1 Sep 4, 2019 v1.3.0 Jul 16, 2019 v1.2.0 Jul 15, 2019 v1.1.0 Jun 5, 2019 Changes in this version + func DefaultShouldRetryStatus(status int) bool type RetryOptions + ShouldRetryStatus ShouldRetryStatusFunc + UpdateRequest func(*http.Request) + type ShouldRetryStatusFunc func(int) bool v1.0.1 May 9, 2019 v1.0.0 Apr 11, 2019 Changes in this version + const DefaultMaxRedirects + const DefaultRetryInterval + var ErrBufferedWriterClosed = errors.New("BufferedWriter has been closed") + func ApplyURLParser(parser func(string) (*url.URL, error), values ...string) ([]*url.URL, error) + func Busy(maxTransactions int) func(http.Handler) http.Handler + func CheckRedirect(p RedirectPolicy) func(*http.Request, []*http.Request) error + func DefaultShouldRetry(err error) bool + func EnsureRewindable(r *http.Request) error + func GetErrorEncoder(ctx context.Context) gokithttp.ErrorEncoder + func NewRewind(r io.Reader) (io.ReadCloser, func() (io.ReadCloser, error), error) + func NewRewindBytes(b []byte) (io.ReadCloser, func() (io.ReadCloser, error)) + func NewServer(o ServerOptions) *http.Server + func NewServerConnStateLogger(logger log.Logger) func(net.Conn, http.ConnState) + func NewServerLogger(logger log.Logger) *stdlog.Logger + func NewStarter(o StartOptions, s httpServer) func() error + func NilConstructor(next http.Handler) http.Handler + func RetryTransactor(o RetryOptions, next func(*http.Request) (*http.Response, error)) func(*http.Request) (*http.Response, error) + func Rewind(r *http.Request) error + func ServerKey() interface + func StaticHeaders(extra http.Header) func(http.Handler) http.Handler + func WithClient(ctx context.Context, c Client) context.Context + func WithErrorEncoder(ctx context.Context, ee gokithttp.ErrorEncoder) context.Context + func WriteError(response http.ResponseWriter, code int, value interface{}) (int, error) + func WriteErrorf(response http.ResponseWriter, code int, format string, ...) (int, error) + type BufferedWriter struct + func (bw *BufferedWriter) Close() error + func (bw *BufferedWriter) Header() http.Header + func (bw *BufferedWriter) Write(p []byte) (int, error) + func (bw *BufferedWriter) WriteHeader(code int) + func (bw *BufferedWriter) WriteTo(response http.ResponseWriter) (int, error) + type Client interface + Do func(*http.Request) (*http.Response, error) + func GetClient(ctx context.Context) Client + type Constant struct + Body []byte + Code int + Header http.Header + func (c Constant) ServeHTTP(response http.ResponseWriter, _ *http.Request) + type Error struct + Code int + Header http.Header + Text string + func (e *Error) Error() string + func (e *Error) Headers() http.Header + func (e *Error) MarshalJSON() ([]byte, error) + func (e *Error) StatusCode() int + type ReadSeekerCloser interface + func NopCloser(rs io.ReadSeeker) ReadSeekerCloser + type RedirectPolicy struct + ExcludeHeaders []string + Logger log.Logger + MaxRedirects int + type RetryOptions struct + Counter metrics.Counter + Interval time.Duration + Logger log.Logger + Retries int + ShouldRetry ShouldRetryFunc + Sleep func(time.Duration) + type ServerOptions struct + Address string + CertificateFile []string + DisableKeepAlives bool + IdleTimeout time.Duration + KeyFile []string + Listener net.Listener + Logger log.Logger + MaxHeaderBytes int + ReadHeaderTimeout time.Duration + ReadTimeout time.Duration + WriteTimeout time.Duration + func (so *ServerOptions) StartOptions() StartOptions + type ShouldRetryFunc func(error) bool + type StartOptions struct + CertificateFile []string + DisableKeepAlives bool + KeyFile []string + Listener net.Listener + Logger log.Logger