Documentation ¶
Index ¶
- Constants
- type Http
- type ResponseReverseProxy
- func (t *ResponseReverseProxy) ErrorHandler(rw http.ResponseWriter, req *http.Request, err error)
- func (t *ResponseReverseProxy) GetCode() int
- func (t *ResponseReverseProxy) GetLAddr() net.Addr
- func (t *ResponseReverseProxy) GetRAddr() net.Addr
- func (t *ResponseReverseProxy) SaveResponse(resp *http.Response) error
- func (t *ResponseReverseProxy) Write(rw http.ResponseWriter, result prifma.HandleRequestResult) error
- type RoundTripperKey
- type RoundTrippersMap
- type SyncRoundTrippersMap
Constants ¶
View Source
const ModuleDirective = "http"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Http ¶
type Http struct {
RoundTrippers RoundTrippersMap
}
func (*Http) GetDirective ¶
func (*Http) HandleRequest ¶
func (t *Http) HandleRequest(result prifma.HandleRequestResult) (prifma.HandleRequestResult, error)
type ResponseReverseProxy ¶
type ResponseReverseProxy struct { RoundTrippers RoundTrippersMap ResponseCode int Error error LAddr net.Addr RAddr net.Addr }
func NewResponseReverseProxy ¶
func NewResponseReverseProxy(roundTrippers RoundTrippersMap) *ResponseReverseProxy
func (*ResponseReverseProxy) ErrorHandler ¶
func (t *ResponseReverseProxy) ErrorHandler(rw http.ResponseWriter, req *http.Request, err error)
func (*ResponseReverseProxy) GetCode ¶
func (t *ResponseReverseProxy) GetCode() int
func (*ResponseReverseProxy) GetLAddr ¶
func (t *ResponseReverseProxy) GetLAddr() net.Addr
func (*ResponseReverseProxy) GetRAddr ¶
func (t *ResponseReverseProxy) GetRAddr() net.Addr
func (*ResponseReverseProxy) SaveResponse ¶
func (t *ResponseReverseProxy) SaveResponse(resp *http.Response) error
func (*ResponseReverseProxy) Write ¶
func (t *ResponseReverseProxy) Write(rw http.ResponseWriter, result prifma.HandleRequestResult) error
type RoundTripperKey ¶
func NewRoundTripperKey ¶
func NewRoundTripperKey(result prifma.HandleRequestResult) RoundTripperKey
type RoundTrippersMap ¶
type RoundTrippersMap interface {
Get(result prifma.HandleRequestResult) http.RoundTripper
}
type SyncRoundTrippersMap ¶
type SyncRoundTrippersMap struct { RWMutex *sync.RWMutex RoundTrippers map[RoundTripperKey]http.RoundTripper }
func NewSyncRoundTrippersMap ¶
func NewSyncRoundTrippersMap() *SyncRoundTrippersMap
func (*SyncRoundTrippersMap) Get ¶
func (t *SyncRoundTrippersMap) Get(result prifma.HandleRequestResult) http.RoundTripper
Click to show internal directories.
Click to hide internal directories.