server

package
v0.77.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Server

func Server(addr string, config ServerConfig)

func ServerWithConfig

func ServerWithConfig(addr, configPath string)

func ServerWithDefaultConfig

func ServerWithDefaultConfig(addr string)

Types

type ServerConfig

type ServerConfig struct {
	Metrics []ServerStateMetrics `yaml:"Metrics"`
}

type ServerState

type ServerState struct {
	Metrics []ServerStateMetrics `yaml:"Metrics"`
}
var State ServerState

type ServerStateMetrics

type ServerStateMetrics struct {
	StatusCode            int     `yaml:"StatusCode"`
	Path                  string  `yaml:"Path"`
	Method                string  `yaml:"Method"`
	Duration              float64 `yaml:"Duration"`
	DurationDeviationPerc int     `yaml:"DurationDeviationPerc"`
	Rate                  int     `yaml:"Rate"`
	RateDeviationPerc     int     `yaml:"RateDeviationPerc"`
}

Jump to

Keyboard shortcuts

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