proxy

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpectedPromql added in v0.0.4

func ExpectedPromql(t *testing.T, value string, expected string)

func Get added in v0.0.4

func Get(path string, q url.Values) (*http.Request, error)

func Post added in v0.0.4

func Post(path string, q url.Values) (*http.Request, error)

Types

type DebugTransport

type DebugTransport struct{}

func (DebugTransport) RoundTrip

func (DebugTransport) RoundTrip(r *http.Request) (*http.Response, error)

type MockProxy added in v0.0.4

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

func NewMock added in v0.0.4

func NewMock(logger log.Logger, mock func(rw http.ResponseWriter, req *http.Request)) *MockProxy

func (*MockProxy) ProxyRequest added in v0.0.4

func (p *MockProxy) ProxyRequest(w http.ResponseWriter, req *http.Request, config *config.VirtualHost)

type Proxy

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

Proxy model

func NewProxy added in v0.0.3

func NewProxy(logger log.Logger) *Proxy

func (*Proxy) ProxyRequest

func (p *Proxy) ProxyRequest(w http.ResponseWriter, req *http.Request, config *config.VirtualHost)

ProxyRequest to upstream Prometheus server

type RequestProxy added in v0.0.4

type RequestProxy interface {
	ProxyRequest(w http.ResponseWriter, req *http.Request, config *config.VirtualHost)
}

RequestProxy for upstream server

Jump to

Keyboard shortcuts

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