server

package
v0.0.0-...-ecc870c Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: BSD-3-Clause Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

API is the metrics, inspection and debug server

func NewAPI

func NewAPI(
	auth Auth,
	conf *config.Config,
	readTimeout, writeTimeout time.Duration,
	log plog.Logger,
	tlsConfig *tls.Config,
	start time.Time,
	proxyServer *Proxy,
) *API

func (*API) Serve

func (s *API) Serve(listener net.Listener)

func (*API) ServeHTTP

func (s *API) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*API) Shutdown

func (s *API) Shutdown() error

Shutdown returns once the server was shutdown. Logs shutdown and errors.

type Auth

type Auth struct {
	Username string
	Password string
}

type Proxy

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

Proxy is the server receiving incomming proxy traffic

func NewProxy

func NewProxy(
	conf *config.Config,
	readTimeout, writeTimeout time.Duration,
	readBufferSize, writeBufferSize int,
	log plog.Logger,
	client *fasthttp.Client,
	tlsConfig *tls.Config,
) *Proxy

func (*Proxy) GetServiceStatistics

func (s *Proxy) GetServiceStatistics(id string) *statistics.ServiceSync

func (*Proxy) GetTemplateStatistics

func (s *Proxy) GetTemplateStatistics(
	serviceID, templateID string,
) *statistics.TemplateSync

func (*Proxy) Serve

func (s *Proxy) Serve(listener net.Listener)

func (*Proxy) Shutdown

func (s *Proxy) Shutdown() error

Shutdown returns once the server was shutdown. Logs shutdown and errors.

Jump to

Keyboard shortcuts

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