qproxy

package
v0.0.0-...-0178a91 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2020 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitConfig

func InitConfig(v *viper.Viper) error

InitConfig reads in config file

func SetCommandFlags

func SetCommandFlags(fs *pflag.FlagSet, v *viper.Viper)

SetCommandFlags creates flags and bind them to Viper.

func Start

func Start()

Start is an helper method to start QProxy

func ValidateProxyConfig

func ValidateProxyConfig(v *viper.Viper) error

ValidateProxyConfig validate a viper instance.

Types

type BackendStatistics

type BackendStatistics struct {
	Name        string
	URL         string
	Sessions    int
	MaxSessions int
	SessionTTL  string
}

BackendStatistics stores backends statistics

type ProxyStatistics

type ProxyStatistics struct {
	Uptime            string
	QueuedSessions    int
	MaxQueuedSessions int
	QueuedSessionTTL  string
	Backends          []*BackendStatistics
}

ProxyStatistics stores proxy statistics

type QProxy

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

QProxy stores sessions and disptach them to backends

func NewQProxy

func NewQProxy(v *viper.Viper) (*QProxy, error)

NewQProxy create a Proxy using Viper

func (*QProxy) ListenAndServe

func (qp *QProxy) ListenAndServe()

ListenAndServe starts the proxy and API HTTP server

func (*QProxy) Shutdown

func (qp *QProxy) Shutdown(ctx context.Context)

Shutdown stops the proxy and API HTTP server

Jump to

Keyboard shortcuts

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