restapi

package
v1.0.0-alpha.6 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompileRouteAsRegex

func CompileRouteAsRegex(route string) *regexp.Regexp

func CompileRoutesAsRegexes

func CompileRoutesAsRegexes(routes []string) ([]*regexp.Regexp, error)

Types

type DynamicProxy

type DynamicProxy struct {
	// contains filtered or unexported fields
}

func NewDynamicProxy

func NewDynamicProxy(e *echo.Echo, prefix string) *DynamicProxy

func (*DynamicProxy) AddGroup

func (p *DynamicProxy) AddGroup(prefix string) *echo.Group

func (*DynamicProxy) AddReverseProxy

func (p *DynamicProxy) AddReverseProxy(prefix string, host string, port uint32, path string) error

func (*DynamicProxy) RemoveReverseProxy

func (p *DynamicProxy) RemoveReverseProxy(prefix string)

type RestRouteManager

type RestRouteManager struct {
	syncutils.RWMutex
	// contains filtered or unexported fields
}

func NewRestRouteManager

func NewRestRouteManager(e *echo.Echo) *RestRouteManager

func (*RestRouteManager) AddProxyRoute

func (p *RestRouteManager) AddProxyRoute(route string, host string, port uint32, path string) error

AddProxyRoute adds a proxy route to the Routes endpoint and configures a remote proxy for this route.

func (*RestRouteManager) AddRoute

func (p *RestRouteManager) AddRoute(route string) *echo.Group

AddRoute adds a route to the Routes endpoint and returns group to be used to register endpoints.

func (*RestRouteManager) RemoveRoute

func (p *RestRouteManager) RemoveRoute(route string)

RemoveRoute removes a route from the Routes endpoint.

func (*RestRouteManager) Routes

func (p *RestRouteManager) Routes() []string

Jump to

Keyboard shortcuts

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