proxy

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option added in v0.1.0

type Option func(proxy *Proxy)

Option option function that enables a feature on Proxy

func WithLogger added in v0.1.0

func WithLogger(logger *zerolog.Logger) Option

WithLogger adds a logger to log requests

func WithPrometheus added in v0.1.0

func WithPrometheus() Option

WithPrometheus enables prometheus metric endpoint

type Proxy

type Proxy struct {
	Distributor   string
	QueryFrontend string
	Querier       string
	Authenticator authenticators.Authenticator
	Prometheus    bool
	// contains filtered or unexported fields
}

Proxy represents the loki proxy

func New added in v0.1.0

func New(distributor, queryFrontend, querier string, authenticator authenticators.Authenticator) *Proxy

func (*Proxy) AuthAndProxyHandler

func (p *Proxy) AuthAndProxyHandler(client *fasthttp.HostClient) func(ctx *fasthttp.RequestCtx)

AuthAndProxyHandler handler func for fasthttp that performs authentication and proxying

func (*Proxy) Run

func (p *Proxy) Run(listenAddress string, opts ...Option) error

Run starts listening on given address

Jump to

Keyboard shortcuts

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