pihole-exporter: github.com/eko/pihole-exporter/internal/server Index | Files

package server

import "github.com/eko/pihole-exporter/internal/server"


Package Files


type Server Uses

type Server struct {
    // contains filtered or unexported fields

Server is the struct for the HTTP server.

func NewServer Uses

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 Uses

func (s *Server) ListenAndServe()

ListenAndServe method serves HTTP requests.

func (*Server) Stop Uses

func (s *Server) Stop()

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

Package server imports 5 packages (graph) and is imported by 1 packages. Updated 2019-05-09. Refresh now. Tools for package owners.