Back to

Package server

Latest Go to latest

The latest major version is .

Published: Jul 27, 2020 | License: MIT | Module:


type Server

type Server struct {
	// contains filtered or unexported fields

Server is the struct for the HTTP server.

func NewServer

func NewServer(port string) *Server

NewServer method initializes a new HTTP server instance and associates the different routes that will be used by Prometheus (metrics) or for monitoring (readiness, liveness).

func (*Server) ListenAndServe

func (s *Server) ListenAndServe()

ListenAndServe method serves HTTP requests.

func (*Server) Stop

func (s *Server) Stop()

Stop method stops the HTTP server (so the exporter become unavailable).

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier