Versions in this module Expand all Collapse all v1 v1.3.0 Nov 23, 2022 Changes in this version type Service + func FromHTTPHandler(handler http.Handler) Service + func (svc Service) ServeHTTP(rw http.ResponseWriter, r *http.Request) v1.2.0 Nov 21, 2020 Changes in this version + const HSTSDefaultMaxAge type Server + func ListenUnix(svc Service, path string) (*Server, error, func()) + func ListenUnixTLS(svc Service, path, certFile, keyFile string, cfg *tls.Config) (*Server, error, func()) v1.1.0 Nov 21, 2020 Changes in this version + func ErrorStatusCode(err error) int + func HSTSFilter(maxAge int) func(request Request, service Service) Response + func HttpHandler(svc Service) http.Handler + func Streamer() io.ReadWriteCloser + type Filter func(Request, Service) Response + type Request struct + func NewRequest(ctx context.Context, method, url string, body interface{}) Request + func (r *Request) BodyBytes(consume bool) ([]byte, error) + func (r *Request) Encode(v interface{}) + func (r *Request) Write(b []byte) (n int, err error) + func (r Request) Decode(v interface{}) error + func (r Request) Response(body interface{}) Response + func (r Request) Send() *ResponseFuture + func (r Request) SendVia(svc Service) *ResponseFuture + func (r Request) String() string + type Response struct + Error error + Request *Request + func BareClient(req Request) Response + func ErrorFilter(req Request, svc Service) Response + func ExpirationFilter(req Request, svc Service) Response + func H2cFilter(req Request, svc Service) Response + func NewResponse(req Request) Response + func (r *Response) BodyBytes(consume bool) ([]byte, error) + func (r *Response) Decode(v interface{}) error + func (r *Response) Encode(v interface{}) + func (r *Response) Write(b []byte) (n int, err error) + func (r *Response) Writer() ResponseWriter + func (r Response) String() string + type ResponseFuture struct + func Send(req Request) *ResponseFuture + func SendVia(req Request, svc Service) *ResponseFuture + func (f *ResponseFuture) Response() Response + func (f *ResponseFuture) WaitC() <-chan struct{} + type ResponseWriter interface + WriteError func(err error) + WriteJSON func(interface{}) + type Router struct + func RouterForRequest(r Request) *Router + func (r *Router) CONNECT(pattern string, svc Service) + func (r *Router) DELETE(pattern string, svc Service) + func (r *Router) GET(pattern string, svc Service) + func (r *Router) HEAD(pattern string, svc Service) + func (r *Router) OPTIONS(pattern string, svc Service) + func (r *Router) PATCH(pattern string, svc Service) + func (r *Router) POST(pattern string, svc Service) + func (r *Router) PUT(pattern string, svc Service) + func (r *Router) Register(method, pattern string, svc Service) + func (r *Router) TRACE(pattern string, svc Service) + func (r Router) Lookup(method, path string) (Service, string, map[string]string, bool) + func (r Router) Params(req Request) map[string]string + func (r Router) Pattern(req Request) string + func (r Router) Serve() Service + type Server struct + func Listen(svc Service, addr string) (*Server, error) + func ListenTLS(svc Service, addr, certFile, keyFile string, cfg *tls.Config) (*Server, error) + func Serve(svc Service, l net.Listener) (*Server, error) + func ServeTLS(svc Service, l net.Listener, certFile, keyFile string, cfg *tls.Config) (*Server, error) + func (s *Server) Done() <-chan struct{} + func (s *Server) Listener() net.Listener + func (s *Server) Stop(ctx context.Context) + type Service func(req Request) Response + var Client Service = BareClient + var RoundTripper http.RoundTripper = &http.Transport{ ... } + func HttpService(rt http.RoundTripper) Service + func (svc Service) Filter(f Filter) Service + type WrapDownstreamErrors struct