package
1.11.9
Repository: https://github.com/xmidt-org/webpa-common.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

ApplyURLParser applies a given URL parser, such as url.Parse or url.ParseRequestURI, to zero or more strings.
Busy creates an Alice-style constructor that limits the number of HTTP transactions handled by decorated handlers.
CheckRedirect produces a redirect policy function given a policy descriptor.
DefaultShouldRetry is the default retry predicate.
DefaultShouldRetryStatus is the default retry predicate.
EnsureRewindable configures the given request's contents to be restreamed in the event of a redirect or other arbitrary code that must resubmit a request.
GetClient returns the HTTP client associated with the context.
GetErrorEncoder returns the go-kit HTTP ErrorEncoder associated with the context.
NewRewind extracts all remaining bytes from an io.Reader, then uses NewRewindableBytes to produce a body and a get body function.
NewRewindBytes produces both an io.ReadCloser that returns the given bytes and a function that produces a new io.ReadCloser that returns those same bytes.
NewServer creates a Server from a supplied set of options.
NewServerConnStateLogger adapts a go-kit Logger onto a connection state handler appropriate for http.Server.ConnState.
NewServerLogger adapts a go-kit Logger onto a golang Logger in a way that is appropriate for http.Server.ErrorLog.
NewStarter returns a starter closure for the given HTTP server.
NilConstructor is an Alice-style decorator for http.Handler instances that does no decoration, i.e.
NopCloser is an analog of ioutil.NopCloser.
RetryTransactor returns an HTTP transactor function, of the same signature as http.Client.Do, that retries a certain number of times.
Rewind prepares a request body to be replayed.
ServerKey returns the contextual logging key for the server name.
StaticHeaders returns an Alice-style constructor that emits a static set of headers into every response.
WithClient associates an HTTP Client with the context.
WithErrorEncoder associates a go-kit ErrorEncoder with the context.
WriteError provides print-style functionality for writing a JSON message as a response.
WriteErrorf provides printf-style functionality for writing out the results of some operation.

# Constants

No description provided by the author
No description provided by the author

# Variables

No description provided by the author

# Structs

BufferedWriter is a closeable http.ResponseWriter that holds all written response information in memory.
Constant represents an http.Handler that writes prebuilt, constant information to the response writer.
Error is an HTTP-specific carrier of error information.
RedirectPolicy is the configurable policy for handling redirects.
RetryOptions are the configuration options for a retry transactor.
ServerOptions describes the superset of options for both construction an http.Server and starting it.
StartOptions represents the subset of server options that have to do with how an HTTP server is started.

# Interfaces

Client is an interface implemented by net/http.Client.
ReadSeekerCloser combines the behavior of io.Reader, io.Seeker, and io.Closer.

# Type aliases

ShouldRetryFunc is a predicate for determining if the error returned from an HTTP transaction should be retried.
ShouldRetryStatusFunc is a predicate for determining if the status coded returned from an HTTP transaction should be retried.