proxy

package
v0.0.60 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2022 License: MIT Imports: 5 Imported by: 0

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 MatchRouterFunc func(*http.Request) string

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL