httpserver

package
v1.0.874-f55e5b0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2021 License: MIT Imports: 10 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 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