server

package
v0.0.0-...-21fbe9e Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Healthz

func Healthz() http.HandlerFunc

Healthz returns a simple HandlerFunc simply replying with "OK"

func Profiling

func Profiling() http.Handler

Profiling mimics what the net/http/pprof.init() does, but on a fresh handler

func Prometheus

func Prometheus() http.Handler

Prometheus simply returns the promhttp.Handler()

func Version

func Version() http.HandlerFunc

Version returns a simple HandlerFunc returning a JSON with version information

Types

type Server

type Server struct {
	Http *http.Server
	// contains filtered or unexported fields
}

This Server is a simple wrapper for a http.Server server with optional TLS.

func NewServer

func NewServer(handler http.Handler, httpAddr, httpCert, httpKey string) (s *Server, err error)

Create a new Server with optional TLS using the CertReloader.

func (*Server) Addr

func (s *Server) Addr() string

Addr returns the base listening address, like https?://host:port

func (*Server) ListenAndServe

func (s *Server) ListenAndServe() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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