web

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Config

type Config struct {
	Logger     *zap.SugaredLogger `yaml:"-"`
	ListenAddr string             `yaml:"listen_addr"`
	Stats      *stats.Stats
}

type FrontendBackendStats

type FrontendBackendStats struct {
	TotalDurationMs    map[string][]float64 `json:"total_duration_ms"`
	RequestDurationMs  map[string][]float64 `json:"request_duration_ms"`
	ResponseDurationMs map[string][]float64 `json:"response_duration_ms"`
	RequestRate        map[string][]float64 `json:"request_rate"`
}

type FrontendStats

type FrontendStats struct {
	DurationMs  map[string][]float64 `json:"duration_ms"`
	RequestRate map[string][]float64 `json:"request_rate"`
}

type SlowList

type SlowList struct {
	TS                 time.Time `json:"ts"`
	Path               string    `json:"path"`
	Client             string    `json:"client"`
	Backend            string    `json:"backend"`
	Server             string    `json:"server"`
	ServerConnCount    int       `json:"server_conn_count"`
	TotalDurationMs    int       `json:"total_duration_ms"`
	RequestDurationMs  int       `json:"request_duration_ms"`
	ResponseDurationMs int       `json:"response_duration_ms"`
}

type WebBackend

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

func New

func New(cfg Config, webFS fs.FS) (backend *WebBackend, err error)

func (*WebBackend) Frontend

func (b *WebBackend) Frontend(c *gin.Context)

func (*WebBackend) Run

func (b *WebBackend) Run() error

func (*WebBackend) Slow

func (b *WebBackend) Slow(c *gin.Context)

func (*WebBackend) V1FrontendBackendStats

func (b *WebBackend) V1FrontendBackendStats(c *gin.Context)

func (*WebBackend) V1FrontendSlow

func (b *WebBackend) V1FrontendSlow(c *gin.Context)

func (*WebBackend) V1FrontendStats

func (b *WebBackend) V1FrontendStats(c *gin.Context)

func (*WebBackend) V1FrontendTop

func (b *WebBackend) V1FrontendTop(c *gin.Context)

func (*WebBackend) V1GCStats

func (b *WebBackend) V1GCStats(c *gin.Context)

func (*WebBackend) V1TopRate

func (b *WebBackend) V1TopRate(c *gin.Context)

Jump to

Keyboard shortcuts

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