Documentation
¶
Index ¶
- Variables
- func EndpointPanicMiddleware() kitendpoint.Middleware
- func InitClient(ctx context.Context, peerName string, cfs []config.Client)
- func InitPProf(ctx context.Context, serviceName string, cfg config.PProf)
- func ListenAndServe(ctx context.Context, conf config.HTTP, httpHandler http.Handler)
- func NewRouter() *mux.Router
- func NewTransport(cf config.HTTPTransport) *http.Transport
- func RoundTripperLoggingMiddleware(next http.RoundTripper) http.RoundTripper
- func RoundTripperMetricsMiddleware(next http.RoundTripper) http.RoundTripper
- func RoundTripperTracingMiddleware(next http.RoundTripper) http.RoundTripper
- func ServerLoggingMiddleware(next http.Handler) http.Handler
- func ServerMetricsMiddleware(next http.Handler) http.Handler
- func ServerTracingMiddleware(next http.Handler) http.Handler
- type Client
- type ResponseWriter
- type RoundTripper
- type RoundTripperFunc
- type RoundTripperMiddleware
- type RoundTripperMiddlewareFunc
- type Server
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrConfigNotFound ... ErrConfigNotFound = errors.New("client config is not found") )
View Source
var ( // ErrPanic ... ErrPanic = errors.New("panic error") )
Functions ¶
func EndpointPanicMiddleware ¶ added in v0.2.9
func EndpointPanicMiddleware() kitendpoint.Middleware
EndpointPanicMiddleware ...
func InitClient ¶
InitClient ...
func ListenAndServe ¶
ListenAndServe ...
func RoundTripperLoggingMiddleware ¶
func RoundTripperLoggingMiddleware(next http.RoundTripper) http.RoundTripper
RoundTripperLoggingMiddleware ...
func RoundTripperMetricsMiddleware ¶ added in v0.2.5
func RoundTripperMetricsMiddleware(next http.RoundTripper) http.RoundTripper
RoundTripperTracingMiddleware ...
func RoundTripperTracingMiddleware ¶
func RoundTripperTracingMiddleware(next http.RoundTripper) http.RoundTripper
RoundTripperTracingMiddleware ...
func ServerLoggingMiddleware ¶
ServerLoggingMiddleware ...
func ServerMetricsMiddleware ¶
ServerMetricsMiddleware ...
Types ¶
type Client ¶
Client ...
func NewClient ¶
func NewClient( ctx context.Context, peerName string, method string, uri string, enc kithttp.EncodeRequestFunc, dec kithttp.DecodeResponseFunc, opt ...kithttp.ClientOption) (*Client, error)
NewClient ...
type ResponseWriter ¶
type ResponseWriter struct { http.ResponseWriter // contains filtered or unexported fields }
ResponseWriter ...
func (*ResponseWriter) WriteHeader ¶
func (w *ResponseWriter) WriteHeader(statusCode int)
WriteHeader ...
type RoundTripper ¶
type RoundTripper struct {
// contains filtered or unexported fields
}
RoundTripper ...
func NewRoundTripper ¶
func NewRoundTripper(base http.RoundTripper, mwf ...RoundTripperMiddlewareFunc) *RoundTripper
NewRoundTripper ...
func NewRoundTripperFromConfig ¶
func NewRoundTripperFromConfig(cf config.HTTPTransport) *RoundTripper
NewRoundTripperFromConfig ...
type RoundTripperFunc ¶
RoundTripperFunc ...
type RoundTripperMiddleware ¶
type RoundTripperMiddleware interface {
Middleware(http.RoundTripper) http.RoundTripper
}
RoundTripperMiddleware ...
type RoundTripperMiddlewareFunc ¶
type RoundTripperMiddlewareFunc func(http.RoundTripper) http.RoundTripper
RoundTripperMiddlewareFunc ...
func (RoundTripperMiddlewareFunc) Middleware ¶
func (mw RoundTripperMiddlewareFunc) Middleware(roundTripper http.RoundTripper) http.RoundTripper
Middleware allows MiddlewareFunc to implement the middleware interface.
type Server ¶
Server ...
func NewServer ¶
func NewServer( e kitendpoint.Endpoint, dec kithttp.DecodeRequestFunc, enc kithttp.EncodeResponseFunc, opt ...kithttp.ServerOption, ) *Server
NewServer ...
Click to show internal directories.
Click to hide internal directories.