proxy

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ServerPool domain.ServerPool

ServerPool struct for server pool

Functions

func GetAttemptsFromContext

func GetAttemptsFromContext(r *http.Request) int

GetAttemptsFromContext returns the attempts for request

func GetRetryFromContext

func GetRetryFromContext(r *http.Request) int

GetAttemptsFromContext returns the attempts for request

func HealthCheck

func HealthCheck()

HealthCheck runs a routine for check status of the backends every 2 mins

func Lbalancer

func Lbalancer(w http.ResponseWriter, r *http.Request)

Lbalancer load balances the incoming request

Types

type JWTPayload

type JWTPayload struct {
	jwt.Payload
}

JWTPayload custom struc for jwt Payload

type ProxyHandler

type ProxyHandler struct {
	Service services.DefaultProxyService
}

ProxyHandler handler for proxy funcionalities

func (*ProxyHandler) ProxyGateway

func (ph *ProxyHandler) ProxyGateway(endpoints domain.ProxyEndpoint, engine, key, securityType string)

ProxyGateway handler for management all request

func (*ProxyHandler) SaveSecretKEY

func (ph *ProxyHandler) SaveSecretKEY(engine, key, apikey string)

SaveSecretKEY handler for save secrets

type ResponseMiddleware

type ResponseMiddleware struct {
	Message string `json:"message"`
	Code    int    `json:"code"`
}

ResponseMiddleware struct for middleware responses

Jump to

Keyboard shortcuts

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