server

package
v0.0.0-...-d3f7758 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MetricsLabels = []string{
	metricsMethodLabel,
	metricsPathLabel,
	metricsCodeLabel,
}

MetricsLabels - Array of labels added to metrics:

View Source
var MetricsNames = []string{
	requestCount,
	requestDuration,
}

MetricsNames - Array of Names of the metrics:

View Source
var PathVarSub = "-"

PathVarSub replaces path variables to a same character

Functions

func MetricsMiddleware

func MetricsMiddleware(handler http.Handler) http.Handler

MetricsMiddleware creates a new handler that collects metrics for the requests processed by the given handler.

func NewHealthCheckServer

func NewHealthCheckServer() *healthCheckServer

func ResetMetricCollectors

func ResetMetricCollectors()

ResetMetricCollectors resets all prometheus collectors

Types

type ControllersServer

type ControllersServer struct {
	KindControllerManager *controllers.KindControllerManager
	DB                    db.SessionFactory
}

func NewControllersServer

func NewControllersServer() *ControllersServer

func (ControllersServer) Start

func (s ControllersServer) Start()

Start is a blocking call that starts this controller server

type Server

type Server interface {
	Start()
	Stop() error
	Listen() (net.Listener, error)
	Serve(net.Listener)
}

func NewAPIServer

func NewAPIServer() Server

func NewMetricsServer

func NewMetricsServer() Server

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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