httpserver

package
v1.0.1068-f40a2b7 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 License: MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPServer

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

func Load

func Load(ctx context.Context, name, addr string, handler http.Handler, sys *system.System) (*HTTPServer, error)

func New

func New(ctx context.Context, name, addr string, handler http.Handler) (s *HTTPServer, err error)

func (HTTPServer) Addr

func (s HTTPServer) Addr() string

func (*HTTPServer) MetricsProducer

func (s *HTTPServer) MetricsProducer() MetricProducer

func (*HTTPServer) Serve

func (s *HTTPServer) Serve(ctx context.Context) error

Serve the http server. On context cancellation the server is shutdown giving some time for the in flight requests to be handled.

type MetricProducer

type MetricProducer interface {
	// MetricName The name for this group of metrics
	//(Name might be cleaner, but is much more likely to conflict in implementations)
	MetricName() string
	// Gauges are instantaneous name value pairs
	Gauges(context.Context) map[string]float64
}

Directories

Path Synopsis
Package healthcheck implements the output admin API such as health checks and runtime profiling.
Package healthcheck implements the output admin API such as health checks and runtime profiling.

Jump to

Keyboard shortcuts

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