proxy

package module
v0.0.0-...-c9a89df Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2019 License: MIT Imports: 9 Imported by: 1

README

reverse-proxy

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomConfig

type CustomConfig map[string]interface{}

CustomConfig representing the string-interface key-value pairs

func (*CustomConfig) Get

func (cc *CustomConfig) Get(key string) (interface{}, error)

Get gets the value of the key-value pair by key

type Server

type Server struct {
	Method        string
	Path          string
	ProxyScheme   string
	ProxyPass     string
	ProxyPassPath string
	APIVersion    string
	CustomConfigs CustomConfig
}

Server storing target destinations' information

func (Server) ReverseProxy

func (s Server) ReverseProxy() gin.HandlerFunc

ReverseProxy forwards requests from upper proxy or clients to the corresponding destination

type ServerConfig

type ServerConfig []Server

ServerConfig representing an array of Server

func Default

func Default(fileName string) (*ServerConfig, error)

Default creates a ServerConfig handler

Jump to

Keyboard shortcuts

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