server

package
Version: v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server is the struct for the HTTP server.

func NewServer

func NewServer(port uint16, clients []*pihole.Client) *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).

Source Files

Jump to

Keyboard shortcuts

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