Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EmptyReverseProxyOption ¶
type EmptyReverseProxyOption struct{}
EmptyReverseProxyOption does not alter the configuration. It can be embedded in another structure to build custom options.
This API is EXPERIMENTAL.
type MatchRouterFunc ¶
type ReverseProxy ¶
type ReverseProxy struct {
// contains filtered or unexported fields
}
func NewReverseProxy ¶
func NewReverseProxy(router gin.IRouter, options ...ReverseProxyOption) (*ReverseProxy, error)
func (*ReverseProxy) ApplyOptions ¶
func (o *ReverseProxy) ApplyOptions(options ...ReverseProxyOption) *ReverseProxy
func (*ReverseProxy) ProxyHandler ¶
func (p *ReverseProxy) ProxyHandler() gin.HandlerFunc
func (*ReverseProxy) SetProxy ¶
func (p *ReverseProxy) SetProxy()
type ReverseProxyOption ¶
type ReverseProxyOption interface {
// contains filtered or unexported methods
}
A ReverseProxyOption sets options.
func WithMatchRouterFunc ¶
func WithMatchRouterFunc(matchRouter MatchRouterFunc) ReverseProxyOption
func WithRouterPatterns ¶
func WithRouterPatterns(routerPatterns ...string) ReverseProxyOption
func WithTargetUrl ¶
func WithTargetUrl(targetUrl string) ReverseProxyOption
type ReverseProxyOptionFunc ¶
type ReverseProxyOptionFunc func(*ReverseProxy)
ReverseProxyOptionFunc wraps a function that modifies Client into an implementation of the ReverseProxyOption interface.
Click to show internal directories.
Click to hide internal directories.