Back to godoc.org

Package server

v0.0.0-...-467d683
Latest Go to latest

The latest major version is .

Published: Jul 27, 2020 | License: MIT | Module: github.com/eko/pihole-exporter

Index

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