Documentation ¶
Index ¶
- func Authenticator(next http.Handler) http.Handler
- func NewTransport(cacher ResponseCacher, logger *logrus.Entry, ...) *transport
- func PrepareRoutes(c *config.Config, log *logrus.Entry, server *Server) *chi.Mux
- type ResponseCache
- type ResponseCacher
- type Server
- func (t Server) Close() error
- func (p *Server) HealthFunc(w http.ResponseWriter, _ *http.Request)
- func (p *Server) RPCProxy(w http.ResponseWriter, r *http.Request)
- func (p *Server) ReadyFunc(w http.ResponseWriter, _ *http.Request)
- func (t Server) RoundTrip(req *http.Request) (*http.Response, error)
- func (p *Server) StartHTTPServer(h http.Handler) *http.Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTransport ¶
func NewTransport(cacher ResponseCacher, logger *logrus.Entry, debugHTTPRequest, debugHttpResponse bool) *transport
nolint
Types ¶
type ResponseCache ¶
type ResponseCache struct {
// contains filtered or unexported fields
}
ResponseCache implements ResponseCacher interface
func NewResponseCache ¶
func NewResponseCache(cache cache.Cache, matcher matcher.Matcher) *ResponseCache
NewResponseCache fabric
func (*ResponseCache) Cacher ¶
func (rc *ResponseCache) Cacher() cache.Cache
Cacher interface implementation
func (*ResponseCache) GetResponseCache ¶
func (rc *ResponseCache) GetResponseCache(req requests.RPCRequest) (requests.RPCResponse, error)
GetResponseCache return response from the cache for the request
func (*ResponseCache) Matcher ¶
func (rc *ResponseCache) Matcher() matcher.Matcher
Matcher interface implementation
func (*ResponseCache) SetResponseCache ¶
func (rc *ResponseCache) SetResponseCache(req requests.RPCRequest, resp requests.RPCResponse) error
SetResponseCache sets response cache based on the request
type ResponseCacher ¶
type ResponseCacher interface { SetResponseCache(requests.RPCRequest, requests.RPCResponse) error GetResponseCache(req requests.RPCRequest) (requests.RPCResponse, error) Matcher() matcher.Matcher Cacher() cache.Cache }
ResponseCacher interface
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func FromConfigWithTransport ¶
func (*Server) HealthFunc ¶
func (p *Server) HealthFunc(w http.ResponseWriter, _ *http.Request)
HealthFunc health checking
Click to show internal directories.
Click to hide internal directories.