proxy

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOpenstackProxy

func NewOpenstackProxy(proxyURL, osAuth string) (*httputil.ReverseProxy, error)

Types

type AddressBook

type AddressBook struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewAddressBook

func NewAddressBook(proxyURL string) (*AddressBook, error)

proxy is scheme, host and port of this proxy. All OpenStack URLs in the catalog will be rewritten using this base URL.

func (*AddressBook) Alias

func (a *AddressBook) Alias(u *url.URL) error

func (*AddressBook) Rewrite

func (a *AddressBook) Rewrite(reqURL *url.URL) error

Resolve rewrites the passed URL with the target found in the map. Errors if the target is not in the map.

func (*AddressBook) Set

func (a *AddressBook) Set(alias string, target url.URL)

type Target

type Target struct {
	Scheme string
	Host   string
}

func NewTarget

func NewTarget(u url.URL) Target

func (Target) Rewrite

func (t Target) Rewrite(u *url.URL, targetPath string)

Jump to

Keyboard shortcuts

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