Documentation ¶
Index ¶
- Constants
- func SetOperation(ctx context.Context, op string)
- type FilterFunc
- type Server
- func (s *Server) CONNECT(path string, handler fasthttp.RequestHandler)
- func (s *Server) DELETE(path string, handler fasthttp.RequestHandler)
- func (s *Server) Endpoint() (*url.URL, error)
- func (s *Server) GET(path string, handler fasthttp.RequestHandler)
- func (s *Server) HEAD(path string, handler fasthttp.RequestHandler)
- func (s *Server) Handle(method, path string, handler fasthttp.RequestHandler)
- func (s *Server) OPTIONS(path string, handler fasthttp.RequestHandler)
- func (s *Server) PATCH(path string, handler fasthttp.RequestHandler)
- func (s *Server) POST(path string, handler fasthttp.RequestHandler)
- func (s *Server) PUT(path string, handler fasthttp.RequestHandler)
- func (s *Server) Start(ctx context.Context) error
- func (s *Server) Stop(_ context.Context) error
- func (s *Server) TRACE(path string, handler fasthttp.RequestHandler)
- type ServerOption
- func WithAddress(addr string) ServerOption
- func WithErrorEncoder(en kHttp.EncodeErrorFunc) ServerOption
- func WithFilter(filters ...FilterFunc) ServerOption
- func WithMiddleware(m ...middleware.Middleware) ServerOption
- func WithRequestDecoder(dec kHttp.DecodeRequestFunc) ServerOption
- func WithResponseEncoder(en kHttp.EncodeResponseFunc) ServerOption
- func WithStrictSlash(strictSlash bool) ServerOption
- func WithTLSConfig(c *tls.Config) ServerOption
- func WithTimeout(timeout time.Duration) ServerOption
- type Transport
- func (tr *Transport) Endpoint() string
- func (tr *Transport) Kind() transport.Kind
- func (tr *Transport) Operation() string
- func (tr *Transport) PathTemplate() string
- func (tr *Transport) ReplyHeader() transport.Header
- func (tr *Transport) Request() *http.Request
- func (tr *Transport) RequestHeader() transport.Header
- type Transporter
Constants ¶
View Source
const (
KindFastHttp transport.Kind = "fasthttp"
)
Variables ¶
This section is empty.
Functions ¶
func SetOperation ¶
SetOperation sets the transport operation.
Types ¶
type FilterFunc ¶
type FilterFunc func(fasthttp.RequestHandler) fasthttp.RequestHandler
func FilterChain ¶
func FilterChain(filters ...FilterFunc) FilterFunc
type Server ¶
func NewServer ¶
func NewServer(opts ...ServerOption) *Server
type ServerOption ¶
type ServerOption func(*Server)
func WithAddress ¶
func WithAddress(addr string) ServerOption
func WithErrorEncoder ¶
func WithErrorEncoder(en kHttp.EncodeErrorFunc) ServerOption
func WithFilter ¶
func WithFilter(filters ...FilterFunc) ServerOption
func WithMiddleware ¶
func WithMiddleware(m ...middleware.Middleware) ServerOption
func WithRequestDecoder ¶
func WithRequestDecoder(dec kHttp.DecodeRequestFunc) ServerOption
func WithResponseEncoder ¶
func WithResponseEncoder(en kHttp.EncodeResponseFunc) ServerOption
func WithStrictSlash ¶
func WithStrictSlash(strictSlash bool) ServerOption
func WithTLSConfig ¶
func WithTLSConfig(c *tls.Config) ServerOption
func WithTimeout ¶
func WithTimeout(timeout time.Duration) ServerOption
type Transport ¶
type Transport struct {
// contains filtered or unexported fields
}
Transport is an HTTP transport.
func (*Transport) PathTemplate ¶
PathTemplate returns the http path template.
func (*Transport) ReplyHeader ¶
ReplyHeader returns the reply header.
func (*Transport) RequestHeader ¶
RequestHeader returns the request header.
type Transporter ¶
type Transporter interface { transport.Transporter Request() *http.Request PathTemplate() string }
Transporter is http Transporter
Click to show internal directories.
Click to hide internal directories.