service

package
v0.0.0-...-03485e9 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MapStorage

type MapStorage interface {
	Insert(key *model.RedirectRequest, value model.RedirectResponse)
	Find(key *model.RedirectRequest) (model.RedirectResponse, bool)
}

type Proxy

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

Proxy contains service logic for proxying HTTP requests.

func NewProxy

func NewProxy(m MapStorage) *Proxy

NewProxy is a constructor for Proxy.

func (Proxy) Redirect

func (p Proxy) Redirect(ctx context.Context, request model.RedirectRequest) (model.RedirectResponse, error)

Redirect sends an HTTP request to the specified URL, parses the response and returns the parsed response or error.

Jump to

Keyboard shortcuts

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